{"_id":"caver-js-ext-kas","_rev":"50-bd8bc8243962345868235efb744ed9c5","name":"caver-js-ext-kas","dist-tags":{"rc":"1.12.0-rc.1","latest":"1.12.0"},"versions":{"1.0.0-rc.1":{"name":"caver-js-ext-kas","version":"1.0.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/jimni1222/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/jimni1222/caver-js-ext-kas/issues"},"dist":{"shasum":"e66477909d27b8731709db39d5708af548c0610a","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.1.tgz","fileCount":143,"integrity":"sha512-ivDs5bFbN3e1kW2EK2xoPuF+E6/VtIto3gqxdvry2qaj1aps8ws2RGTgJ+Lt9oXfP+JLHOR5X2ZXdFGc9a64uQ==","signatures":[{"sig":"MEQCIEUU12iA/Cfd9IktSUwSgiAOdyM32Wg2CbnlXjBvcUI3AiBqWoAjn+nWtFBbRBonx3pwDylqQg8dkBe8NroKTfQbWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2226900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbAn9CRA9TVsSAnZWagAAtVAP/jdmB6wnAaC8TC/IKp14\nZpImv4+4gL6ak9S7p8OPz2P5rsPe3nyqGeL8fTNWK4W2QrQcC0tASEoWPoH/\n3P9XQ6+Me2JQ+O8a8uPJMKaXaOES0usbbkukcFWu4V2DPdJwij73lfd5PiAw\nSS5+pTo+wbB0FnBA64YDQ8657zv/o9Vxa0JwUtx0XOM2R/1YlRw5KzojBqPH\nm5LEBKEDNeqdAXpoHPhE9A1vs8PgZul/m9GCjbSbcaxr9higfwcq1AVBjgVK\ncc+QeNfZtAp9KJhgduxj2ANm04eQfohI2kM2KZHFX35RXYbK6KSRCckDVf+X\ny2CMxPY4uexQD1L20/dvi2uoePrDBXAO5EImZCe7plCcV+je+vPJJB6vlm/Y\nc/Lbz02h1bsNUsfIZtkQjzOtxp82ySfz/IULibLu3+TkxrlwjtJAe/9JQjyH\n2KmAXBJqRfbgJ+gJ0/4juvhZWDMb7SL47FtTTbKje75Y28Jw3o/OOYaZSyzU\nZb4pza+dxNipBHco9oarQP3+J1GQTql/z5B7F2PX5JQMKBoIPDzKhggc3yRh\nS+2Es0ZpLI7+9BctHb9jCWNbR2k/sODqLnS2U7zCJ4TfrLwM8UD0g78wp8wF\nQKy9fiftNzQYlVpj5Gwzy0pnt27uHyLQtkp9sA61bggYpFB/DxpQZgVChBH+\npIPW\r\n=Iash\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"gitHead":"35d6ae26e4ad1a9b4f20945d205f66a47172f0af","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/jimni1222/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.1_1600915964758_0.1673305394683684","host":"s3://npm-registry-packages"}},"1.0.0-rc.2":{"name":"caver-js-ext-kas","version":"1.0.0-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"0330bf8c31a7b5b6838c216a00fa27ccc3f74902","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.2.tgz","fileCount":143,"integrity":"sha512-IlCCxDU+CdG0vD5SRzMAYmIFShHXHC4dPyJ1HPr/ZO9oLUJpqkJRHRfXlcyDErP5g4UhA3ZSDmWknd3V6pltsA==","signatures":[{"sig":"MEUCIHBkHLqvn6q59rYS6YZS/VkhqTqxaZ3Wqq12YqmN2xJbAiEArNoC7KDNJOTQRgbQtxCeN7S7y65fjZD9xHbLUNQzrwo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2226897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbB/WCRA9TVsSAnZWagAAo6UQAIhj1IUAHHBGRtX7D3VE\n/XD62wzoMvWF3eH/2vbKaUqxA+cfug6mgof72CKsK7y0UhFqeN8UPRT40RaY\neipuJbmHUcnevKdreYmgmZgIIGHy4sNV5+4w+4dmk22ytmA2ohIisBjpvore\nWkxW6K5QTupI6sA0RppzY3GYd4FSxfGKbtD703MeM9nulHKBtAN2AeQQEJ43\nMREEZiiN9Nb86cgglNWH2EZ+4KpbcHTadzDWuyphhHYBI94ng/td9yDZvuod\nJC20KbAEh75+KME4rgOZI8d/UHddVNwjhTMkY2ztxaGFlAjAgtADxVkDwxWP\n201nS79WFjWHCoNyVSPw4QzwESLCwk9Svx5BgbhdGmIo1dGA+TbDWzG+kZ7u\nr+BPTq6yuMyYrQltbxnovXIPd5zsO5rfYolLjI7zSfov3VAaY9Vswz7B7jYF\nl89pJtX3gBKPd/1B9uccEoYnYTVsJi1QpgcCno46FhAKu5P4GtwBv7bKwvmE\nOeH1irAavmNQuy/GbEgxEaWgxyC681ryhNh3/fVTnzEMBOn4bv4xwq/XUQN2\nVM2jbZaHkHVyqZOl8vnatI+S2qME4/q57uOQychcl8A7ZuQMtqBQa8kVBjt4\nVOHdFcOlSEMPFg6n7ejy0NW5E3ykUextxT/8TZlQDNc0R/XT15NNol3GPOcD\n3GN/\r\n=IaU0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"gitHead":"8c5879a7fe754456406991e04379948cbc79c7ef","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.2_1600921557393_0.31482085367979784","host":"s3://npm-registry-packages"}},"1.0.0-rc.3":{"name":"caver-js-ext-kas","version":"1.0.0-rc.3","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.3","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"a219e271f0f88837d4a344ca3d2d89f42b981e17","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.3.tgz","fileCount":143,"integrity":"sha512-fghWgedgRFve2lo9vxfdWU32Z7Ip7D38uZLAqLvi85mMsZ0LMw/XAFWsC21kwdTQS/Fsi7QAH0ZEfJ8k2BWAvA==","signatures":[{"sig":"MEUCIA/SR6Ju06T9HO8xgRq4QnptvSTe5Dg6//j9gcFnllaKAiEAnSZbTJ+r8uh863vKuKuMu0zNvPr6YWIucpeFXHLpfIE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2227034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbDWRCRA9TVsSAnZWagAAphAQAJmbUck2u/KYcVsltcQb\n115qzXaTjfOxknPG2hdzqbTdJTeyfwJJnI4ZeCLI3PNGnJ6jG658Fh3AS+/8\nNE3ma026YGjZcGpTh+TU6ZBYE46QcEVtJqvHCoOxsv+Qfw88E26ElPvYIpkm\nsPQWcyeicgbaNEzNe3H1iLGyymQuwWM8dT4mCA4MXEIhC9xCfzxsReeuFaHj\nED9JB27iy62Y1iByuHyXFFtAWqNfTsoUHMpsUdox3UNV2gMyZ6Ebdeuly4Zd\n7VYlYaiBQAJZ6TrPwEbjhZulMnoAQoxYiC+0LR+TcdJ3qej4ZPPGyHNhg0hl\nyo7Os8xUdgwW0SFS+wwR9f1IhpAYotibFhh5H6bUfB6C2NirHaaeoMc8VmB9\niiiRGWnL7sl3v0bYZkDNtMjlFIukCgighZ0vVq8+RDf+NBu4W0rWeHRohCrp\nnJKZV1053bJUHnQyv1jMEiaPWH8DmzC36Rw5lFeStmT2UFPyMNxp/dgciwYp\nUkY0AJexEx6XywMfGYagG9fypc37tKjo6lSGsAD7ETtZtsbYqgwH158Llyas\nz/9wsY+ZvEvWEs6sgBBV+r9kA6brwadslnxfHUCjYNoeTIfFcnCoXtmITRjC\noS08TQ0Y/C+6Pr4/9ct8+6q1RIGEnr5xkig2hmtRTSxO1zadOl2/IW78YSE3\nYns+\r\n=srg4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Modify the contents of \"test/testEnv.json\" appropriately before performing the test.\n\nYou can perform unit test with the command below.\n\n```bash\n$ npm run test\n```\n\nIn addition, the integration test, which is actually connected to KAS, can be executed through the command below.\n\n```bash\n$ npm run intTest\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.enableXXXAPI` function as shown below.\n\n```javascript\nconst caver = new Caver('https://node-api.dev.klaytn.com/v1/klaytn')\ncaver.enableNodeAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to enable tokenHistory, wallet, and anchor api. To enable each api service, a separate url path must be given.\n\n```javascript\ncaver.enableTokenHistoryAPI('https://th-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.enableWalletAPI('https://wallet-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.enableAnchorAPI('https://anchor-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperators()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"757c98d722b1f1588e3caaefd0e30268631c81e9","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.3_1600927120675_0.4967375362955009","host":"s3://npm-registry-packages"}},"1.0.0-rc.4":{"name":"caver-js-ext-kas","version":"1.0.0-rc.4","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.4","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"ecccff8a8f0d9b7d9bb27f39309b884d75fc20c8","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.4.tgz","fileCount":148,"integrity":"sha512-33YWvqg8KkicIXfDlAkBqZ341TmMH9JHJuvcI5d9BQDR/8qE4poo8C6Gro06Ia52eCIFMEItokQkbN5OjHDxxA==","signatures":[{"sig":"MEYCIQCH082DlDoIlKzg4YLftNSzjJTkb2ytwU5DV/jz5UScrAIhAOYtjW5V4fdCVGeH8mMha/K6GMWxddYL1F39ZeNGPJYw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2418556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcVSxCRA9TVsSAnZWagAAAccP/0JiIlZYxoP7Pb1Uz1qe\nX6f9ZArKDYb46CmcfxU8Xe5azc3GYiLbcmQLjD+YJTzTdxUsuFiyarTa4Bce\n+t96u0PwycOLdGYKKCPuYdXPcKHblnjyKR8EGyNq6a1EdD0X8/S3Nwc6i2Oy\npd48laONm4sZfgR4toygrpuL6KXiEJDWSlJMi7v1NE/vWNpgaaxnsMuKD7qr\nAwawOzz32eP/9D3BTeM2zAx2jDSWYcRDPpJlX/3GFMIgUvpCUk/+uYPxQavt\nQ8Cg+JyNFxWgm2Z5zjUxVSh18eXRwo2LnLgZbxHU01YvzAHA6M3SdxTmt9uZ\n8zK3vWmDTzB8MJs8Xcdo4jsfOIJ70NkUKOCwvLITIFMd1RPMEyGZwCZs8nR/\nn4bq5QZVcRkj3T/ZBYwHgk0hDrt25iubLVm8j0Szdun75zEvpOMuZu2oMlWX\nnPZuySbaV4fxfhxnhgM2sp+9Mqv6KZfjyzhnaJw08NpeLh5MhWEXBE3iC6ib\nFUkJZSpm+3llddPQECkxrPxstp5p3wuzd7TM8xSnlDymelzx6XX4QAgsHbx8\nKHr+fVmlPx45YBqGBSjb9hrt+dVDVqDeejCzsaGVgXKM7eRrloxbS1L2h1eK\ny7BMo/IP8MlV8273xksxsEaJlXIKo9/K/E4gw4DL4VXwrCBAxInKvFMjCBJ4\nqvCj\r\n=Uge0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Modify the contents of \"test/testEnv.json\" appropriately before performing the test.\n\nYou can perform unit test with the command below.\n\n```bash\n$ npm run test\n```\n\nIn addition, the integration test, which is actually connected to KAS, can be executed through the command below.\n\n```bash\n$ npm run intTest\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initXXXAPI` function as shown below.\n\n```javascript\nconst caver = new Caver('https://node-api.dev.klaytn.com/v1/klaytn')\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to initialize for tokenHistory, wallet, and anchor api. To initialize each api service, a separate url path must be given.\n\n```javascript\ncaver.initTokenHistoryAPI('https://th-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.initWalletAPI('https://wallet-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.initAnchorAPI('https://anchor-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperators()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"3a1e03b79ef8ed7edee26ccb9536390b025c58dd","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.4_1601262769259_0.7431728852992727","host":"s3://npm-registry-packages"}},"1.0.0-rc.5":{"name":"caver-js-ext-kas","version":"1.0.0-rc.5","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.5","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"e5f2fd9246118b816676252dfce0ea6881c47170","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.5.tgz","fileCount":148,"integrity":"sha512-zggOxiFvIPVQpPSXtbRB19PPy4aBRNhidizqxjM7x2BLfoUHPygPve/ehSHNjqDMvtTvwCXcEDAaxQETNOHrEA==","signatures":[{"sig":"MEUCIQCC7BOMrAJzza8ieUtKB9b1VHBzPeX61yBNaQ/UGY+1gAIgdlQeGiULzUvBdzzlXNS0J5H8BBVOpv3FbYKc3O2o8cQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2493817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffVNyCRA9TVsSAnZWagAALQ0P/3csnn6Syke0ED60u5VX\nT3xf7Co0q1+9PJZf7961vpBeosDDa28Y2bYisgHp9CIcGCe9Qb3XJWwmMSfJ\nWRiFZ2AnrYj+GjMMhY973rVlDv+C7i6jx6E+WdEFIux8xesQl/WqSD81nnaA\nm0/KxZYqHx0dXPNrWve4LbxpLR2ezgNSGMHNQmxnpJM6ImQbj6lvbdZ80C1i\n3b2G7gz7I+UYdxbiHyb3Cj0uXZZdWitiyKMP2B2Dn1VGEp1tFqebEiHPTm/B\nrRQilqSqshTudaePRwDJS0dJeXw3u8UIs4p54VrUKvjYJAW8nHEuj3Lod72N\nTQFOEbWV+fwWKMn/EfaKXVWPdrNK7vwXwHguTy0nfo3PKN7P1rU/oPwDavHE\narf+HxClgQFeTMP2/1xc0xYMlOg0bMYW6MMgSwU65+2SHT/oeFosPg/+YmMh\ns34zsWd+y3jl/BrwxRWXU5QioI42Bya61ZBXYeu08LS3icHEUsOwE0HWWVPi\nwxoVq2tr2ug34Pxv7Do/WfPrEiSzufHPIy5Fqwtme0u4oJ2eLd8AvhGhksil\n74dw2yIi/p1KpNgUAv5nmhTV2gMoUMR1UcIv4IRAlwDzBI4DfwR5QVJX5l+Y\n6qZ0d8jJ6vqVyKd1lSNcDGwHoI5zbzUk25BNmAGT1lZuLyKGf/L1aONztP2j\nGLvo\r\n=teJd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Modify the contents of \"test/testEnv.json\" appropriately before performing the test.\n\nYou can perform unit test with the command below.\n\n```bash\n$ npm run test\n```\n\nIn addition, the integration test, which is actually connected to KAS, can be executed through the command below.\n\n```bash\n$ npm run intTest\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initXXXAPI` function as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\ncaver.initNodeAPI('https://node-api.dev.klaytn.com/v1/klaytn', chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to initialize for tokenHistory, wallet, and anchor api. To initialize each api service, a separate url path must be given.\n\n```javascript\ncaver.initTokenHistoryAPI('https://th-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.initWalletAPI('https://wallet-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\ncaver.initAnchorAPI('https://anchor-api.dev.klaytn.com', chainId, accessKeyId, secretAccessKey)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"037e945ca00b63535280ff55976eed778e10045a","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.5_1602048881524_0.5162329518421143","host":"s3://npm-registry-packages"}},"1.0.0-rc.6":{"name":"caver-js-ext-kas","version":"1.0.0-rc.6","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.6","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"cb2ca88f142a5d07b2e6a1b416361f6209a08183","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.6.tgz","fileCount":148,"integrity":"sha512-kbtn19Gkt+T3Z2lipiv+oFDaxtKKL0mt/7jHFuda9U3ro82jZdVzawpnzd0vGRiY+kMekWpA0nTu2diRGX6y7w==","signatures":[{"sig":"MEUCIDUvJ28DTCZFGoTaWIDMAe1EJ1SC0bOYNBCD3h5ZCywXAiEAvQCrWMk9lh4GPAopB1iqHoXeMX6jNwfY/s7Vkwv5Wtw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2495221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfg8+zCRA9TVsSAnZWagAAKBIP/0g9E+XoLKoD9hmBra6a\nm++KYUAdMHgcZQH3x/kLkmAYVxTMVVziqlsr1TxfPcNMBSA0P3WKFWdHRm1x\nBeqgXuW9GIuPdOVHPvLo6rqQ32It0t2w2i8rPVZtyy/R8XxleV4gfsJr0Lqi\n1gA0OFO6HMPij9Th8bSNK/TIIaxz+ViL01tS/tFrxI7b9m1ztu5isVnbGUo6\ni25A1oDt7OLeHa9PLNe6FqWyNoU6ZVC/fxpoZhXTYdcC5OQwFww26dBowK3l\nKYJJ/19ccLrDlAhNlrCo0BYd+6u6JVaYuJThhQwMRXQoVOcB90M3Jj4W9k69\nbmuQZR0YyLmxh7fQK/R1B4uAM1bITXOhLEYLFwlKSVdiW7eA/e/UF6plmlEh\nyZ5UQQy8X0yAPUfr8gQ5fzr/0zvLJ+vUb6x+SARiqhfMsDMmS0ZQmxBsVzMN\n+H7sZGUX413LyJbS+cYntzzqRvsKcGdaktEmxNfh4357qSC9uZkWyvIhYT4f\n/gI/GTnV86FZXw9t56uSz6+oOy1gPUa5prLnaJEWezfYiNijfNRj5738Mst4\nZGTV5FZupt+7GeOWNpBoG3VfCPu5fTwblQJzuAwIyrF2Ketz8jDy4fPM5ofD\nmcAJMnEpqt/89c8blcVLwRDVsLBGCLVHsLFBYmQZzvMtfQfqfwzD2scwkmJZ\nqI0B\r\n=S8s9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Modify the contents of \"test/testEnv.json\" appropriately before performing the test.\n\nYou can perform unit test with the command below.\n\n```bash\n$ npm run test\n```\n\nIn addition, the integration test, which is actually connected to KAS, can be executed through the command below.\n\n```bash\n$ npm run intTest\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initKASAPI` function as shown below. This function sets the authentication key used by the node api, token history api, wallet api and anchor api at once.\n\n```javascript\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, and anchor api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"acb839805b07757faa0b73a0a5206bcddab39eed","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.6_1602473906442_0.02958940910226948","host":"s3://npm-registry-packages"}},"1.0.0-rc.7":{"name":"caver-js-ext-kas","version":"1.0.0-rc.7","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0-rc.7","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"8baa93ab0d86b9b15c4a0392e16da364194adcf5","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0-rc.7.tgz","fileCount":149,"integrity":"sha512-C6OXU00+7BrFvjSkCIiC37KWDWdrU/JYOQqnqeTpQX4Vt7X1tvndeRPHQ7HQGbVAArtxKCiijmzO6xyf3ff4mw==","signatures":[{"sig":"MEQCIH564NV9ZYAAHAqfSlZ6TekvlUBVAAKBjY6ytZTXLmTHAiBYETk9S7x1DzLxm0eH5TaXjtWT5yhfvxe+9E53LwTO8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2501697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh5KWCRA9TVsSAnZWagAAGnUP/3YUpvFGIILrQUbEHSpu\nTH7wYYGRNyGYjSkHCvjx/LyjuH7MHA1hNbbfxcpuBgMm5G1bn3pVo9TGQevv\nBCivpnxElt0nPxNgHt5mbMimnEBk8xn0ApwoZvQUh1c+OGv9fy9oPFMq5XV6\nMa9YD331CC/xj8LO9UxUK2KmRT/Cv6AVjU63fSljBvbDTiDhEYU89zA0AVr7\nN7d3vgw53ioWbUYNwbntuOlkFEXQ2wh9XTBL7vcDGkYMRQLEeiTVjU3Pealx\nf6IPVnPrK9i/d6od67kqeLiLzOZgfwIfjLMG1X0H7JIToMymUxTLhmkr4MPS\n0eA37FiEZ10Gzn+sZwEFOB2rTQM8x7ImLcuOvVW+jSyClGRaOTjhSEYSNxoJ\nVEkwv2zci91KqbAyC+8qeaqP5CDe58dSgZ2BNpJdbjVskMMrXXStiH8+2zlS\n5qn76g7q7GdytH6aMmlsd+/jyxLypeZENtG9RtFu7G9cTaQD4N/Vrj3FSo0h\n4U3rdBwQ77mJIDA0dyioC9PkxdJf4UzJDnIXZBBILTG6umfy/TzZxnWR8Pg8\noBRJgdrSMK7anNj3fUMGKJn4gvizJ4tSPRd+4l8TwKfN26JN9txuwrEBjDrr\nMmCaEPpz3Ko007qRvZAlNaO0mR2+eVb7i+kSYHf0ISnZtRq5twvJQQFrIQAw\nliYL\r\n=/HzE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Modify the contents of \"test/testEnv.json\" appropriately before performing the test.\n\nYou can perform unit test with the command below.\n\n```bash\n$ npm run test\n```\n\nIn addition, the integration test, which is actually connected to KAS, can be executed through the command below.\n\n```bash\n$ npm run intTest\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initKASAPI` function as shown below. This function sets the authentication key used by the node api, token history api, wallet api and anchor api at once.\n\n```javascript\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, and anchor api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"4ce8063294d34876865eddbae3c09de341426fa5","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0-rc.7_1602720405898_0.08584581077444642","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"caver-js-ext-kas","version":"1.0.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.0","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"b80d49ce6c6b20d86b56e2a3aa08122bd6577535","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.0.tgz","fileCount":149,"integrity":"sha512-Ai/+AGwKM+zLmB4/PITe2WVjhx+elDhtdq3OhWC7QYRINNkVMI+5qRaFnqFGXCUZunqwZ5guTtlv7gq1GkZj1g==","signatures":[{"sig":"MEUCIF63MJItPM/QpcoIa2MXzPeNEyirJ807goxy0HQ2istgAiEAvQimFbYIjeRl7AKBkcvbN9oPzrm4Mabhg8vE4SZq+7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2501691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh5aHCRA9TVsSAnZWagAAH4kP/15i/fhCOTLYTVV+PKbN\nToIJoLoFLeuVEXewz4inV1cJupH5Xlk7qMVShPu2aOkXhwZp5wQwe3lvgUXd\nzpvreJlkHE+Jt1xmx00vIBpurT+cG4wNclGLVgpd9v/GHYv+0wMUK3vkRwpE\nyloweoSOObZSU/Bqg4QFYeBnxCtCmPvHkeiIEpyFgilCpdcgQNOdf/Ul+LCI\n2/A1oUDuvl5TPg+UsLTi8XY4FXjKM6tmUdCDXjFreANf6F4p9100GojHha5s\nGbA09E95MIRzgxqSfAGXfNOZELS/IXH2XUaz9koagiTMQu+MgIv8LJQSb9Wf\ntEDtXEyUK/mO2ajq8XxrZZIeLmNjiFfkjfU5ttAk7bvuHQUj+yarCgppeIcb\nh4194v1YuTYHWC77wsVT9sJalWG/VSPEtd3XBhO1Ixkka+6XCXlcXelMEPQu\nVhPQ3nvHp/JONNt5hg394ELB3Se0NiYqjzlFA7sPKF5e+J2WOY/aoe2i6rbo\nCjk6ta4izEejrGZAEsBgyl09XSv8uj2jUr/nXumhLS8wPcX1OOu8NkEVkPEN\nhZ9UnbFnDWCm7MYnv9xo3r/T+bJB0w7uPKOOrjq6BflTg1svcFsUVFOqOLiW\nZ43y6bwj/e6V7wWeg79uFIhU520Jb1dKtcNgaOni1zDsdttqppbNAi6pcARU\nZKZb\r\n=X588\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","babel":{"presets":["@babel/env"]},"gitHead":"4bde9f220d1ad47273d09e073318c95e0282f48e","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","build":"webpack --mode production --entry ./webpack.js  --output dist/caver-js-ext-kas.min.js","intTest":"mocha ./test/intTest/*.js","lintFix":"eslint './**/*.js' --fix"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","mocha":"^8.1.3","sinon":"^9.0.3","eslint":"^6.5.1","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.0_1602721414556_0.046888642287854054","host":"s3://npm-registry-packages"}},"1.0.1-rc.1":{"name":"caver-js-ext-kas","version":"1.0.1-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.1-rc.1","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"3091391b0d4e2eb7adab1c476c4c302612721cb6","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.1-rc.1.tgz","fileCount":153,"integrity":"sha512-uk5AE3VkGRmjlHYVSNwZhp15tJcrSPDheHiD+RJ2uB9CSDYvbTtWOgkhrl+ubJhqTt7bl/VUA7Zv5JLhhxEUrA==","signatures":[{"sig":"MEYCIQDRnReelubUdNV1CcpsMjSACgQ7VZmN3VsFNBn7rEpZawIhAKiT9EeT7rqsVhxFItVxeEtrTcCXOZVta0y4qLlBIfqr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2471340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqkVICRA9TVsSAnZWagAAr8kP/0nMaanIASybwAS3qa4/\nkB2Xim2TScIxWl+R6ie11LOOaT2nDSwKJ8k7LFa4YItbRBlMiMLs1dbWemv/\nv91qcRRP5I5zK7KlNpzqDuaYk2zCCHYRPIiBNNp7vpMxVahlgRwIImYvT1bu\nAhF0AzO4qiyUFeva5E54c6GhQVmEvUaniqb19xuprv052MBHFtMvkcd1Cg1X\nnb0n2FQnDu1sZxFh+u1HAoWbEC8Td/1L8wp1b/Ug9NCAeM1hkK1uhHkBKeck\n1/CiNEDV+UEIyx4XoN0NPjH4rxpfINPIftsMgj90tb3DU2CA/MID4Bu0abZB\nQD5NZx4VkiE+MTvx8bOID7btMIzBFpsyO7ZCWLHxAmLK2CZHt0aAs2fWMKvo\nWdiXvnTo4lM+2g/mBu5KB4zlDoq1ypadh57uqFNIVtFYLONyL8a68KhIxNEx\nE7/2e/v8Sis41uqvOn7u6dewtd1r313W6113Jbq1S0ZkQi9Z8RiHnkmH65KU\nxXV81qFYj473YPSzejcqevW8216ftphk0xosmhrQBwsuEgGraLWJPZzQpsYk\nH1LxTbv6IumG2JDu8/VO19jq7BNJ4TrAbIbFueWwT4yFGRmWpYKk2xzQ2Wcm\nZIB3Z7Wn7svKzvisay5ajEh3pHLzA4POM8a2Ndx5DRaIeSQZJIClMxI8L6uy\nIMcA\r\n=TJbP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initKASAPI` function as shown below. This function sets the authentication key used by the node api, token history api, wallet api and anchor api at once.\n\n```javascript\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, and anchor api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n","gitHead":"504dea9f4a58ea9e9c5406523cc69aeae180c521","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.1-rc.1_1604994375817_0.1015582621165092","host":"s3://npm-registry-packages"}},"1.0.1-rc.2":{"name":"caver-js-ext-kas","version":"1.0.1-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.1-rc.2","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"c3fcd25e0b04981bc8b1048e5cf8cc4c8793e18f","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.1-rc.2.tgz","fileCount":153,"integrity":"sha512-Amctm2LYX4/UqrKUbXkX4Sk6Y3F3ws5Tl2gS9wf015uvoP9Jj/7RgX6hDxGPtudTuXyVMMzYZnZylCW+vdXqsA==","signatures":[{"sig":"MEUCIGizXY1X1KZaKBbaHJ6wpgEUOv/O4f1jhqloaM+TbbJ7AiEA4+JwA7YDLfi8DnCXUNDKsOqF9aTwjlBPf7gwGDjMK1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2471457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrOyRCRA9TVsSAnZWagAAyxkQAJiwsLCJzCLhCs7plHUg\nXCQ/vn9gPXiOa7vHwqLzIZpgTdhNBcZ1gcksH1L2uwehLobhM+O6PKCfHWC6\nFUmh/f1tc5zZVk/4sIFo3tBfFOVjQ5EiTyg6tJBTTCl0d/B4qenaI0jcbxRc\nxYLb9RmcTDEqEZA1+sw82vCsmXmKF8i53qKp/4FuC75zBnzogXax13l+fbUc\nfJb07g3x4nI33ZYpRIlrTpbqPq/PB5wcCD4z0UVSSiXR6gue+f2HjucfR2Os\nDmZ36InFJGZEnkZp9sFA/8yE4X1SxGIVm7CKcRxMY13zSCViO/DTiWAKZK57\noS9DIDPJUOC14YnR/mntB9JMK5e264V9qTkc0ud4cObfCEgdUeZ+Jqgkaa64\nOOuVbmUG1E7ofaxLnZCSpvii3nAiNvyegbJtT9hSPs77jiz08CrrwmpGpVNH\nFCLikBNkK7d2y7OuCs7wx0zVBv727dR9VIRY7mMBys6SLKt6PlUS2T7u6wK2\n4PtOiUNCauSA1ugAHOxLPnJXdKnEHuOs5bnVGeFQdReTf/Nv4CJ5G8mJenta\nTW+Fol9rzx124FQxX84MSvu+16ul1q+LLI9KwLo5/n4NtEW6s466eM0y6j+D\nVU7RWBFsl6pvYhLwZuocIWEjSPKgA7zmwpQQWnULg5nADcsOkrpyX/tvOjeb\nqNcL\r\n=n7th\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `caver.initKASAPI` function as shown below. This function sets the authentication key used by the node api, token history api, wallet api and anchor api at once.\n\n```javascript\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, and anchor api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"180f61dab0b0eaf24e7a5163c18498a8956366a0","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.1-rc.2_1605168273183_0.20480306126803982","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"caver-js-ext-kas","version":"1.0.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.1","maintainers":[{"name":"jimni1222","email":"wlalsdlwwkd@gmail.com"},{"name":"jaydenhur","email":"jayden.hur@groundx.xyz"},{"name":"gx-tech","email":"team.devops+gxtech@groundx.xyz"},{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"d18f6ca76ac998034c2d0d099629ba1f1f47a9e8","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.1.tgz","fileCount":153,"integrity":"sha512-KIr5BQBpDeTjobBeGj1ZtM6T1NtQeJNNQhFIUldO2BieJDPmJKthKO6G6wmHeCbItbLmfHLPqRf8eaHwRHyjTQ==","signatures":[{"sig":"MEUCIQDMJqcR2k2A3UXarWHNhAR+zuXkKkGo82Rcc9mcv2Kc3QIgOEm7UAtAMSdFhmts1t2COTAIch8LYaoLp1xzJFTcbPg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2471452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrha0CRA9TVsSAnZWagAAD50P/iIExXfCk+Lg8aF4kjPi\n/xaZ1T9NmAxIqDhbemWEu54Zxx5EpN+NYcc1UiXSti2QhQV5os5mL9QItgNX\nki6S/Tj8BJl5DCYNjHYdfptr97GfMnU+WK5t0cris/99dxsZ4OeBzMeA8eru\nTiiRM1tcW0iz9GjvZh5Fkj5IuVuy/u8uItSh2DQHuh0rFwML5fYD78E2XZ0h\ns4ddR483rV3YUJYMUqu/9zugDKZIJLrlQnNvUQXHip/FclNDcbdU7h+XWA+M\nV0/HKUnuiH/ApcTFGJGT8OC9nEOxITwkzf5Xg3pUBDcV21v+EchIaFFzFND1\nedD+7tlJUFxaPzkCcRwbiaohJZjZ2EEqGPKRLwAcboTyaVVOMu3VjqNhx5DH\nVF+FVK4mqAPSpyk0hBXjw8ZozBcQSqORSOcaIJI80nHlvNKqjRA2kFeS8Cfh\nYr61LMEdWc2KIMIv57VH7qP4yPJ/Ah6i2btGDyCjLlUw6+r7fcjDkrwj2yT9\nRcczSQYfaSwdyrbPOWMbXJZcO1YHj3iykogdBmumg+P8YvIe8UR67/ZuzBvo\no/14e5j5BQIprAozSbozsLTu6GSh1ukq4HolAZvH+eCrEwuuEBDmqo+0AKg2\n3yGNp9/VeHVy9aVn+q4YwK0Tt5isxSPiWv00fVtvObo0UJDJJP72oVKJ2IUO\nvqZd\r\n=+MmQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"f7f8f46e792ac9eb3656d37eeba6cf02525b0712","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.2-rc.5","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.1_1605244595602_0.2905600924208418","host":"s3://npm-registry-packages"}},"1.0.2-rc.1":{"name":"caver-js-ext-kas","version":"1.0.2-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.2-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"05a1ee511253a0828727259dbf41e3a9b7db6656","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.2-rc.1.tgz","fileCount":165,"integrity":"sha512-NU+xyhjJzoN5so0EWmbdrcIVPeilY9GXHr7USUzifSC+FnPo8oTm2VJje4SX2cEEz3oVTx/0nBwadmDB7RfX5g==","signatures":[{"sig":"MEYCIQDFBr/uupli6+EMlZNmQDpuJvbhsSnUPE4CpwscxPF01AIhAMnZ0UP8ewTnNW0dKxz9CLS5orPqHgV7SfIr3lakZ75b","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2741237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2au0CRA9TVsSAnZWagAANm0P/jo1Ep53l9mvYOj0Eks8\nRgmkHBViMZpjM85ty3+KxKV8vwGfsX9zJ0iE7fSvO2QsI1+TgCELLOHR4k0B\nVH9v2UWxoU/6mHQWJcaOOqW0zrNUBKiSPOkRif8kBa+zZ/mpMX7kwIFuh+IN\nRnLDkEsUKUOSgk3F0brkNGW5BODzrt77TkBv8JVO0mjDr3KDFr9a6SBa1f6u\nUE7aYEdcBqUlElMdEhGTBG7uQg5KkN1gUgQSXnh6hpxComo3lE5Tssp5ICAH\naTziUFl/wUn6Aek+YZDtx2ONiqnp+Kb/oRREeHdbAkPFsFCvGZVXFxaw/yhu\n5uX6alFTgTsaxxbzIjk4QFoAYmAKZs2H2ocaU0Jg2aSNdrcXo39jIdKVFdqz\nXe/DGqSngXlUOfeJexeV7JCVM+Ft1XmIHhUQCYWxMsB/J5ZycwmIHrBB77lV\nouTtjHfqODGGdVVIYqnNsuuYLAILa9xw6DXX4DaXm0Pvg7kul4ps9tQU1IsZ\nGjcaaDxp6OSoEYLiRfTOHD7eKwhnGwLu24Tn6ddaCZTDSIGR/QdkCxf0l5Dv\nlabONq0B2e/GcRJnwR1gs+LrYhoDKQNfnWSTVBYriFkvsZtsTLVGWDIMkCbV\nLoL/SOSn0Fq/hRudoI+4QWnNhekia8sSgQQPees2eqo6ZyL3JEpY0R0M3ii/\nAC5A\r\n=ytBi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, and Anchor API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api and anchor api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, and anchor api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"ebf301f90076d83ffe906f1094d98787fde565bf","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.2-rc.1_1608100788156_0.7692799585115149","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"caver-js-ext-kas","version":"1.0.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.0.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"c0574a71f02da356d19fee3f919677a65d1d5ae4","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.0.2.tgz","fileCount":165,"integrity":"sha512-RG8RIb80HakJLoU73TVx5SfpdFU3Uz0EOaCEE1Jf1pAtZ9RKVLVlHnDuZ8AsSG6udHSvfR44pa6Tu4XEIfiqfg==","signatures":[{"sig":"MEUCIC95PyFeYcklF4kwtcJrIOgx5D6ozNXJM1TO34BxJbHqAiEAkVGbQehfemOfycaO7D4iiPDz6s38yEDqFGbnoISTJr0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2741232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4pQeCRA9TVsSAnZWagAAomQP/0FjbjX1iEIPULW84NaJ\nJtz8IFf1so+lVfcnx1+J/V1lE9t4Pg/OFQ2jteESTsCtTyRrkF/BFvQ+kC5g\nGo2sJJJWwEdWJh7rPbMrdLXKdOvYEpRS21jMF1FLmhupb/4L9ICQ4vEsYCiz\n6PPc7BgiOck4ZV6n8KyPikmdZ2ehPdcKp2TaXl8s8EOmweBpjwdDrgpgJJyB\nc8vmSYKOPaIU0/4dTTNmKUAabWR+jN9ixABAGY4/sDyFTpPvtFTUxt8nUEtM\n/20wqXY8Xp39dQdtqNs/xTtMPTw0JcV3c/DK9P6sJtAEsP33TmX3IlVI2kGI\nq47vHWGDY09GSyX2lGqK3BIwp9lJWElgN1alaZcQnKk+XQue/DRs/MMJ7nLU\nS0LHPlSXfPJDKrgzaOJhz/6YdeLKoMxV0rC2CvZX3eTRjxzNAU9d7kO4exYi\nR/nz1nDhNrqgCSoAfApx0YfoP3N2ihG144lKIMo/jctgBh9KKTMAbtKXrKQS\ng/R97N3Cm6ktn86HrRP3M4+zmqgKAFbCU7PJRoYIzW7oNf2MDMCLd8iou/dl\nKeLzxajvDwUsuhClkbCGum5dmt2zyifQfvXWcCiOVhJb9cq7vGRRlTO2h87G\nNoVHrWQNaymvFmHFRNtVvSRP7v1CbPnOYzlDzkTswv0g7R1/XLjG9tYPh3dZ\neNhX\r\n=yVIv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"f8544f48a080d6d4ebd9a4e08c06bca923feac5e","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.0.2_1608684573617_0.9242017264959486","host":"s3://npm-registry-packages"}},"1.1.0-rc.1":{"name":"caver-js-ext-kas","version":"1.1.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"fe6961670b881190ba3b049c1c4fa4c4c1ca48bb","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.0-rc.1.tgz","fileCount":208,"integrity":"sha512-VCzGHwpDvyeiUb6MvB/k51cs0o4CrEf/ILaD9LuNMjdT3cZtBqie9u4cEnMbfu2xbC/Ho7Mr9UMOU4+2EuyaXQ==","signatures":[{"sig":"MEQCIAJavwe9Fsfh1PNPwGy4sg3wJcA3ZJ7YnraeGxFSzoIXAiAZ+DYVfauwLxhelFNGW6AVLPpXM/Oay02HxN111FInlA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3484991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEhhtCRA9TVsSAnZWagAAUvcP/iR+Tzp/KsmRFO/GVDTt\n/d2uarT46Zj3glyHozb+orfGWKU2LGunhPBUBpzYFH14fFq0iyBTEjX992I3\nvS+iEfZCHZDgsFMLUJyB7k6pBKxrvtZbDasGF7yE9tT0+Xjyk54UWsKvXnRD\nX3hRL2mc1cAAZ4Ytdt30nHGG3LUZgCoKuXLaDgotSRfL/+bWtix56Z5MwEth\nR9/7Y/k4jaqYI/ay390rhi7uAWIlDDsMIm2vwTNJvweezuH4AfKElkLdnVqH\nsAzDC5IIk6GrdGkJZPvTQAhIua1EzuNT1d5I4NcTolAbYQs9OVsaDj/TJ72E\nAwnzN9al8p/lSl1kTkyY9z1LQdiQonGCKRON7qlQGGO+XqL+/6YsBtctXrqW\nDVmSfua69BkHKm8ihoTtzpvNdXBWjVELY72qTLjQFNq/bGrLimcF62u984s1\niSM4y+bxZsrv6xHNCIYLme43CxP9ytWR4hbOjWy5Dr5DKHWDYrD7PU3lEEP7\nf8BOXgMwPWxuLpNpXRZk4FzNayDL4m3ToSTZG0cMN1TMdPArymxIhJCsZ6hH\nDLHpmIPVg4vwOaXDSvETojl3tbgqMRaYeqjfyueoq2aP88Ig54fqQuB6F38l\ngHGd8b24htzUUn3+5AwPTR9ilpbrlaWO+CWMBeogLxP+kKgckonXUobN9xVc\ndErO\r\n=YLe/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"0a3f574e36dc565f7e42e1b91d10b82ec9c00e1c","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.0-rc.1_1611798636803_0.07122547614330799","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"caver-js-ext-kas","version":"1.1.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"b7bd8ac5a0deafb902247ec7d000c73cc1c5c65a","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.0.tgz","fileCount":208,"integrity":"sha512-qRLLcKTIHrgqg//6Qv+KlalfxU6RqWKjvMuwUO+prL+JRhT6blRG9F2+BLjgwzmFjhaAoE9Njje2EMuPImsNGQ==","signatures":[{"sig":"MEQCIH8tO44zgiiVU4si/lj7GOJv0af5N9jGSfic/PTz2x6tAiA3xkORi8sx9vcy13lliUmMHS5HSvLuM0RBlljdKD1V4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3484986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE1juCRA9TVsSAnZWagAAFCkP/AxzMa33lG/IayFPahCn\nyKnyc9bHAvpkRcmXeaFxWhF5FRB0XL0gz8F5Y+8RW8fzydFF2BWQ/x+TA9wv\n4bUz9lSCwaSJyXXBGTFxdOkPG3XctppTBV6eNpGADKZg9bv5lwsPUW6eNZPF\nZmMoL/som0hAv4csJZm2R3DWbLRzsg1s3Jb9jclNA6SjESq5IZt/mP7fTnfm\n7QiTDB1Ipu0eGzSj4zcz7tbtioRHN2D/lIBoVSNIBzyy4Uhy2gtjZl3knyQM\n5oc2dzoQyLrenNIlsrw+lv1Zx0rRhnmCF/oL/grOtjJ1uweInwEfjdb9zufL\n6JbqsP+smW3CjTcmal+Qu8PZDwj/l6xE8A1N8vgXc20lltMEQHFrU0tfWv9+\n+TPRFuqlP/IyZ3mgPJUxI2X3lWf98tHvd2prxMqUPUs3UyvGn5t5R4HcsC9n\nIxEUoDYAqkQYmKhjtWynUHiYSZmfGVWXXehInDsJMLT6kI/objd2La9RLM3s\nMprzZVnBViOO+mM7QsdjNQCdyNjSd4sIRXHEDtpCNBB6Xda+RqIATIbC4KRE\n1+P+NNhQo9A71r6tA4f8KUL1JxR3SA4o2CIn+W/5HhETC0RqH0Ws0uf30hCg\nJa0oClxQOnUDExexS57EuUXZ49LyOClvHy9XYpccznoCDOQ3+WxctfVMGy2A\nKnUO\r\n=kof+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"ac4806644db31762400f3a8fd5665953d3b47deb","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.0_1611880685382_0.47130290649539286","host":"s3://npm-registry-packages"}},"1.1.1-rc.1":{"name":"caver-js-ext-kas","version":"1.1.1-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.1-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"1f1407c6f61ff797b54903b58c602910ed13e845","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.1-rc.1.tgz","fileCount":207,"integrity":"sha512-8lCFx4h05Q1I78WCGztF+Iz6KKBCROrtXv4AI67G1YK2x4oq6J3hwqfLVLQyH18lkjPRCjvyFNnk/3zfFvDvWw==","signatures":[{"sig":"MEUCIQDa3WQcNcjKHRk3JgMi0QCPbBj7W66pd0xvRkyCp98ErAIgWbp9YsucMEq8vL1dGy36987SnpWUxDmoKY1Y4fvC2T0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIIQOCRA9TVsSAnZWagAAdgUP/RbIUN3R57ckx5Gwm3iH\nAR4iP7AtyKi7GtTvRIjAA/REv+9knlZoHKqJ6AtBFlmYKmA9DBbFZ3K1IWd9\nf9UqE4l7/Y24py3NXdjn0XrXkoBGCHCkZ07wLo6DGORDQwdueDNTgejprIgT\nBTC/BGislYVWQlOiBpO28AOEq98QUMokCpZJbDCkoKm4Wc8OTX9AxGqMxjx3\nKFZMfEAnoSVPLTbf0Pc1JK8AAqvI+PydU/9xBlAwblKvyN35CWX4twZaqEp1\neEWnBowGp3A77g7lZNYYgHhFQ8pJhiGRmU+BxenC+Luo2mRQgL9/+cdrqmMr\nLde8W1otOilDwn+j9/IAVEdKiKIBG9wshbAasCin8Y5vq4aKxWDKPm1krjJb\nEAd/hbZ0YU2AwdMo2QjNesVVsuFHqymqwKLv7IuM2fTWdETFNyriswPFywUe\n8Bhgm19j3l3WOVKW3gldXteQ+QWAk7zH1klOT3Bz8/EgRhvkGBKTcS9kJhVv\n1wv7Y4FH4rqhf1i/GwJZUnTohA53K/CMSRdpsH24fKYmxhkLRMdqQXYPyqFR\nSyAVzL+7m0X/akkUOeSdhZvcsEXivA9yE71CAt6coKLAw4IyJFq/sSk8uQ1f\nNURM2+oHddJiMNpIT+TqMW8/oy/ApI/j+k8LyeG64fTsUUiow+w8nPm4f1jH\n1hxM\r\n=FfnT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"51d10a8eb2b3f19f3b49a64ac78c2f26675ebbe4","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.1-rc.1_1612743694073_0.2291210321091146","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"caver-js-ext-kas","version":"1.1.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"0ec301e8978031d196076c9aeff2bab6caa9a0d8","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.1.tgz","fileCount":207,"integrity":"sha512-Jd7rGE7c5yXlFQK4zx53JKQ8vZZgJWbykKqMkI4Prv09VLssUoiTP6cD5OBMCloIVxgNFOOBQXOW53LAnxEH+g==","signatures":[{"sig":"MEQCIEq0BWc3aHWHP1y1uz9lZUuqdGKcPEpsC02OsNfM2qJZAiBfbN1c89KMImdP8MiTtyW8nkPjTsb6cAW9IkoMD18ZDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIIiMCRA9TVsSAnZWagAA2eAQAJw3H4WH3kKVxAP585LK\naE2Gvl5lUiTrSf+yC+puNwUgSy8OSqEI4/fymVvx7stCdH9uHpP7yQgQkMt2\nAXzEkby54lwj6kiMiAW/57O430GiiPzxq8tvh1itnioIy2RT7Yvt7xqkWemk\nuRL8tZxDhJ+TIo9DPiOJiYxRVvrincXS5Tgb2GcpFVwzM9lXXMk85Dj181Dq\nYiMQn0SuJJ9Y5blV3Inznhg9GTrjoWSLqP0RYEE5eapwICrIJY4yW5XAhf2m\nBfTBNObwJ0CC8BOWpm9cv3mK7gI7sEXNmstVg0x7lnjqE8iakdhG1lJV1QIo\nQmD3nHD1sNR31DTCNE/ZbaAyBpxmxv/dKljkd+3IoS9bsJ5m32+4zPvI5E0K\nsjLdUnCaexG3SdeQiRyY/I8MPsq028R1N7we+2u7pcY4LzwxVjidtqx7Y10u\n0Ua/ZX5AvY4oqdmgyR/fPKanDYB56TWlidFlakFxEBFT/UMFaJSax8wHOmwJ\nfRrZf6kwmTssaZ5FHopxwgzD/a3XAQonrNLRVKvNoolPKgPko9H1HYwG0wOr\nNu6dPXLBijvw3lExEzyD/L/XZVuECwFwgLKoVsDUHsC9rEj8BJNL/P5GDRSl\npzPHvp5ke5Htx9Hxeu/RXhHlr4y98AnNs3EemWf2ICB/Vghqd/8Km+mtphjj\n3IGA\r\n=AZTo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"78082eb813188b64fbcb5412a9a88b62a51ea74d","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestDev":"npm run unitTest --testEnv=dev ","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.5.6-rc.6","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.1_1612744843534_0.8896866868726769","host":"s3://npm-registry-packages"}},"1.1.2-rc.1":{"name":"caver-js-ext-kas","version":"1.1.2-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"a287f688bc6b9f2d1e1855384945df947218981e","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2-rc.1.tgz","fileCount":207,"integrity":"sha512-tFWMjJIJjzmouLSyNaWW5tqzpDJ9dHUluMMfYMRGz2mPGBPgKu2i3CX376s73DI5l03txb7vXrUU4wruACB6bw==","signatures":[{"sig":"MEUCIQDyQEWhHgS/2pHDtqu1MPd0dN5XpoqDOZ9dlLqVmU8SugIgBvs8R9aL+r6r45OG1KDB2T5vP9WEjViLr+kWDdgDie4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYSAnCRA9TVsSAnZWagAAyPsP/jbqoQEMF7zBCRX+A31i\neDpyiu1jLFhYcMmqtliQ9Zu6Q+WWWKd2donsRRg8TtTBLj0ejKo4p7Hob45K\nptN1UHduwF4B5Bhb5V8r2nQvetyn3w4QYGTBTLTx4s7XrTZ8lzpP0ipsufWv\nGRFwDajJz6TWkZFsNoi4P9MQFRRnhkWLd8C7jIyNKGAk3N0/lsrMMGMHOe4N\ntA5jN34DAbbQX7TEtb8lglRki5pnziwa+vUp4EPAK03sRwzQ92Rkp5nKZh8p\nTpCe64h7P2Y+wozqUQVZlKC9t1LfuRiaBwMPCvNa92yrIzORl4y4GXKQHBzb\nbkMxyF4jICfvQlm4EVUN+AV9DjrUEb+TfpsDxDkAH1VsfcGk1iuyKaHVzbSD\nLF1zTkF6W26+L/4UVZorq6lOraA79m9BNKTsjEv8f6xWFlO1kOL4+LKve6l7\nIHJ22EEsWlDPDa2LaPAcE0j37qCxsLUZiBPVbZHkU7jRg/IbVsulatmTv7Xs\nrD2ozkrosMH3nKsJ6gPIhzNAmR2dT+EWL8qw3LZTjAjjcC5Q4wjMDSL8RXPA\nIbNV3bxmuVJKBHh9b1Fw+6nYNpFxFn+sEYJRWB1utNdEmgXCzGvQ9JTu8vKJ\nelmPIsTTcxQELZfW+UgKRg/N3564n0dZZ7JcBzkoFoQRhpTUbHQu2PQ+Er32\nnZhX\r\n=9UVx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"863104e927e083255f1b01e0612ed5427b8ccf0a","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2-rc.1_1616977958776_0.18336784737234235","host":"s3://npm-registry-packages"}},"1.1.2-rc.2":{"name":"caver-js-ext-kas","version":"1.1.2-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2-rc.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"c916bdc9fe43cb8765b673b4a1d3958b50a040f3","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2-rc.2.tgz","fileCount":207,"integrity":"sha512-c+N04scrTCUOO5CgtNSDZbTuUvMwHkbpeRUqvD5GSjVzuEBRnNxj2Fc9J5Zh89XgdySZ1MeVNzALFUKLCQw2NA==","signatures":[{"sig":"MEUCIQCPtnsqw4JSB9axZFtowW97jVH+LAierQEYQqezlcxlSQIgHyZjLSZv5NAcACawh+gDYcLqg7ib475Nv3lz5NeZl4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgasVLCRA9TVsSAnZWagAA5ycQAIazaU+3/PX40/+BfOCT\njwmubycO+2TPRNNdF4lqjzHipSnfREDblGvoaRm9shYGDnvL4lEiCO+i7QEC\n6HW2H07nnncfMzu3HVFRV+mhvwZ3WpdC07Tg5Xd8o5x35IrJgRLJ2XRZBz6a\nrdLtPAfiZSVKzgTe4qDUZ1/o4Tu8SIYROy5pcUJZNx21fla4xyPxgy6AtIVn\nxhL6pENFkBKV9Kw5NnM7u1/dFShNEypkSUhJKMymW79zv5A4pXX/f3zWrQvr\nrMgMqGcVGVjD56A92gmtn7SXNRg+6UGKuxXFBuv54+ovj/UgVRfI1IYHVhMO\n38fWe5ii7cErTJ87FYCM8EfS8LNCeCKRJMx2ol7201U6fP8/OTe0bAwzkGOm\nDS7/5jB437cpp4DnGczzNqJ4PTTqYguLM+erTOxh2867p9WTKinjExhEpiMk\npAPC1DBe53ECq52rf+7cUhnIm5i8XaYOBAKeXhXGaHBZjT9cNM2XCs3NCmat\nYMOC4ndECxkGyElguxJZPG9xS3K4l5VeH3Rm5H9FXlBNRgeZKVin/RmvO+JL\nAG1JL12q2zgWl9tmlCAzQ1fi5uOKXrqlcKTuO41H+aZHEQ6Ibob/my9KDs6+\nAMOe+wZOWHrZOZh09/avCTGZdVdXRsLfdA1TbXO8oK2B0YPKdcSQZLCXNX3y\n3xap\r\n=8EF1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"8d9e92f6e72f0e95736b4df4594ae76e8fba82ac","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2-rc.2_1617610058399_0.5022936579822157","host":"s3://npm-registry-packages"}},"1.1.2-rc.3":{"name":"caver-js-ext-kas","version":"1.1.2-rc.3","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2-rc.3","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"bf51af250319fa46ef174bd17576c5cadb79e737","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2-rc.3.tgz","fileCount":207,"integrity":"sha512-j7ISMQLXnsrNHcX2Greg0EUN1oaL27Bwwa3Zk806D3u8tqkTH7iegJa1qZo4vuaHXk/QujbZfz8gZv/XJn7pDQ==","signatures":[{"sig":"MEUCIEbUYR1XQSyunGjUQYGmrBKlq19bEEBaEwVk3uD4oUuiAiEA/f1hB7VDnA7iHHC+zzkywz+iJFdWs6J07NWXPrE1prg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgasihCRA9TVsSAnZWagAA/G0P/1H1t5dDEn6qlwXEYjWR\nbMkJPJBrV3L7t0nE1gCSjTwjO/6nrnAZbpxQUTzDYBGLLZQ3GMTzZDfhjmE1\n3Hv21wV8Kx8zrRRmpg/OmcilFyzig10uTd5HJ2mfrjvRpqGUqocW++KvOYln\nk5Y5sw+U7yIkFyxN5PYsMZz5T6qxqd9xwq07uGYsPDONeXWHBQeU57CF7uvl\nEtI5iukKReqQYB23pnUMTeWXNUYZhYAuhatooz00i2SmPe4NiBmZ/Q34u89g\nsJ9ZpWzfrxTztFW0qARjR942kPME80tslU3y4ZPq/gYCrqgC7//P3JVyBmOy\nbuiQpZvaRA/9MjZIUnHJIlGdvEU1N+RL6VehILLg5SF8u6xCo53uVDiyJ+80\n4QHLBf1jsF2qIU+GltYMn9Of0oaCbIEMpSdYqHniQ0BQbshN/SqwdCdTAo16\nTcQF7SFejfaxldLg216CJdbDbDQabKBP2DJz/TUKpwGPErNfrpTpHxelL+af\nGiY3NosD1v8MYKOumnML/YO+juPjEolhZ0C54dkMFNSgXbXR8V91lGr/WrAa\nl+rUpjcoJiKaM8ERweI0nWvn+DTjLBp3IZ1d5+EYYuaoOlMBFDKsfJgdCH04\n7pEqN/OESBG3eeDJhZtipv4iv+FZqDQEaHL7Wfd9IGabXW2i6YJTk0uKEIG2\noJ6N\r\n=sDTi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"4e90c2df16e44cfeada5c216db3df3f33c63aed4","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"mocha ./test/anchor/testAnchorAPI.js && mocha ./test/tokenHistory/testTokenHistoryAPI.js && mocha ./test/wallet/*.js && mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.4.1","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"10.15.3","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.2","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2-rc.3_1617610912498_0.808955969101216","host":"s3://npm-registry-packages"}},"1.1.2-rc.4":{"name":"caver-js-ext-kas","version":"1.1.2-rc.4","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2-rc.4","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"7a207ade7e2fe32f3cf1b0e21eb75f2a7eae0a6a","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2-rc.4.tgz","fileCount":207,"integrity":"sha512-utd9JTYzSh29rbj2vsge/Gvqk8OxyafMMSULEBPM3w1+vVSI8FhQroLI66lUSHvnPtCujD07AvD86l551U6ZuQ==","signatures":[{"sig":"MEUCIQDBMLTVNTFgmz4lO1Ai7F9lhLlykLbQhAFR3pO84pEP+QIgI/zW4Tlb+0Nr7aS8/X+3ZZoD2tm0kFHrHBJIrYLz75g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3430631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc5XZCRA9TVsSAnZWagAAowMP/3sp/DOVOn7Pnw4LLe/F\nnR/Wm2oZj2lrOhXRzUdX3Q6aOeJlypvhDs5UwwcKPxAx05zlz8bK9UJtR6FH\nmJeZi7DZ/ser02lJt+UI6ctVa7Lw20p6z/ueLQYmTR+RqkfJKIgPzNonJyPE\nk2YpiGTqeBF+K1APzC9ZgIF3JzhEM9+OKSy76sElPvqX88Mjgss7kuhLS+op\nvncimHpXz09yddhPl6eHDDgGxUNLtDJUz985wqdXybTEpXHJuXPmDODFkLac\n3e78XbvI5zaQgAUNBbD5C3IaCVPUDSYgIyAbaL1rLB9VDBKmB8giFe4u6gbv\n7G25KfedHTDNb82yiFnw/QxURyUFi8amcHTw1NP5ltkeiHM2GjRVipMC3gBk\n6XP0qs4iJBV1cPO9QSvio+kSiRwEGIzGobom81555CUTMwkmDmELW0qIla6K\ny48TlVJtbWXLVyMMg8ctCt6j0haNFMthsX6LX0mOAk1x3DSC7FZ9aTowLcZS\nCSEWGs4AHmbFSBpgoR2lUt09pGGmLPmVXZEs/ot4BE97mcCPOPC94numR8Qi\nnnfLczbNqC9jk852FKAI9vuA96urNHNk1+a3l4BSHZt4cfO0MxTC+Neq7CLf\nmwWpsx5dUBUsTbEQUUS8q3W+zkKDtYgYZkX3oBEdq+FABu8chUmMD8S0qVYU\nj45k\r\n=h+1i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"836520f7dc850db9f1e27e716bc5e54d6e769ea4","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && ./node_modules/mocha/bin/mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1-rc.4","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.3","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2-rc.4_1618187737383_0.908587336964346","host":"s3://npm-registry-packages"}},"1.1.2-rc.5":{"name":"caver-js-ext-kas","version":"1.1.2-rc.5","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2-rc.5","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"c5ad5a3b233ebe1202c45bca3708d1ec43f5156c","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2-rc.5.tgz","fileCount":207,"integrity":"sha512-aSafN68StyIB0odo6MQb/s8xw1pNe3Qc5QiQIP/P3dEJJSM2BFEGwIQy6yF0Et+ErlNj2/Zf4ko9muo58KaIpg==","signatures":[{"sig":"MEUCIEHjt+6Qu+m6pjy0fTVCcpLoyYNqvKxrZDC+yOgSVqznAiEAqTbSn9Mn0v8i0xwkGvvzKJH122pS2VXOp9pNRBVyr8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3455805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfN1lCRA9TVsSAnZWagAAfu0P/0Ha3KHHaij3O+uYcbM3\nfMZ1K8YbGSXYsldPqO92cb7gElAnqe8HdEkZ2WMjOPuEwRyZCh7N7dvBYGaw\nAJ/QAKXx8SQL4I3wyN6ufUHxlxiGcWTs0h8AcDE5dCSIWfIBTuogRaH9b5X8\nk2Dgacq4ucvW1UptGPunflB1LUzYCp7tDsQ9ieQ2DDyZNg3f7qi47C7y/kJT\nm0QZ+dRTBrNvCOzEsL/fKLn9F06m0WkBlpxw676oDgWWx+GQC7sU8pQGFjeN\nlUBEF0ip0mNkHa6bzj5CrElL3KUaS27DvQDYt8NbMr7iJmAGcuZTmN4mG8sE\nIe4DhqSKUIMsnSiXQpNDP+Pqp/69rnnhHaxodAvfSpf5b3BYzzUnY+tHr9G3\nNbKI/QzlGE3jv6duD14g5uLZsdC/lj7m54xoXfuu+mJbWX1DRTnC5lnSteki\nxjVP4KCil9MgDcSQ0yvU5eNA/OeXWoiWsmetWGkMuseQh/5F46O3heVN8yxT\nXNLQhu2T68lTHaGwsUb+30uK5xJY18evnmBNeaEdRNw99Up2iQUB6YSakN1T\nacpzGEfoiMPhqFfihNrZLQfDlCWQLaBHC9/EgCwn3d2YLq8XWtJatsUiC+jo\n4FMmNTgKXCq+U4CfzEBg2pCfF/oEnaR/KwRQjMdwaGw3ZXUlwh86oKkDh2Rj\nVdwE\r\n=TTBG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API and KIP17 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api and kip17 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor and kip17 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"11535b34c7548ae3c783087a14371a62b7ffaf35","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && ./node_modules/mocha/bin/mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.3","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2-rc.5_1618795876944_0.642467003220792","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"caver-js-ext-kas","version":"1.1.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.1.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"6cae81ec06c6a896d702d234ac02d3e9b2112f97","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.1.2.tgz","fileCount":207,"integrity":"sha512-j51mewNFae2fQy1EH6yypbaZddWqLuhF59ldxvFS/oi/ruqdvslPdtjXgq5yCSH9kybaQzjODgoJXz3ngZ5z+A==","signatures":[{"sig":"MEUCIEzjp4PUqzUZzNPzG6OntGCzbdUmX86upZAEETZttrl/AiEAuWj8+SLsFsIGpdBomWuCGZmaYl7kAw5PN6Upbs7Nmcg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3455800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfOKrCRA9TVsSAnZWagAAI74P/3IL7nJJZinzlHy1K1Cw\nNIaj2UxxBsyop5mGshAtqVq9U+oY5+WSD37Yn6opqjM8YlcY29ZX3y6OMuXy\nCTr3TdP9aX0XLlRUPdQrXiU6Q+H5CwMLBVpvN3KtZtoPy+Fl2b3GsvuX5vmG\nyvCmolfqoWfzXcyYJ/jVKCKkJC3/iO+/5dveeDPozDekKNSyXqoyQPoCTbA+\netox4SSOtAG2ghX3fuUWVKoyNMaqNYwGtN+R6AFjdyRCvY0ClMhPfT49V+fo\ngZteLrnQfwznnLac+9a3tXOhAAmxCoeEWHzdSHovHIY8H5dEjcCISen+eYix\n+lpi4ibt/FgtTlzRSAWVYw4nuFyckSAYVUq8TFQ8+mS+EozfcdY8yn3YrwZ1\ntKNvzbBNHGTKQm9Fsziosk3kkku5K84kEVWoicIshLFD23dJeOM7s8osrQ2V\nGOxIbTGElEhOzwbAY8seNDMEFG9zmgGw/bP0g6pZJGhBf4mSwj2IrziXodv7\nxyKT/KUsQ0N5iOmX+LMahYM7nsnFhIkZIllG0xNnvzfLStg7tQ2DBesniGXX\nb1z5eL4yKiV4waoHYLR1hjtYM0V8wZq9lf+PSNUGdOgeJS4Xo+TpjowACkn9\nOayPujDi832VbmHa5nJEcYfFggvmRIdELo3OgMx2Zv/VBBl0X6I2/LCmPkDM\nuVHP\r\n=CYSP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"879691ddd3a4b270a77170f7df898e5e88519920","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && ./node_modules/mocha/bin/mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js","intTestQA":"npm run intNodeAPITestQA && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"^8.2.0","lodash":"^4.17.19","webpack":"^4.43.0","caver-js":"^1.6.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"^3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","jsdoc":"^3.6.6","mocha":"^6.2.3","sinon":"^9.0.3","eslint":"^6.5.1","docdash":"^1.2.0","prettier":"1.18.2","@babel/cli":"^7.10.5","sinon-chai":"^3.5.0","@babel/core":"^7.11.1","@babel/node":"^7.10.5","babel-eslint":"^8.2.6","chai-as-promised":"^7.1.1","@babel/preset-env":"^7.11.0","eslint-plugin-react":"^7.10.0","eslint-config-airbnb":"^17.0.0","eslint-config-google":"^0.14.0","eslint-plugin-import":"^2.13.0","eslint-config-prettier":"^6.4.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-prettier":"^3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.1.2_1618797226672_0.34798386046037777","host":"s3://npm-registry-packages"}},"1.4.0-rc.1":{"name":"caver-js-ext-kas","version":"1.4.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"185c33c5fe20c37298108133cb3c532d72d269e0","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.0-rc.1.tgz","fileCount":247,"integrity":"sha512-kkvm4ZJtedv7vP7Xow08xycOmm3G/kmABJjk83ib5sSjrZB2aOwbwg/aVn+ueOEucNQh0mDxlvZtxcQOvxXiww==","signatures":[{"sig":"MEYCIQCHOY1lghzSHVc7nfWqzfdvOgDXJW0ScCtHcR1isKJarQIhANLibj214+HjAmZVLjtoafFA7jpFtFjkAiGc3H353sx8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3888129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgofVaCRA9TVsSAnZWagAAzSAP/isHK5UirK9J76QtlSZf\nWb2OozauN/J2ibpxBemFHl0D4cMfk/+UjWKhFjaK7Rf/wl45b+cAvQSp1qkZ\n74NLI6WJZzIs0fzCG67EVtKhMW+/J3M+VvclP4Ve4vm8TxTlNftDWaDIIDZ8\nGV3C6FKJgY/k91QId2WyedkgIFVM3fQUQQoxPgWumdNVbww71P4x4/cLFqDY\n174cgml4eneDj2ygU/DuIAzDuVIynOg2vZ9j2wDa/7uqD4WzoedFFCdz3egc\nHVdiMuEPjnfIC7anmpw/mS5H+1wgoxUTwatanXS4VxZdLw4UjBZdM6GUciiW\nM/PRdhWF+U2If/Q1bRlijfqyN2P57/h6EIt9XZlXC2qeH9V1uFL5N4LoQWgb\n8iJ1mXyGBatkWt8IhoIj9p6CQXJUPq0/sAvautBdBDfWpD6uZFv62lZL7g27\n5bphfp2dYEOqqGQiyL/lGXljbhW1HJQFeVoK2BXSQnBm49KhDEm7ueTVh3Ag\nU/FX+7wGEeQPpx2UroF2GffIVMGWwjIcqoQEzC/z518nY/zEKRNnFK0PHuBP\nWF9IDawzTM67ZpJA3EtnvikgOrGt8bOa1EYoPC7gYYlcAK5PiPH3S7yzxJJS\nc/OKErEa23epaGOg9O1cBH31SS58d1dSY6gS/LzTSRCad+zviiM7EDDftX8z\na6FV\r\n=JkeF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"395ffa81c33d2594c7458d0184a175859cc3e12f","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && ./node_modules/mocha/bin/mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"npm run intNodeAPITestQA && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.0-rc.1_1621226841897_0.864557161330948","host":"s3://npm-registry-packages"}},"1.4.0-rc.2":{"name":"caver-js-ext-kas","version":"1.4.0-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.0-rc.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"32f969547ad561125568b619f7c244408c6a2994","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.0-rc.2.tgz","fileCount":247,"integrity":"sha512-ZfZwqLIrbD07FF9WIjHbW1wB2Y2ybnbvJO91MmZre8bDLRVlVwVmbSFMtv1BnJBO+VV0NI+Gz4MShgTpakFuNQ==","signatures":[{"sig":"MEYCIQCqsIqD/wclqdRsmTdzN7POF5kwHtL3Wxf2RTl8VPu6mQIhAPtEL+cEgYK/2SrgYBtz2PV7ZDsNKYwS6ZMSET6Shxka","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3888130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgogskCRA9TVsSAnZWagAAiScP/25YPxnC+MO6ddpQ4h1Z\nPlj+Q3OtpiRaNFY7SKNG2LonaX3Ot/qrNa2FdRCQBAltZTXMpSjvsbqemBKv\nRMHdLnHo+km6+AqqtjzO7cAPoex5k2RWd98I72bmz/dh67Lm/6fELIm2GN+Y\nizjJq2z2qK16qbtjVEF062jwXcSZZN0YqX+Hvn5U33zIk1jnnpwt+HqE/th6\nJpEuUw9xanG87sme/ZivdOI1LlHMKHm353pZM1SPdvXOnG+kx3cVlTqoT1Mi\nftRtY6b0MBfS62KBevupC5YddzG0rJWjPtuGjPVcBcrCFmgwVId/O+r+8rx8\nNILDo62fLhIXFNjw9pTuATnF+m3V/sCWP3troFjyG84fG9VC4lY2DgpSwoMc\ntui13UeQ9mlwOmw1+N+OTHj+TOkXkKDDw97IX1ohysJrKLz7LbYWXIGJyi34\nFHUm0mnCm2u408SiO60lgnKVbnFPrzM2TnIQ0UiTTmCbd/L/l9pMPw2gcbk3\neNSlD9dMkSQNKI44P7Pec5hjk0q8K8LNAEvvU2AV/AEVJlUTBRGgbqU5UJDO\nEm3ZH+0M9J1GZ2M061dy9XDUFPCbQ3aAh4gSzDhrWj/aOdHBzpDFgZ73u9hX\njd1lgJRi9pjeLHRiD2WZUioOQ4ZIlm+bquYexEA9ud3pxia9Mo/6Gba0J7a3\nJiTw\r\n=OXeZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"f7151a853f8ef22cfa055c64b937a85c1426a888","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"npm run intNodeAPITest && ./node_modules/mocha/bin/mocha ./test/intTest/*.js","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"npm run intNodeAPITestQA && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa","intTestDev":"npm run intNodeAPITestDev && ./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/testNodeAPI.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.0-rc.2_1621232420068_0.16387276975038567","host":"s3://npm-registry-packages"}},"1.4.0-rc.3":{"name":"caver-js-ext-kas","version":"1.4.0-rc.3","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.0-rc.3","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"ad4b1921c72ffb0b1895b5010d24ec5c30429a63","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.0-rc.3.tgz","fileCount":248,"integrity":"sha512-5j2jUZLmggObo+O7EWDLssjrKnLMcKSMvzvmX6YfqpNUJvrZMHjKQ9BhxAJGTvMurFiu68Iemvb1Xph59gL/rQ==","signatures":[{"sig":"MEYCIQDzRaef/V//b+k4/LBDGkUe1P33CBns9OR4xcPWPXCrkAIhANK5uiyprPssiwzzatD1gkZjN4FQW8grqWIxDIPBg+o+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3898474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt0EzCRA9TVsSAnZWagAAA+0P/1AB3m7IufnUcNlsswkg\np113yX3OtfGSFPcXXL2nuzDYV1aCvZOGjx3ySALW4JbJ3xxOexksNdc2vj4T\nMAJBM2EbnfPtR2OstbC3MXqUDX+k+t75sTOyog+U84KPS41/PHXxieha9283\niqLj3rmkSZakCYtY+vqWBe5h93YWi6zBHlTUMstHqUdQwRuf2y5eZ12EJBIF\n0s+vhSUqb3WxidGorGxbZ9vn8MuVAqhbqTh0ZgQGHQwdyDXvuFZ12UAv5xjO\ng6CPB/ytd291dwsFXAJ40+wAuGztnyszNmqTCxT7F4De0agoZ8OUkJ/JkrFg\nQtWk9tFFjbLo02RrM+osNmuyePCqHhzfV4W3hQoh8jVvNeexxjo8BxM0bOzk\nMqZCKWSYDPGEbsThnF4QUhjtpGljPatMSxfV/YblAIbD/7eXDUl58652DwnK\nu8Ca78JE4IKgKBY+QRrTDl8FoUgFiOYi4dGjIP3h9y6BYYcTKGFJZi10U8BK\nXyrCsxWfI5ZSBh93w9fVK0mVk4J3m/P1E1FtRZP9nClZfhWIoPMUWluObkyD\no4ySp/p4DxLNdT5wek0M6ASY5akhFngTj2XVz2OYCTnOB+gySDfGgkNJbKhy\nPZPVqcWiJQKuMRwolKAuaFf9IGg4+e1Xro8rrpQWhRWkgeCoVZEN04a6n3Sz\ngTr4\r\n=otEc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"06c3aa4732e9399e77119b0df9251920c83e9fb1","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.0-rc.3_1622622515336_0.7889846153449811","host":"s3://npm-registry-packages"}},"1.4.0-rc.4":{"name":"caver-js-ext-kas","version":"1.4.0-rc.4","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.0-rc.4","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"9b7ba44597965cf2341bd8e3025a8ab47b9322e7","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.0-rc.4.tgz","fileCount":248,"integrity":"sha512-Z1jQNqX5eWXS/7/kNzrwyGZbpbHNjZE9bxjS+dMFEF3nAINZ+hc490REj0YblJBOIVh4wD+X8u2R9d/LqUKYJw==","signatures":[{"sig":"MEQCIGiuED98pw1liVfwpwT8Y8m6z7h8Ite8tbDyBQ2IADz9AiBHWp4heIRv2G2mPe7v0rDlvy17VvZGzWNbxuZ9VOmZ6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3898597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguBqpCRA9TVsSAnZWagAA5r4QAJnpQCxy1zBzgMeKQvb+\nDY0HpOFsL+0UHZG1PN3XGAiRZLSK5FqJelvhdh7qOLOElxKbR6l4GVDu6GLb\nuqP9uyelffW92pZSjGZiQqVdUH8z9cuC5XnLqOt2QZc0pl478jmT6dbfWNDD\n2VOG7hq8w5GhKR1H4j0I8wLUBxe54zRp5zRK5a6d4GpS73zFWz+edb0phEJe\nWoiXQl45EZyE2xO+FLm5s8YA4Abyz1g6ltp10lAELBwN34TNkYvEK/8jysPd\nd3c+OWUGq/dX6MkbB35YEfpDitOxXDZ2mQBHbK/pM+jsA+ny4Km/kZxdxf8V\nydZJk8TwAuketDQY1qE7qML5hH/sq02wyv4xWdx3dqHFKl7oBuInh/EmjvNe\nVEagPTDCe+RbK3dMvQ//jnY3movIemDHNNMS3wwXPUoW371HtiXbRTEwIuyi\n62LEl96dxcYDmnmdTYA22lwuWnDnGmyMZ6ngsaXKpNmcaVwAwi1pmDmJbAEk\nOvFzVuJNw5BE09d3t5PHUCTE09c5jAN3dPRPcCJyg7mmI9yqEO0XTNT3pKiI\n9CYHiQLBqsRJx9hVpm2zNkxgFZPRP1N7WRWSW+i+Dq2oFdEzQKbmopD6IIyH\nVtsjiNh91fumPUCq/llGFxs8/mEhvoQtTQ+UR0xBsZTwxA2Ei/nl3V3Smh5M\n+qB6\r\n=ws3r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"4cb4889748cea306c9b2795c33364a0e680a28e6","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.0-rc.4_1622678185316_0.5840461272254593","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"caver-js-ext-kas","version":"1.4.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"6596823282633749931fc0725368b4fb4ecb2073","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.0.tgz","fileCount":248,"integrity":"sha512-XUtl7ebYWc/RrcErNXfELzsqI4ePHYis2SlR/FKvOedpCssTVT+ukboemu6Hmh1csLAOd02RjZmJ+czQxn8dYw==","signatures":[{"sig":"MEYCIQCeSyOVI24PCaQ3k83Gt0jzLPwoQMFDDgZ/jP+SHQ8ZrAIhAKPdNfDSTu67zOrcO1w1tRPp7wETsNQZOmbzZYZ0xgTn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3898592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguCHaCRA9TVsSAnZWagAAgG4P/1C8qDarJp51Dvyf+m8w\nN6WEmKholg5mYFvf/Y87ng9ftk6sN9FoovFgDTeRWrYN07tnYvC1l5QNTH2h\nfwJPedx1cqFzkyFm800QA34xWGs+65KefnbJofJeaARDXWI9xXzkMqJ9jir2\ndbsP6y3QthEUYQm8daSLOr3bAaVTBqHM2qXzhvtQrxJHpFnj9td21aWOSJf7\nSmLgzOVhqtE2jIKMf9nDpWmYNjhdzkyOd/vyaMtI2R2SwiGWfOnwKaZHl7zq\n6BuupTgDUAQ5Yi2E0RgEU5/Zs3D6TJX+27NtE8b3ugxYekvl3LXFkkctxSvI\nqyTHz6u1Vyo3Gy6z6uXy97Pwg4Q1J0A2xrss0/EsrwvOaqOW6X0KBIEuIUiq\n31lzoIlJpD765B0Nh7dqqJfVz60KoMtZhB6T3YPfx1kr82lajDwZYz5Hr/4z\n89HXncFI4A6Cw3o0WErBqLHvlB0NKNLEtiAkz/6IBo0tMHc9gU1uwVmwQCt4\nc5Nr6aohmyHAm2/DIX5NzIKQMcFMuNa/Dunnx8x0YwkAASjpoUt6vb1fRdny\n+QmqZZXkAk782vy9P9Lk1Vq7mzDmxBo7r1GxSvjQBpeIpGfQigGWDnpbXmVf\nekbT+VDVEhak/h+2iE9b14zVYWi7308xRx1B+Mp5TBruWpymgTGFnTcqVtXt\nsOWP\r\n=3XkO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"841c831c0a6ea166399c9222582d8c36959e1225","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.0_1622680026178_0.7063569542922592","host":"s3://npm-registry-packages"}},"1.4.1-rc.1":{"name":"caver-js-ext-kas","version":"1.4.1-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.1-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"f2e905da4be3a4955d14168e6f29e7aad4ab458b","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.1-rc.1.tgz","fileCount":248,"integrity":"sha512-06tfaCN5U9vJu4UBPoolWi9cxIfu14gcf5jQsJyWSM8IRIxWwMKb5xdSqfGCZrKmJLIKM2C6gXmFUqDC3rVUoQ==","signatures":[{"sig":"MEUCIQDhnosBASfF3a/mAxRZIuCeixi6mvBFFQlPM0z7N6AjlgIgYM1dR03J+4Iy6CGADCTAU4qwtqcnLOQwJjBFyFKaX8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3898586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyq/XCRA9TVsSAnZWagAAqBcP/0BeebgaWwPwZFnszkaJ\n2qf3xipJkSQXjlnx5NGNBfQiTFcMjK99CuaGFHWyCa7hfh/wjWK0S2hD2dzN\n9C3FFOHG92hYyX6RKtQzaq0Jj6B0zwERHCZA29sdh0J4PYknPjreskRjEc+Z\nhT9Cf/uM8AI1T+KKtkG7QorhlNC6z9NBy50brZ3kJGJatDOWsvnBZwjcltrE\nDNO1W8FDF3UDDScIQqhSY1CZ2LZlCcUk2kZl0uCd54eApUFnx07LMEfmyQ/l\nyc3jtj0P/dHpTmYPo3WRZF4E6yFFZzrhmqW+en9ozR4QIsSIf9SAc/KzCX2i\nJX9l3cyeCXd/DmzkF6DqlBJUVAt+XpfWgNbPhci8AX0KNnOl1kqzbb6TEqz+\npUNkIORgOW0qMVf8/njhis7S+cZqnT4+b1h1sjBUnT6BYx8KsxgpvkQZLFbB\nqduybSKboXLSJwvajDsJdj+ErLN7o88/nhRDZb7TvPhm1/BiehxeQs1DrBDP\n4PyjqHQ6d1gJQI/0yClaTsffGVN/yP2o49WM3VfL/7g+gbArADzmkn0/RVqM\nIrOigZ3KIRrY3Osz1SbkbmSWvNo1EQGnrErAIrt5y8AS8MNyh43Ddo6/3Kew\n7B5+475TqBWVnXcCnnbbrulbh4BLZRLtAXpC+c1HYAORZUZUc2xTakDdPjmy\nvhe5\r\n=uvF7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"48ce09cc6690892392ae859e7ed8ca2de952b12b","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.2","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"3.6.6","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.1-rc.1_1623896022779_0.7244826077773729","host":"s3://npm-registry-packages"}},"1.4.2-rc.1":{"name":"caver-js-ext-kas","version":"1.4.2-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.2-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"60d7c990971153a5ed7a5903d02aa076db1855aa","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.2-rc.1.tgz","fileCount":240,"integrity":"sha512-b8oC8NZ2EZeYcAK1oS4T7W7Rr/gww15XMnietwkdtxK/jzGIdSmzYTy5JXM8cuN7fO4SN6elYQp0aIo12YuKNQ==","signatures":[{"sig":"MEYCIQDMDbXakLZUGGYuBf1X3HfgUDfZd0UJIVIaOPFYImdTnwIhAMxYMZleL7c3WhzJtZ39FvIVosTtdKiAGjv8uzHQVrK8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3596893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOeyvCRA9TVsSAnZWagAA7q8P/24ROJfzG10vLffY/dTW\nMVk1yvC6wtGNYTRY5G8Itm9g/VfrwFXT9REDox2bmm2L6t0peJLai9Kzwm0H\n9rnDvr3fwVmYvMDUmA9iiGnZM3xdgBwy984+hTJ6xfz981pzFn5db/sonqAF\nJvFOPdcVUNKX7AHZ03TnSbTd8uGewTCNPeQT9Ez2T0ySmJsCKqyYoI+QBn3U\nGT4CPEAEoQHRuYZMu9Xk8BwPNBLxHz+lflK3uT6qCv+f6uIyaE6LNjNvT2W6\npc0iWHMs4YlXe+amz8TtUMkVO0/6kA7rq7dNw/9FIAschMqB8Y10sYKNMs2K\neIKPixq0LnSVMtHppigMLfmbLZv/xEGgm8zQi/dG1P2gKmeLd07cWM3x1bEg\nD9ui0CuPuyoZw1igga0LOeLH2KJyDU2RFKYvVpxzRXxHTLcUb003Soh4SKnL\nikLES/PTJQptE3282lX8APoys+heLE3iZ4ZH4mYnKqN0Bg0l/laDS4ijDPTK\n5kbdHdybZXF+BZZwqR0KduJZJ8og3wf7uNMK3j1BQd6y9PtvC27cJ1ZMlG4y\nqi+dNsN8QZ6KuwBpgSkdZ4eLzgD21LB3dkmAoUbE2fy3B4BFKlh78I6/spxl\nMgc0zwLc36T8Hj+oZ/r59k/f6wqGcpo3Ymb+dkYQHFxc0riTS5cZLicirfdq\njw9D\r\n=dFrl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API and KIP7 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api and kip7 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17 and kip7 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList('0x{address in hex}')\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, and KIP17 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"b8245ae20c34d168c7ae22f37094ba4dda45ae1e","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.4-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.2-rc.1_1631186095114_0.3492733770152119","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"caver-js-ext-kas","version":"1.4.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.4.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"b1b2bb185eb0793a3745b372054e7ee40bba9872","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.4.2.tgz","fileCount":240,"integrity":"sha512-lyyRc1mnDUR3uvQbB4q2/Mh1SHTjBDt9p+ZxCn07w5TyUMtu4jUlfx1P56CRzOSPdwrehxYi56oiTuZKJtgE9A==","signatures":[{"sig":"MEUCIQCz0T3omJcSNikTzE+Sc5OfY273SZgrW5R1nzV8S7CRRwIgZBPnYMA2M+E2JZRpt/fsxHwBiC+qq6sv92iPNdOl7h8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3596888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOhz5CRA9TVsSAnZWagAA8asQAIqjrp39MOUc+Xj0V5GB\ndbOGTqo0azlK8hk0E3Ln8zFJJj13A6QLwZbEtF3+JApQLkkVlMkX1523H7Sh\noIs8tXguHXmrxvFWlDpojgj7OLv0PPwj7/mYjcvxMWnrLKnZh8B262Thjjkq\nunNDzdqRrAv8YYZCPWWz1WfVHYfym5p0pzKWag/2BCjWHdicrcfpPRgW2IQo\n4CDlqenIR2BvhJ4mFOrIiqWEgh6ucWkIbBRFodM93JBULJHONyOFLykgwK3w\nTQQzTU2ZjyuAEvVdhSjfHaL4sBq5ctHDEdcJSCHsEtQnQUIGgdOAcOA6yoWr\nuGGhlzL4TrABheqH0J9gPsSueUZGRCCndkpgVrEQ5/j1NFAidxE4p+CcpBZd\nw2rJaIrgx3+eTe04hLuFHn3n2lPH4EOdWpQXgvZs2pptarvqeGF+HEwZdS7M\nm/zmkAXTDVN8XrvpVKtk5wR7mFs/7KCDKcPJywNzP74QJ+ip8vP/3BaHw9QE\nK7Vwz9TaZ0x4WnKipW3J3XoovTZT7h98fpaZ/DF8kktsp2wLs/JtPcF5yBnB\nv2e1Mf/v6p/uH0CpKHz72ZgP4RLktVmN2yIDgWx0qZPRgAOUYIf+H4y2oX0W\n2jI1cA+1REw8ZdMMgY7RE9wkKO4oZt/cU+Esp6WkD/aVm8rhaTD09PD48Qm2\nYnnK\r\n=6jgL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"3b7505f3aeab4bd163ca69fc4cc085d065a4aa87","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.4-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.10.5","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.4.2_1631198457135_0.7090340561875956","host":"s3://npm-registry-packages"}},"1.9.0-rc.1":{"name":"caver-js-ext-kas","version":"1.9.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.9.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"d5318873129228829a9956cb7cf17e6fa1e3c922","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.9.0-rc.1.tgz","fileCount":301,"integrity":"sha512-1BUH7Q57C5xecxdzGZMPBYt8g8fcDK8MRHbZ/Nz5+LCmNKVtfqkWJsrDWyhj6soKSK/oqs34CeZlYhFrNhpG6A==","signatures":[{"sig":"MEUCIQDLy4TO+fxPJxFJOZmlErpduSl/t2qFT8xJV/i+DzhHZQIgF7HEmVNtDxvCzfVp3tjU2mDRv2+bW54rVKKdoK0LycE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3920311},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"eb52982d08037743a34fa3fc79887247c689ea00","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.9.0-rc.1_1633067119209_0.5015036591590674","host":"s3://npm-registry-packages"}},"1.9.0-rc.2":{"name":"caver-js-ext-kas","version":"1.9.0-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.9.0-rc.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"8d241ec14fd7e562f622f360d5fd47f89c56a887","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.9.0-rc.2.tgz","fileCount":301,"integrity":"sha512-O7QsidPPjTi66G6XVmdPq1hO9uSKavOu59BgJSRLsQ5RDKm0lC1iltHa7tQ5hC0fiqn2RgmWMbO8SewjYwJojw==","signatures":[{"sig":"MEYCIQD2QTaAUEtRVvfPq8Dipf+yRSJdxsXx7IxGa3iAmYSi/gIhAJXYNknesp/0QClTaDlevKoGhGJyMhrmMPmiXxhhC/81","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3920312},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"284e8b08c3ab7831a3747777b1aac08722de71d5","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.9.0-rc.2_1633568473500_0.5275894607683285","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"caver-js-ext-kas","version":"1.9.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.9.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"d202bc52f60b905537d4aa5e8e1e76f05352a5ce","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.9.0.tgz","fileCount":301,"integrity":"sha512-ZCCliwOoTtOQ3Hfo3gVL+PwDwHG/XEKE7AMWzMs0vefk3fRQX+h6FIPG8Cj6zkgtAak3gKdyjM2OnjQt5Q/ojw==","signatures":[{"sig":"MEUCIAigbDORvlKhE0Jl0iWtsx/9n91i03BTyRCWn+jUXTa9AiEA4KLdxb+b6W3Pz15ZWQVZma8/bWqj1/DQy22dR3YL1fI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3920307},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"d83076177f0aab3f03d3c1c23b3c5175e3c7308a","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.9.0_1633662019726_0.5847003862494682","host":"s3://npm-registry-packages"}},"1.10.0-rc.1":{"name":"caver-js-ext-kas","version":"1.10.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.10.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"9de140990d5bf20c285ea3db978b05edd99edbde","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.10.0-rc.1.tgz","fileCount":308,"integrity":"sha512-FgdngePuu1I902OT/Vyp7JYFmA2LL+ZkGvEiCcid0aW+qhjmSDFlg0T3nOPE5If5Nlak6TUbc+M0ZY7zyb0NWw==","signatures":[{"sig":"MEYCIQCzwzQQeNvFays+MWOyCHyZu75PXTppdhpsxhcXSaGfBAIhAJPMnyXF2CFvt7p6g/clNh8C0MN5kK7/LkFHIyfZmFaV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4226749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifd/+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4Fg//UPs2AUgNzRpTTiZDY9dGIbdLq/iFuStlMYN/n9cYjHvaooV9\r\n7vBVjIMesmofiavvGfgmvXKWOnnhFBSSIsNI4ENYnMZy4ZNnXAi3MWO2iHph\r\n+CAORItJSIwGqLFQEQT46ZKuDkpNu+52G3m1oXvsJbjZiDIYvjmkqKwpV2wY\r\nVn79yLd8mI9mPLG8P/JXWHoH/FwfU5Zy50YpX5j9cgyMkzFESz9rY+MMFWQF\r\nh/kBcF+gI+ZWX58CFYnx1rJPVu3odyRcJXmjUuEw+XMLvLNuxPVn2cbeUfSb\r\nfIPb5qqQwqIp7LKA0ddpTRkasErzs0jkQPkB7bU4zb77a0cIEGWOa09ZDaWp\r\n8fS4ycf2HVj6l89DkrGSMb4YONboHUTR9yOEfdU+04mfay3OcdCWt+tb089Q\r\nwH0Zv+A9BCvj8Nd1qZp1g4DusBhrrqKPixwSeAC04Fcu9qQLi39WoRDBPjJE\r\nqrDUsTe9vpIRCrK9+d66nEoKhHH714RV3/dN/ULobqgAUSjkq3emP4GsoRet\r\n3w+0E7AD8izkFQDgvGV5tZVfzRWyfTwRFKddsJj03+Y26pTrn1aXJNKEXQak\r\nBcQfoGqk/OxbQhH1/oa5EYxh+ybsicmcvVnCp9tolUQ4mXZl2K/2qC9OaUoM\r\nu9/0mDYxBes5NtJ/8ZosbwsXcIBfsZ3Va5g=\r\n=YMth\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"38f6935f3f25f778f103dab3374065568328de49","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.10.0-rc.1_1652416509727_0.8628311993277651","host":"s3://npm-registry-packages"}},"1.10.0-rc.2":{"name":"caver-js-ext-kas","version":"1.10.0-rc.2","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.10.0-rc.2","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"40e952123a601a9068f055cd5bb27700399b88a3","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.10.0-rc.2.tgz","fileCount":309,"integrity":"sha512-HYeeFMebXTKyFPxScwjBWkJCfrqAbh8IyY37/SkEpk+QAiiJ2VglW2QvRKo4N/HDKggJRO3I3qAnWluFx7Zsjg==","signatures":[{"sig":"MEUCIQDpp3dRGai7hDcrNSk+XzDURzQ1Gu2zytub+jVAoW34sgIgQ1vmiyhMwNZhbK79D2wLejkGnaJi85CizhW0RV2GpDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4151829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihjWMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOTQ//TkMy475FbLIZPjfXLI8QjTVnRL6WakisW5We/d5BPsrDeyu8\r\n5E6m71T0F+6R76WrX59W8mzdj7NOTFTeXyUJD0dDSvq7SF5fA7WImM9s4pGw\r\nORr1NHSVkOGjx2A8tMlmpKP5pQ+ITE1L/Pn3+lMwKbn0kEh3wm6rUMvfaH9q\r\ntvv+U6wf9EVdz94ICKr/VxPxCE9v+OMK07Ir7gTeYGSyp0Q4n01w8vyYMcua\r\nB+qpdu59hnCGGnsEdWHpG+M4DpKbhjJ5cxO87IcO3rB4BFjmwnB4zMhrQkjf\r\nkDd4nzU0TyXQ8OHHwYqStvNlFWNC53N0ETxA3ONdN66A8K2tcpn8p/c0ysiV\r\n2IHWDS/Ee6XFH70OWu3Yini5KTjbnyrwwMF49vSibV5o9m6pXEEBYZE0ROoO\r\noguRUYTbxtuD772BvrwIuizEFjCEHpbLvF0GxYo7V5JhOds8NU+IIzdCntkw\r\nkOiRg3I0fZPy85/ASxY4ykCEUcyKOqMroqwkkE3rHIA4yxhFWz0MHwoOordt\r\nlU/Dm/b30qafsi/6+XBoUTB+5YUPLZM5Ooe1nQK0tMOZvPaavzzvEsC6Z+e7\r\ns+/CL9EhJSieuVyjsoargqZLE2VYwDwRjrEWSRqXIX6qiAcdN42bXUFPMNg8\r\nW6/Bd8ljbAwEPU0pL/2cQY0yFvuBERMzmqI=\r\n=nUYm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"720e8fe38ea0d317ed1fca0609c9b32f76057baa","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.10.0-rc.2_1652962699840_0.385144845954019","host":"s3://npm-registry-packages"}},"1.10.0-rc.3":{"name":"caver-js-ext-kas","version":"1.10.0-rc.3","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.10.0-rc.3","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"39c49ed53de93cc5d3066d82f0e7db7214705e58","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.10.0-rc.3.tgz","fileCount":322,"integrity":"sha512-7NPaLXpFaQfM+ZqNnxFxISyQ8gqWb7YS+LtJPYJJoe1qInM9ubYo/3nufQ84xx/jcDJheP5OafDtp8SZLMRgOw==","signatures":[{"sig":"MEUCIBQOjRty8Ha4ae2onUvBokmigpE44c8an5CFTXoOrKopAiEA3ReAB9hdNQgT+wAsGk+uxi9OKg4t3tSR1ZavBj4X7Iw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4215983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimbVMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlWw//XG1J5EwzeZeXVpS6+ni3EH7y7rSK52JZcwtHHhlmCD98BD0V\r\norpAIXJwLvdjP8O3rqlxn2/e9L+awGODmpkJTqrUASGxEQpIMU3cd5h3+d1a\r\noQcYicz2aTDBVhK89MzeWbqRn7c5g9tPjkL3J1H73L22DTCtYt8VlBprWCKn\r\n0WSPo+sLG+HMMWEFSqt69C+c3eLUQJ+NPB69q0DxrEhWjdmMqFhs3AfnxfqV\r\ncvSX3WCHUfrdPgFyu/6OXV0w3SUpotWYOPeFGpukls8Gt5bzh25Ie3PlTuWV\r\nbBW7U+K6CU372lIhKeGbJEwqo1bNa0ZezUnduRK+TwI+yUNf98r182ce3zGf\r\nrIsnsA4E9lnKgQmWy61FNg+aAV7477K3RlQYYNQ3AYmr7l8CU1wS4Q5y121I\r\nwQlo27XbpSa3qT++3Io2fm0lfOQeCRcqLvcYbklb6yz7dpJVkfsU+63n5SN0\r\nROG9+g3B9151U5X41qHozDb2yoZ1eamIRg5QWKJfSP0Q9kKym7mYqQLHiG07\r\n2hkmseNTAMzio8CdIWBsVA+xA1zh/tIAmb8Qn5THret5pJEf0axUHL5WGfti\r\nOLGzjN2DycTKEuvGhHJ4uFEJEsH823a6sNrHVh83oBINjcbAwN6EmKaiL17M\r\nAx/ZIt2kY7AEPmwhQzOquMtO+Y6w51agb9E=\r\n=N3WS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"ad36cf3cf3ac0d132ffcb87679be5ab2e5bb7873","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.10.0-rc.3_1654240587869_0.29196435288858824","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"caver-js-ext-kas","version":"1.10.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.10.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"ecbc5bab534b2655499abd50efb4a5335b381395","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.10.0.tgz","fileCount":322,"integrity":"sha512-YyYu390t3qHVlEr0McfijF1bTGGdta40pMK03McGjHIb3EzrY3KDPt1L8etAZGmAQES8S3mzz9crquD+jZRbjQ==","signatures":[{"sig":"MEUCIDzA4EJElWAkhFBHN57AH1M9yQpDpGNMGT6C4QUDqb08AiEAtZdOio1NoDsKOOzAFkWANvHSP9MMubXQpEenCiujv/Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4215978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinq7rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSyQ/8DiBR6bqPUWZfXE+Jr31ZqL9IVaJl4W/z4POJgWstx2D9of8q\r\naBIIrSO9bguD5UjzxdKhN/Z4Z2xdwzKj99wA73oexIYTP8o3bnb+4Xtd++Vv\r\nhS1BiJD/tI+/yqpOc/Uc0KTicjO0QcdzMp305DLnQ2g+YHqWhWGg3xmphako\r\nUZ2pozlSYrzd633rJcq2NtYZ0gtiPWqayuGDaMbgKSxI6GF0z4iSS7OUPFs+\r\npiwyQKK38SOKwW4DJrn0gl7DUMAkV8kO1NqEK1A5HJPTwT/tRxyNbPN3/GNS\r\npJIb7+/Uatsenagi3aZwO712zwebLjfsAkTnKWy8w851/hhvbsTPpyTyT5r4\r\nLxVRNeTIov/0IbCWqyiO3UAZR7Vjy46X6Vh3jl1LuRMPIfchCd3QXQXyWoao\r\nVp7fnBeSv0Qhyfi+9Xgxyqys8Z7x9gLx+nBMX9JeQuHhajUcQ4d5l0qNM54x\r\n1Ll1U0zaY7BCUmVuk/a28NUJrKHG7oHvxwK+RbkZ7ixXoIvKvm3FbMBs8AWO\r\nwFwEhk9++v6Ns/aMhCJtDesH9AVo64aSX64J4Hv4luyaCI4ceWa+aqThpQUR\r\n8SAWKOAX4J98QpqNqSr0UIy8+AQjoXVjbFsPEQRiGZzlEPklwozDLAVBQQ0+\r\ntos+UicZxwCjtrXqC9SusQQmivkthXbf+SA=\r\n=fPRE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"5e724667c36ea1f5ea98c98c764a9adbe08d5cad","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.10.0_1654566635151_0.6940504799933558","host":"s3://npm-registry-packages"}},"1.11.0-rc.1":{"name":"caver-js-ext-kas","version":"1.11.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.11.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"c5ec3f5b416403d90c1977746cc571b2d786141d","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.11.0-rc.1.tgz","fileCount":341,"integrity":"sha512-MCtpFIv/ogOK22PCEjThAGuS2ibMW8ln6LIx7D6hPtPpUgGtF8dRKhJbHMxVGHeLqWGB5kqzCAWBTNHXL4fcFA==","signatures":[{"sig":"MEUCIQCzTNGhyOcOcAWlcl4ImGizMjYguJ9X9lLjO3rLOkaqTwIgNqy/8oMLm+tzeoZQZjcV57dPopfjInF1ltP0w/gWqa8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4526355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir/pjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrv1A/+KUauhRyYr1EYcQ18eE/3bYs77Ak4XTGt5TwIiScrhqupeQMr\r\n1DSnWVYv1+Mo629gC2Gqf1nhAgl/9q4GJsNmkX1fufzetWt/BrQWFrIRgjUs\r\n1CmjZdRUPyL6dH06W5NwdTRoVQpsquPx3x6R4suL+37lHxHeirQ16lwkoN9w\r\nDiS3ZTLM7c8lZsOd1Q5UnaP6ATdmFWK7eS2a6POzzggU1mLEB05X/GIWB6Gu\r\nf0htY70zg50Rp1gd3AVI2vWhZD+ZlKAg+UtGng3kFeTYYI+FiiCcukh743Jz\r\nPoN0Ewavn6XdzAUId7825pHCL1AEmMrKcx7sSCEdqRfbZx0aDCN0yMdMX5fN\r\nK2QQZDaYmSGsAEUPtrRYGuJ1DNCkSR7ceYuugdCeRtPg5iyAsPAPBXsBBXUb\r\n9G5fciclwSieU86wZDdjy8PkFov9pZViE39pG/96cl8wgTGXyGbQHLSsWwXB\r\nxO12NwgAo2EYdizAA9Wvs/JrU9vj9W8cdLzY8gsiCi1RpQFLs1raLcK1raka\r\nkJAQ4pEHUcOqjUlkvHdBcKn1OQBQWlBVmt/G7E783tPdpihhKxvdKImB1Fu4\r\n7Jh5jtz51VtPjsRw6EPfTEGvyDe0b4rZmr3HurJhCiKlD6CKofabaPuN+PCQ\r\nXFl4DWe+hARjFC4Rerf9RikI/2YjNhU4RMY=\r\n=nn9R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use Metadata API](#use-metadata-api)\n\t  * [Use Resource API](#use-resource-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nACCOUNT_ID=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initMetadataAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initResourceAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Metadata API\n\nYou can now use KAS's Metadata API through caver-js-ext-kas. You can send a Metadata API request to the KAS as shown below and check the results.\n\n```javascript\nconst metadata = await caver.kas.metaData.uploadMetadata({ name, description, image})\nconsole.log(metadata)\n```\n\n### Use Resource API\n\nYou can now use KAS's Resource API through caver-js-ext-kas. You can send a Resource API request to the KAS as shown below and check the results.\n\n```javascript\nconst resourceList = await caver.kas.wallet.getResourceList(accountId)\nconsole.log(resourceList)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.resource.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"62df51119ffab91fc2400aa3c9ae6386e33d8fdb","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.11.0-rc.1_1655700067034_0.7294743970928472","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"caver-js-ext-kas","version":"1.11.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.11.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"72eaec523d96dda5348978326ae83544d193a450","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.11.0.tgz","fileCount":341,"integrity":"sha512-kgyyCGVIhjVEvZwy9tpqjc2G94Zzbu9eGywlNDxDQEz85zl7oeXJ/orw4gI/XXaewlxuW7X/UB8FJi5ADleGLw==","signatures":[{"sig":"MEQCICVDkKxyWm/UgCblr42ZREboj3OoK/2FXt0lB1aNwRD3AiB18i3lp7imz2I5smp2ZmbNBFE+gS/EiFjh8mHeZgJdbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4527139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisAxpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8uRAAmEJq6t1DUsn5Fp/njN8Ir9Bw8k3HL1Un6tIG5NRJNh7UyQBg\r\ntawyQ/jRW7evrMxC5P36W3EpA5J19Jr/kZp+7cLaXukv+53SFfXQXwESQlQZ\r\nNqEy+0+0UD5BG/Oc4EHRD7rjCoJxLLo3v9OKGM6ahT6IcUd/XV79oJPUimNU\r\nIlIbCba5PXnH7SnhxSBH1yUpcvGWvuy0yeXCGJoFM4jaQNxe/gNjEixAKXb6\r\nE+jhFknqJiVJ2013c4YEiUonHapq9tvr3Lh7/EnBkY9t7m2qaCGRkkYb52Pv\r\nZqSDxpfQ6hdQHcAIuUXrycQRjziAR/W6sWpEj5h9GNHqoOD8mv2mj3PhnU5j\r\nUdJahR7SK5GHkb0wXWk/COFYXMkv6Fk5/VZzDoUdFNe8lTMrT1QtkHwNo4ZB\r\n/B+D2QX/jy6RYeRfs0BJYnzIdqvM6Z8UcN34mnuYSzkp0Pny/trOMROulusy\r\nnahPsYOL+Gwo214QqKeRU0YpkRci7+gTaSoFAg835cIVgNhfRUXAmNJbtNEw\r\n8wNFv7bhcWVe5tcP9CJRkJQtbLcjMfZDqqbvb3Dq4xPGNk/r445gyuPAg8zs\r\nFUsLWEChru8fv4ymwgV3jz4A0zfR6R5cAYWZPGhpjafI5BIBCmopQFnyxSnu\r\n3qy0xp2nbr39CHZa+kiYyZuSk8zrPjSAczY=\r\n=KH/S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"a9a8655994bf5f1e360eef28b9ecfd5fd0bc01fd","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.11.0_1655704681054_0.8752563832202516","host":"s3://npm-registry-packages"}},"1.12.0-rc.1":{"name":"caver-js-ext-kas","version":"1.12.0-rc.1","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.12.0-rc.1","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"9d955301a0cb26fc8f82eb9ad37ae393210ef00f","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.12.0-rc.1.tgz","fileCount":341,"integrity":"sha512-QaW638bveDe5bAQp0QQNiMPJOx1fqVfuGsLtX2sBLdFm8wuAIEHg6p0MaUIXWHoHMe8VM+Kh0orVwZVfnefFyA==","signatures":[{"sig":"MEUCIQDTjBKf9kgXh+1PTOw6hXrTrqEqo2+FYb9OFWnpj7qLQgIgS339YWNIxgZLNdnzHhb3W7mRbXHnKVbIwZZwojAKs54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4553795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizSUKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotxQ//aK2c3NoKp+YNRUC/OlECJplZBgvuaVRG/8D3eCZNF+R1rL23\r\nLJ3hcrlzIhX9F9kMM+0a6ihuALtthXI0jK3tukNC6/j4Vk1E4tR0LyE7fd2x\r\ne9jY/x7UMYHIXUc7zb+VP3R/WRgUYX62bBkDhGxFj2NHtLAmYWPlBJCjUn5A\r\nMGJucLleGX8MjsMpsx5yJLsOBCRrKAOg9fB722/b5dbUnZH7dgErDRuoIGx1\r\n60uLco9lcbb2MOiq4JyJ4as4y7oJRNPri2hu/TC2QXGPWcUIZU+yy1isSQXa\r\naUzOAGMuC3il1LVRg/254T60oeoXqEfEfTc4lkXipUpluyNTnr+30H/YxINZ\r\nxt2Yy8f7zkJt+/5GfsRwQeJuJqd8+2KSp5YJ1RsYY/VSSknpGGrcI4Boj642\r\n9SDqf3w75SByU7RICQMXOIgURub5qB1VBrMbS6Y473nDGdiVnFdsG1hb5YGb\r\nLNwfxLCbqrR5lkjRe9cPXqXYPbPBiQxd6ujNWtoCLFLidi/9ctbXgSZRswvO\r\ngE4JALD5vqAT1O1fg901HrdOBzAu2+Hx/wjm5bZcOraoeYoSVLoaXzmFix++\r\nEg6o6vKo64KXquz7Ewu5qfxPdJVKZWHa2jaCaATG/W8ERFKFJ9kjOkC9hNlj\r\nq94ikpAHSP/r+RvY72yqeT2MqvBAY3ncbUM=\r\n=WiuV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use Metadata API](#use-metadata-api)\n\t  * [Use Resource API](#use-resource-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nACCOUNT_ID=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initMetadataAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initResourceAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Metadata API\n\nYou can now use KAS's Metadata API through caver-js-ext-kas. You can send a Metadata API request to the KAS as shown below and check the results.\n\n```javascript\nconst metadata = await caver.kas.metadata.uploadMetadata({ name, description, image})\nconsole.log(metadata)\n```\n\n### Use Resource API\n\nYou can now use KAS's Resource API through caver-js-ext-kas. You can send a Resource API request to the KAS as shown below and check the results.\n\n```javascript\nconst resourceList = await caver.kas.wallet.getResourceList(accountId)\nconsole.log(resourceList)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.resource.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","gitHead":"659cf4df9753fe1a5bb091b520da4c30ec381e8c","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.12.0-rc.1_1657611530459_0.22987344420871625","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"caver-js-ext-kas","version":"1.12.0","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"author":{"name":"Ground X Team"},"license":"Apache-2.0","_id":"caver-js-ext-kas@1.12.0","maintainers":[{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"}],"homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"dist":{"shasum":"6923021c03681443906a9bee70562d0f6586a79c","tarball":"https://registry.npmjs.org/caver-js-ext-kas/-/caver-js-ext-kas-1.12.0.tgz","fileCount":341,"integrity":"sha512-bUUgeJ43YicOKV8VOu2SsEU6OQzhuCcD23z2+fyhNHxpyOtHHvHMyyQi6AjOHYzQil1EwgG2zDBvKXRMSsrx/w==","signatures":[{"sig":"MEUCIBkTaCottk4EgfhIei9VlGH19vXBDnifa/OO5rQcwRXjAiEAtnoBn8v8ibo6dEkGxKpDYjT8m2aMMXKq/SR0Uybnn7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4554581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiz7c/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQuA//as1Cg8TWvPdA5BCgyOO5FiaQqGuz92Il+I73u/uYAv/doOk+\r\nCn6c5UYc34B73GnqZCpMLAdfGxUHUDFntu2NxI94N85leax4Ay+u/exTfdYa\r\nZg/pTAXY/5pn+ssrzwGBm+N00gF6KO25b/4qNo2U2xiQgc/pPpMDqbpzJCEY\r\nL/C4vIYEQNyF9SoT0LgTLJGCu3LC36MN7jDOsB9vAXFxuTxbBWHihXwUX+ro\r\nnj1B8lPG7ulMMgiZjFc8kOEnCf7dStXgEc7TdrgqgxJGYSRIYCocGciLCCdZ\r\nUAaz23RgwrTgUvRk5Ib/gAFl/pxFvFOgSgxwWAOwDq2IBC/YF3CvMR0CD3bT\r\nvoQox7/PfgLAJnI3CLSQl1LcyUoTP/4kJQ+JUf7B0xAsGQjTfkz9qj8RJq+x\r\n+2/5utGD3rbdpATRFeqRxWM2QpqCiaqyifqU/o+CUSy5y8MvQeBH4SiHsyCT\r\nu+WRFDRlMiiWEEpiRmTHDtswDq+5BNO2wG5L4FCBt1kS7R6xufoT6fQUgfVk\r\niCHTjb5RCiDQYUdWyYfFjepwpPPcQwstKSZwVi0kwu9rUBwNWft2JBS2YiLU\r\neHUoV+h826HyIH7/ig29otAUXGKUMiKYzv1yJIj61XqrW7iL9RjwJFsVeOqj\r\nqZAz6ti3QvbIL7LwrcT5jj8Kd7adrI3rg2w=\r\n=SGmK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","babel":{"presets":["@babel/env"]},"gitHead":"ce0f37a5de9bdacb8fe4678c66f21233fdb5b7ce","scripts":{"lint":"eslint './**/*.js'","test":"npm run build && npm run unitTest && npm run intTest","build":"webpack --mode production && npm run generateDocs","testQA":"npm run build && npm run unitTestQA && npm run intTestQA","intTest":"./node_modules/mocha/bin/mocha ./test/intTest/*.js && npm run intNodeAPITest ","lintFix":"./yamlFormatting.sh && eslint './**/*.js' --fix","testDev":"npm run build && npm run unitTestDev && npm run intTestDev","unitTest":"./node_modules/mocha/bin/mocha ./test/anchor/testAnchorAPI.js && ./node_modules/mocha/bin/mocha ./test/tokenHistory/testTokenHistoryAPI.js && ./node_modules/mocha/bin/mocha ./test/wallet/*.js && ./node_modules/mocha/bin/mocha ./test/helperTest.js && ./node_modules/mocha/bin/mocha ./test/kip7/testKIP7API.js &&  ./node_modules/mocha/bin/mocha ./test/kip37/testKIP37API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v1/testKIP17API.js &&  ./node_modules/mocha/bin/mocha ./test/kip17/v2/testKIP17API.js && ./node_modules/mocha/bin/mocha ./test/metadata/testMetaDataAPI.js","intTestQA":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=qa && npm run intNodeAPITestQA ","intTestDev":"./node_modules/mocha/bin/mocha ./test/intTest/*.js --testEnv=dev && npm run intNodeAPITestDev ","unitTestQA":"npm run unitTest --testEnv=qa","unitTestDev":"npm run unitTest --testEnv=dev","generateDocs":"jsdoc -c jsdoc.json README.md","intNodeAPITest":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js","intNodeAPITestQA":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=qa","intNodeAPITestDev":"./node_modules/mocha/bin/mocha ./test/nodeAPI/*.js --testEnv=dev"},"_npmUser":{"name":"gx-devops","email":"team.devops+npm@groundx.xyz"},"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"_npmVersion":"6.14.11","description":"This is extenstion library of caver-js for connecting KAS","directories":{"test":"test"},"_nodeVersion":"12.21.0","dependencies":{"dotenv":"8.2.0","lodash":"4.17.21","webpack":"4.43.0","caver-js":"1.6.5-rc.1","superagent":"3.7.0","querystring":"0.2.0","webpack-cli":"3.3.12"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","jsdoc":"^3.6.7","mocha":"6.2.3","sinon":"9.0.3","eslint":"6.5.1","docdash":"1.2.0","prettier":"1.18.2","@babel/cli":"7.14.8","sinon-chai":"3.5.0","@babel/core":"7.11.1","@babel/node":"7.10.5","babel-eslint":"8.2.6","chai-as-promised":"7.1.1","@babel/preset-env":"7.11.0","eslint-plugin-react":"7.10.0","eslint-config-airbnb":"17.0.0","eslint-config-google":"0.14.0","eslint-plugin-import":"2.13.0","eslint-config-prettier":"6.4.0","eslint-plugin-jsx-a11y":"6.1.1","eslint-plugin-prettier":"3.1.1"},"_npmOperationalInternal":{"tmp":"tmp/caver-js-ext-kas_1.12.0_1657780031711_0.753919255806351","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-09-24T02:52:44.757Z","modified":"2025-04-30T01:40:03.240Z","1.0.0-rc.1":"2020-09-24T02:52:44.941Z","1.0.0-rc.2":"2020-09-24T04:25:57.619Z","1.0.0-rc.3":"2020-09-24T05:58:40.873Z","1.0.0-rc.4":"2020-09-28T03:12:49.475Z","1.0.0-rc.5":"2020-10-07T05:34:41.711Z","1.0.0-rc.6":"2020-10-12T03:38:26.601Z","1.0.0-rc.7":"2020-10-15T00:06:46.110Z","1.0.0":"2020-10-15T00:23:34.800Z","1.0.1-rc.1":"2020-11-10T07:46:15.983Z","1.0.1-rc.2":"2020-11-12T08:04:33.403Z","1.0.1":"2020-11-13T05:16:35.903Z","1.0.2-rc.1":"2020-12-16T06:39:48.322Z","1.0.2":"2020-12-23T00:49:33.873Z","1.1.0-rc.1":"2021-01-28T01:50:36.994Z","1.1.0":"2021-01-29T00:38:05.589Z","1.1.1-rc.1":"2021-02-08T00:21:34.320Z","1.1.1":"2021-02-08T00:40:43.743Z","1.1.2-rc.1":"2021-03-29T00:32:38.946Z","1.1.2-rc.2":"2021-04-05T08:07:38.600Z","1.1.2-rc.3":"2021-04-05T08:21:52.742Z","1.1.2-rc.4":"2021-04-12T00:35:37.634Z","1.1.2-rc.5":"2021-04-19T01:31:17.163Z","1.1.2":"2021-04-19T01:53:46.829Z","1.4.0-rc.1":"2021-05-17T04:47:22.164Z","1.4.0-rc.2":"2021-05-17T06:20:20.400Z","1.4.0-rc.3":"2021-06-02T08:28:35.545Z","1.4.0-rc.4":"2021-06-02T23:56:25.563Z","1.4.0":"2021-06-03T00:27:06.395Z","1.4.1-rc.1":"2021-06-17T02:13:43.129Z","1.4.2-rc.1":"2021-09-09T11:14:55.583Z","1.4.2":"2021-09-09T14:40:57.336Z","1.9.0-rc.1":"2021-10-01T05:45:19.464Z","1.9.0-rc.2":"2021-10-07T01:01:13.732Z","1.9.0":"2021-10-08T03:00:19.961Z","1.10.0-rc.1":"2022-05-13T04:35:10.009Z","1.10.0-rc.2":"2022-05-19T12:18:20.064Z","1.10.0-rc.3":"2022-06-03T07:16:28.128Z","1.10.0":"2022-06-07T01:50:35.336Z","1.11.0-rc.1":"2022-06-20T04:41:07.269Z","1.11.0":"2022-06-20T05:58:01.256Z","1.12.0-rc.1":"2022-07-12T07:38:50.683Z","1.12.0":"2022-07-14T06:27:11.967Z"},"bugs":{"url":"https://github.com/ground-x/caver-js-ext-kas/issues"},"author":{"name":"Ground X Team"},"license":"Apache-2.0","homepage":"https://github.com/ground-x/caver-js-ext-kas#readme","keywords":["caver","caver-js","kas","caver-js-ext","caver-js-kas","caver-js-ext-kas","klatyn","Ground X","ground x"],"repository":{"url":"git+https://github.com/ground-x/caver-js-ext-kas.git","type":"git"},"description":"This is extenstion library of caver-js for connecting KAS","maintainers":[{"email":"team.devops+npm@groundx.xyz","name":"gx-devops"}],"readme":"# caver-js-ext-kas\n\ncaver-js-ext-kas is [caver-js](https://github.com/klaytn/caver-js)'s extension library for using KAS (Klaytn API Service).\n\n## Table of contents \n   * [Installation](#build/install)\n   * [Getting Started](#getting-started)\n      * [Set Auth](#set-auth)\n\t  * [Use Node API](#use-node-api)\n\t  * [Use Token History API](#use-token-history-api)\n\t  * [Use Wallet API](#use-wallet-api)\n\t  * [Use Anchor API](#use-anchor-api)\n\t  * [Use Metadata API](#use-metadata-api)\n\t  * [Use Resource API](#use-resource-api)\n\t  * [Use KIP17 API](#use-kip17-api)\n\t  * [Use KIP7 API](#use-kip7-api)\n\t  * [Use KIP37 API](#use-kip37-api)\n\t  * [Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API](#use-kip7-kip17-kip37-and-contract-with-a-klaytn-account-in-kas-wallet-api)\n\n## Build/Install\n\nTo try it out, install caver-js-ext-kas with npm like following command:\n\n```bash\n$ npm install caver-js-ext-kas\n```\n\n**Note** \"package.json\" file should exist on the same install path.  If it does not exist, \"package.json\" should be generated via `npm init`.\n\nTo install a specific version of caver-js, try the following command:\n\n```bash\n$ npm install caver-js-ext-kas@X.X.X\n```\n\nYou can build it with the command below.\n\n```bash\n$ npm run build\n```\n\nThe result of the build is located in \"dist/\" and is named \"caver-js-ext-kas.min.js\".\n\n## Test\n\nThis library contains tests. Create `.env` file to define environment variables before performing the test like below.\n\n```\nSENDER_PRV_KEY_JS=''\nACCESS_KEY=''\nSECRET_ACCESS_KEY=''\nACCOUNT_ID=''\nPRESET=\nFEE_PAYER_ADDR=''\nOPERATOR=''\n```\n\nYou just need to fill in the values in the format above. After creating the `.env` file you can run the test using the command below.\n\n```bash\n$ npm run test\n```\n\n## Getting Started\n\n### Set Auth\n\nYou can use KAS' Node API, Token History API, Wallet API, Anchor API, KIP17 API, KIP7 API and KIP37 API through this library. To use KAS, you need your \"access key id\", \"secret access key\" and chain id of the Klaytn blochain network.\n\nSet your authorization using the `constructor` or the `caver.initKASAPI` function as shown below. Below code sets the authentication key used by the node api, token history api, wallet api, anchor api, kip17 api, kip7 api and kip37 api at once.\n\n```javascript\n// Set an authorization through constructor\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n```\n\n```javascript\n// Set an authorization through 'caver.initKASAPI' function\nconst caver = new CaverExtKAS()\ncaver.initKASAPI(chainId, accessKeyId, secretAccessKey)\n```\n\nThe following describes how to set auth key for each node, tokenHistory, wallet, anchor, kip17, kip7 and kip37 api.\n\nEach initialization function is provided so that you can pass an optional endpoint url as the last parameter. If the endpoint url is not passed as the last parameter, the KAS production url is set by default.\n\n```javascript\ncaver.initNodeAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initTokenHistoryAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initWalletAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initAnchorAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP17API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initKIP7API(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initKIP37API(chainId, accessKeyId, secretAccessKey [, url] [, version])\ncaver.initMetadataAPI(chainId, accessKeyId, secretAccessKey [, url])\ncaver.initResourceAPI(chainId, accessKeyId, secretAccessKey [, url])\n```\n\n`caver.wallet` in [CaverExtKAS](https://refs.klaytnapi.com/en/sdk/js/latest/CaverExtKAS.html) is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that internally connects the [KAS Wallet API](https://refs.klaytnapi.com/en/sdk/js/latest/Wallet.html) since [caver-js-ext-kas v1.0.2](https://www.npmjs.com/package/caver-js-ext-kas/v/1.0.2).\n\nIf you want to use the [in-memory wallet](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) provided by the [caver-js](https://www.npmjs.com/package/caver-js) as it is, create and use an instance of [KeyringContainer](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.wallet) as shown below.\n\n```javascript\nconst caver = new CaverExtKAS()\n\n// Create a KeyringContainer instance\nconst keyringContainer = new caver.keyringContainer()\n\n// Create a keyring from private key\nconst keyring = keyringContainer.keyring.createFromPrivateKey('0x{private key}')\n\n// Add a keyring to the keyringContainer\nkeyringContainer.add(keyring)\n\n// Sign with the keyring added to keyringContainer\nawait keyringContainer.sign(keyring.address, transaction)\n```\n\n### Use Node API\n\nYou can now use KAS's Node API through caver-js-ext-kas. You can send a Node API request to the KAS as shown below and check the results.\n\n```javascript\nconst blockNumber = await caver.rpc.klay.getBlockNumber()\nconsole.log(blockNumber)\n```\n\n### Use Token History API\n\nYou can now use KAS's Token History API through caver-js-ext-kas. You can send a Token History API request to the KAS as shown below and check the results.\n\n```javascript\nconst ftContracts = await caver.kas.tokenHistory.getFTContractList()\nconsole.log(ftContracts)\n```\n\nThe query options used in the token history api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.tokenHistory.queryOptions({ kind, range, size ... })\nconsole.log(queryOptions)\n```\n\nEnum used in query option used in token history api is as follows.\n\n```javascript\ncaver.kas.tokenHistory.queryOptions.kind // KLAY, FT, NFT\ncaver.kas.tokenHistory.queryOptions.status // COMPLETED, PROCESSING, FAILED, CANCELLED\ncaver.kas.tokenHistory.queryOptions.type // KIP7, KIP17, ERC20, ERC721\n```\n\n### Use Wallet API\n\nYou can now use KAS's Wallet API through caver-js-ext-kas. You can send a Wallet API request to the KAS as shown below and check the results.\n\n```javascript\nconst account = await caver.kas.wallet.createAccount()\nconsole.log(account)\n```\n\nThe query options used in the wallet api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.wallet.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Anchor API\n\nYou can now use KAS's Anchor API through caver-js-ext-kas. You can send a Anchor API request to the KAS as shown below and check the results.\n\n```javascript\nconst operators = await caver.kas.anchor.getOperatorList()\nconsole.log(operators)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.anchor.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use Metadata API\n\nYou can now use KAS's Metadata API through caver-js-ext-kas. You can send a Metadata API request to the KAS as shown below and check the results.\n\n```javascript\nconst metadata = await caver.kas.metadata.uploadMetadata({ name, description, image})\nconsole.log(metadata)\n```\n\n### Use Resource API\n\nYou can now use KAS's Resource API through caver-js-ext-kas. You can send a Resource API request to the KAS as shown below and check the results.\n\n```javascript\nconst resourceList = await caver.kas.wallet.getResourceList(accountId)\nconsole.log(resourceList)\n```\n\nThe query options used in the anchor api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.resource.queryOptions({ size, fromTimestamp, toTimestamp, ... })\nconsole.log(queryOptions)\n```\n\n### Use KIP17 API\n\nYou can now use KAS's KIP17 API through caver-js-ext-kas. You can send a KIP17 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip17.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip17 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip17.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7 API\n\nYou can now use KAS's KIP7 API through caver-js-ext-kas. You can send a KIP7 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip7.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip7 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip7.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP37 API\n\nYou can now use KAS's KIP37 API through caver-js-ext-kas. You can send a KIP37 API request to the KAS as shown below and check the results.\n\n```javascript\nconst contracts = await caver.kas.kip37.getContractList()\nconsole.log(contracts)\n```\n\nThe query options used in the kip37 api can be used as follows.\n\n```javascript\nconst queryOptions = new caver.kas.kip37.queryOptions({ size, cursor })\nconsole.log(queryOptions)\n```\n\n### Use KIP7, KIP17, KIP37 and Contract with a Klaytn account in KAS Wallet API\n\nYou can use caver's [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) as it is by using the account stored in KAS.\n\nSince CaverExtKAS wallet is a [KASWallet](https://refs.klaytnapi.com/en/sdk/js/latest/KASWallet.html) that connects with and operates with KAS Wallet API, [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) can be used the same as the existing caver-js.\n\nHere, we introduce a simple example using Contract, KIP7, KIP17 and KIP37 respectively. Please refer to [Contract](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract), [KIP7](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip7), [KIP17](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip17) and [KIP37](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.kct/kip37) of [Klaytn Docs](https://docs.klaytn.com/bapp/sdk/caver-js) for detailed usage.\n\nThe example below introduces how to use `caver.contract`.\n\n```javascript\n// Deploy contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi)\n\nconst deployed = await contract.deploy({\n\tdata:  '0x60806...',\n}).send({\n\tfrom: '0x{from address}', // An account corresponding to the address must exist in KAS.\n\tgas: '0x4bfd200',\n\tvalue: '0x0',\n})\n```\n\n```javascript\n// Execute contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst abi = [{\"constant\":true,\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}, ...]\n\nconst contract = new caver.contract(abi, '0x{contract address}')\n\nconst receipt = await contract.methods.set('k', 'v').send({ from: '0x{from address}', gas:'0x4bfd200' }) // An account corresponding to the address must exist in KAS.\n```\n\nThe example below introduces how to use `caver.kct.kip7`.\n\n```javascript\n// Deploy KIP-7\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = await caver.kct.kip7.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n    decimals: 18,\n    initialSupply: '100000000000000000000',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-7 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip7 = new caver.kct.kip7('0x{contract address}')\nconst receipt = await kip7.transfer('0x{to address}', 1, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip17`.\n\n```javascript\n// Deploy KIP-17\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = await caver.kct.kip17.deploy({\n    name: 'Jasmine',\n    symbol: 'JAS',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-17 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip17 = new caver.kct.kip17('0x{contract address}')\nconst receipt = await kip17.transferFrom('0x{from address}', '0x{to address}', tokenId, { from: '0x{from address}' })\n```\n\nThe example below introduces how to use `caver.kct.kip37`.\n\n```javascript\n// Deploy KIP-37\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = await caver.kct.kip37.deploy({\n    uri: 'uri string',\n}, '0x{from address}') // An account corresponding to the address must exist in KAS.\n```\n\n```javascript\n// Execute KIP-37 contract\nconst caver = new CaverExtKAS(chainId, accessKeyId, secretAccessKey)\n\nconst kip37 = new caver.kct.kip37('0x{contract address}')\nconst receipt = await kip37.safeTransferFrom('0x{from address}', '0x{to address}', tokenId, amount, { from: '0x{from address}' })\n```\n\n\n## Other Docs\n\n[KAS Docs](https://docs.klaytnapi.com)\n[caver-java-ext-kas API Reference](https://www.javadoc.io/doc/xyz.groundx.caver/caver-java-ext-kas/latest/index.html)","readmeFilename":"README.md"}