{"_id":"minter-js-sdk","_rev":"174-972213aa850a9dbdd6469674177ce7f4","name":"minter-js-sdk","dist-tags":{"latest":"0.46.2","next":"0.42.0-alpha.4"},"versions":{"0.0.1":{"name":"minter-js-sdk","version":"0.0.1","description":"JS SDK for Minter Blockchain","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"Daniil Lashin"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","_id":"minter-js-sdk@0.0.1","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"danil-lashin","email":"danil-lashin@ya.ru"},"dist":{"integrity":"sha512-oF+LSLZYPDfs2rFpKUjCHXDrJ7/dkKHT1swfccatUn9fg+P3ZShYlFhBylDe5ugMWXM0T0aVwWulHqXOFPFUog==","shasum":"582d1c11a7fd727711e353eadd12b48dd74cf3d8","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.1.tgz","fileCount":9,"unpackedSize":12080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLmrlCRA9TVsSAnZWagAAqrUP/AwdpGp2kAVj35Py2rEN\n9f0/B9R5WurNaKCIsqSqf3fWHouGsr6aho4LeICDVfBAhf4ygvsa0rMzg5n2\nQhhDCh5RutGRiHST2e4WSRx2kV/44m1lqyyqW4bRQpwfC9qGOh9NbFtz2M4P\nuWGswhGKlNOYhWVGTvh9BMdsHkUBSPq4JSnzzvSFFZ7qLxJ5c5aCbdDJzkpK\ndwK7zjjSTf1VpR66umTWYjiDvkXO/VPxZ5dn3rZbA1oZdCtaH5FLWjpPZrTY\n29owKnEJ5kgHkFoo2lV3dOJb31AHh8aqRdnB7Ybez/1FIh6WUp2nNwPvHiFI\nPkBHHG390mD7PpBO/18QAlqZISOT1eF+l6/PPA0XbKL0qbjLFhYeGSYoBZz9\nWY0UhuXJSHJvIq/YvR/AYubCouGZ4c1tiyGyArKkEA/n2L94mDdTV+PeEMGg\nULvnde/cL2dSC6PL2M46dCm0DkcyD4ArT8lJTGkeHxKnrJ6zPp/hTpzc5+53\nHoxc/F9uTsqMx0HU41zEEDaC16L31Dfv8gx1w0zYtkAL/xG9cDy6xgxdhaFc\ngrxSnF6F2fYn+3aIJAuC/sv9+7wqsy2WTPgpIpX7N9zPQGAWi9Os1IKtvne1\neMBCr9rYlFnrirZZDPxpx97eUoewVz7ZPC6P3loolVFf9pGCdHgeAvr7zyOA\nT3eT\r\n=BAIy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUUqfLP4ceUWAQ48XSYSGtmnnm7vuL+fJ3UPKPg1hCoAiEA1gUbg2+LWsKWMky7xVBJzTUnF5ULYlcwbbY4DvrDVfM="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.1_1529768677582_0.14844623322098593"},"_hasShrinkwrap":false},"0.0.2":{"name":"minter-js-sdk","version":"0.0.2","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"Daniil Lashin"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.0.3","minterjs-wallet":"^2.0.4","safe-buffer":"^5.1.2"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","jest":"^23.4.0"},"gitHead":"0598fe2c2d4ab024fdaff89c94a475533e91c64e","_id":"minter-js-sdk@0.0.2","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-OPYUhmsz3VEEtKRiPtdCN+kJDTjynSY/QVYKUn5/Z+1qFwCqY6/6faD8mxIJyhyecn4Tq2sHTj7zcfbtXpl6Lw==","shasum":"bebcde25c2b31b4c50442f31d9dddd4ece310dea","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.2.tgz","fileCount":7,"unpackedSize":5490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSHNMCRA9TVsSAnZWagAA5YYQAJ8iNfcILQjizCKT4ba6\nRNy1rlJLKLTLwCWyDNIlZGTkW2mhQ4aRg43tfheCDTBpCEQMzPCt954fIsc2\nPZ0p8lLjro7CJAKEotC5qCAJNj+DR3Am9PbF3ftrVk7hX0OZiTt7+QKS2XxE\nM6gMeaI46k0dMemm7Ksu7fhuexcIXTa0bLpN/1bhjOsKe97OEPatLMCV0Kz7\nf6oZ//3ZCOBLAuNhMVwiBGqwknkVp9jcEP6L/IqFL88lZGYPFIqo29OI4avF\ntIMzYShFXKyG+RNpSv9lV2fKloVHlbR5BtIAKdTSlDn+zQYjULWkLVOwGmrc\nWKif79Rj5P0l/GGLd7sKzNvZFMWBESH3cMUdm59OkbqSn1sOgaJI0ya0e4SH\nUPR+BUAaUxwFlKEFnSaBhj0s6g25CIId41bEqBuhE0FfuScSnTso3kjPIt+r\nij7dN6/hz7b5KpyX4GW2X5R24M0Q/I1IliXZrIgQu4mLJyGHC9DfQpzTRvVV\ns5cIvUO9ceJWaT88IqeoME1bC3ofvkHoBpzXQQv8EIjHrvumhbQlXP+7MFlt\nFkLttvX/T4BPTw9i1k+FWYxGyohJVTevaolP79e7v9ZmUraBbE+N6ZEItW4K\n/7cG013l8qdM9bajEvCrsYf2b9fiRSLELcxD7PdH4KJ9q07/T7VFaEjrPrZN\nuX2d\r\n=0eRO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBsJRbxKXwlvg4oX0CGM96UNfN9UmVo2Mn6pPT8uCzjAIgGDDZfT9ekkPno+W4l7JnuPVx8OdTe+wF5ToQtmiFA+k="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.2_1531474764014_0.43562603623876095"},"_hasShrinkwrap":false},"0.0.3":{"name":"minter-js-sdk","version":"0.0.3","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"Daniil Lashin"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.0.3","minterjs-wallet":"^2.0.4","safe-buffer":"^5.1.2"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","jest":"^23.4.0"},"gitHead":"d45bf69698b330d37d34dd940155ae0c3cbba3ef","_id":"minter-js-sdk@0.0.3","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-QtsxOD54M2sqfO1kAfRElu5VO+LI3A5iT0QIfNvK3sLWyH0oqUJpJsmY+OCRN76WUR+uIAHXAxdfbG9uwwHyJQ==","shasum":"b57f5a49fb52dc0ebc758109bc2b0dd8188ac9b5","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.3.tgz","fileCount":7,"unpackedSize":5478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSHYfCRA9TVsSAnZWagAAwbAP/RMLjtCApJ6I/+jN6bZe\nUNOPeD+44Wk6gl5kOoo9VK0OJJwSL+gNP5gOu6UauOQtESxLGeaVnKBabuy2\n3Ko4rehw1/2ufTEg7jNFMsC+3v6v1G4gpoWwIchLEWD4Tjugk/IYl7rz8XuP\nUOCcmPx9dOXHjYCwd43WBOqIkXAdW63cKYs2vS6QYak5iHWG2wdLWdHiAqUo\nME9wskLhMQ0X4txuMLzjhZW0ylOyhVXILrHMvjNRiy9gFGmNtGH14AXyY6+9\nS/Nq/mOzHOMHID8uRJeMoe8pVPPO+lmRpFUIUhd8zdeYqOqNl7XG1m7lXalf\nzyy75gglwAMF2muAWoe/dmllzXOf2tArnIuwzYTW8qlwpUI7dRSNNki4tIrp\nO1Wsv8JjQzfEPG44LK15iay6aL/S0ipJHMG1J7MEL1IiBquF82UCRP7DdLaf\nEfEm2LxZib0sWSk3ilRObc0+HR7l8EqDftrQCa3j9vxqEoGLnLKBawSw79ks\nFWBS4cct95TtX9QatXUQkke6LUVTqkGqk1fKTH+7NH9hEHiK5HOQKbkItn16\n3sJcuexoUCFKNafC1UpJ/R48VjpB7CBCRIVB2fJb7ZyfC/DzEBHNPvyb2vEF\nED/vafHt/cuces6i+sokgdsShbRn9D00wuOek1+8eqkIvvAVT3y/QnAresSn\nET2S\r\n=9y8L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRXFtdcf1TftD8Xri7ODkt/NjVGD6e/daafstjkGgITAiEA5kKkWGL5L89JZ/CDL0EPoBEiuKZQ0ic2l0Kv2dkOHGw="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.3_1531475487876_0.3027382542139774"},"_hasShrinkwrap":false},"0.0.4":{"name":"minter-js-sdk","version":"0.0.4","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","js-sha256":"^0.9.0","minterjs-tx":"^1.0.5","minterjs-wallet":"^2.0.4","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","jest":"^23.4.0"},"gitHead":"4f25b19719a265bd1e961611935003e2a346992a","_id":"minter-js-sdk@0.0.4","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-gIzfteNvVLQBC5s6t58Bhxka5he3ATpzDuc5HISWPxOB9T5Qbsp43eA3W+990yleNM2DGmcELD4fm2O7tGZc2A==","shasum":"0c1c1342b7372da4b9d8060112a8f1721bed6aec","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.4.tgz","fileCount":9,"unpackedSize":10879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSKRTCRA9TVsSAnZWagAAhrYP/1HuskvrBCASbf2/sdjV\noSCR1a3J5W0ylKIOQi7kIike9HuywzduV2WfrqEE51Mtm8BbtkB1rq8F7aPH\n9MdOaxp14RbBroyWWzpNnLIzs1PElIVwVA2HtbX1QlHXyQpBqmDoShJf2b08\nuKgk2ZmfKUfj4UWUhEMe3Co2xCKXUW9UGf52d0tECYncsnqRHxvvdrYQ6RDK\nNeAYmIwH+zQRDLcVGgCUBv+yUYjAA1VeSCvQ3mR+pQTJJZeLH/bKK40jubKX\nmkCyUgX21DYrvG3Nvh+vC5iZyjoQ9hQdf3sPYuB1H8gYxRTTYuJ/iQfUlquE\ndGMbpzrA24pAuuFkez+/e7DxQG05cstcjG8Wp3N++jwO+zpTTL1DhySx58aw\ng64AQbOFaA3ydkcmGN2DkdsqkDmrAMIAAGarzkSUXhtnd5KUxSaNiELy8SEn\ncB0bPcfSWnv8OCc1psVL/yiahwsF91dJqfhT4ruexnDaE/LTDYJcTamAriB0\ntIO2Yf552sK4maJsx9mBrYf2+DDQmM7R/E34DF27IqOQFYiK1c4tMIkAtAv5\nsAPtEHYzSJiK7ztDfRL/msSiaISFA/dJxYB/biOuYumOUBbEaee9Vsfh3Pqw\nX0wrIr/SqAcVQ63MYnJsn7+J0HxLpE2Bba4tVHOOZXI0+nj2wUrWLkx4tNls\nwhkn\r\n=KquD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9v1Dz43n6eDyHgFYr3duFuPwCgPPOdWKQAOZx1pDVTAiEAsPC9OVRPiRdqj0DDbUte0c75AUj7CZoQecdkm+eLMSQ="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.4_1531487315418_0.837970572771152"},"_hasShrinkwrap":false},"0.0.5":{"name":"minter-js-sdk","version":"0.0.5","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.0.5","minterjs-util":"0.0.3","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","jest":"^23.4.0"},"gitHead":"7788536665f7a1dd37504550036cde8ade013bc8","_id":"minter-js-sdk@0.0.5","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-X41ptMtSECXkk3TDZCmYKRycoNLfJ/OksJan9ppEqUm/CQBipKVUugqIr9IxJHLkTSG+L0iSPph+J8p+HYO0iw==","shasum":"fea5f0af9979f5548f9b6008437eefddf2536b8b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.5.tgz","fileCount":8,"unpackedSize":10991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbSOaNCRA9TVsSAnZWagAAj8kP/iBqj4WUbmYB9yxhGx3I\noqRJfkik1SZscBzDDnj3wB/nHR0Z825EhMMvDyCrox0qZvu/8m6no0b7BJBd\nd5Wpq9SbEy8VkXuVdUlvO8R8Q8zcTpBjvlNDhPschX9aG9JB0lDpBO2VehRD\nUD6iNuiUgthzc+sIq6bt4hOQMdrjO2qTO32YNxCOgyDr0qOrmI3YkwX4Xakt\nrZ5jyXsd12Hci+lDQXdnoP9sgo2v0pHXx/CxfPwSn6BMewJtubog8rD/A12B\nbndLlt8oGfpz14IBruq50lhUoVVSMvvdwW4ICkJUshrz91zt1uFQNjmK28Yl\nTa+weqs4TQL2j+UvBnGMNc235ryrcoa1Yv1BYJ3zt9vZlPBVqVQJIUd2Foa3\ndH9R5gmbeXlaJA89LPflX032BrOyVULjs8SUdXRAahFjLJYoE+bExs864p+7\n9xuHrQugWTJEQhC2qyTziPaj8Crvv1oWnT2U13JDbVG668/GqpCSfyqom7Te\nRWKShvLzNGCESgCUhQHTa1fGnqMF47aGPco0k1ERTbTO6WR3L1HI5Bk9N7tg\ncZuW+ZKOhkfGfZ9EaHTxw0o0kP5I5vApCzYLDHyxgLk8wX1g+HQLN5YxWiUu\nZBzwYpkDPFsSbPGi4tsOUwoo3tYp8zd8IHnx+0qNbcvx/ZfQ0nXJLF881kjv\nqXnp\r\n=26G9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDH90lfsV4CZlhwpei/vtaoGnwXUifl09Jvh1wJFzxVkAIgK25G5N9Lhj9g5/pX0a/V1jFvhD6z/zKNYmHI07IFWnQ="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.5_1531504269247_0.6423872066456207"},"_hasShrinkwrap":false},"0.0.6":{"name":"minter-js-sdk","version":"0.0.6","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublish":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.0.5","minterjs-util":"0.0.3","minterjs-wallet":"^2.0.4","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.1.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.0"},"gitHead":"e4d4bc27482fd781ddbdabc4f9a6a31fc175fe59","_id":"minter-js-sdk@0.0.6","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-kDoFD+cAdb/7BNyLrGVbs3gjz2WU/9u0Tk+0ohVlTB2dfdZylVkgYfoo6g+6oxNQHO+aVilcr2Fa8t3vOAsAlg==","shasum":"61a65f665463397ee10035aa7a56deed7062ecd3","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.6.tgz","fileCount":10,"unpackedSize":15409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTIRyCRA9TVsSAnZWagAAvM8P/0LONXuF9mV+Mfrfm55x\nzNqPA43Wa2IPfFOUTGCqVVEUCSEurg6BfowCYSyOq/V1aLUWC/fDuwj0tv0t\nYT7Vmn9gi9s3y7KNxMBMaJlXMM6bI7LLsHMD6URFv3Zf0XVEHj87Hoy5B38f\n8oO9X9teUHampqQ2wBKA/t/OhmEpPGTNjHUnFK96el1HEt+79HdRalGSzfwh\nrHjDtnexW/EYS8+pEcTRNiOsQoCcEfg59oO+voRAfr3lejgpejnN2k+4UYTy\n6uPyoZJO2peAs8z+ptXmIwpCtnpexC2LO75HQcGwZRhG46YDLZQjAg0/Y7DN\nVdPkMH72o91b3L1S6SmQ+hPzG7ELwz+ypvc+H3lCDyjimRa9N6vYUv/FVT7f\nZFPSlmiC2ZJwF3os7AO35cROeRv7XAS+JbQlurBmm5M30KRKhz5kqImR5QZe\nZzo+kn7H16D6wlA7lGKBSH9gj/cOUf5g1Kth6ZP63GIxLnaTs9PK2hkGu6po\n6zknXv95dXDC2RUwwVZw7lCskYQBnZ52SBKWYInA52jbGYKR2dX3hdAsphFb\ndOnOg8MRxr7vX+uBZZplIfPRiFQ2b8fqZ/r8L53vqzIrdhCh/ZCrkXFa2y+p\n+1R7lk1ZO98LdDAAMye+CitGBW7WQkSe1wYZLNrnNkzp7Ma9FQz98HkhaBeM\no75Z\r\n=ipe1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZ4LmyDdWD4KRaYjlXAgkSBNdivZtGFZT2fCuruLlY5AiA0I2E0q3CJRhOCeeCcARG5H7BJ8/Ak1Fd8VEGwXXdxvw=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.6_1531741298025_0.44208323013414463"},"_hasShrinkwrap":false},"0.0.7":{"name":"minter-js-sdk","version":"0.0.7","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublish":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.0.5","minterjs-util":"0.0.3","minterjs-wallet":"^2.0.4","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.1.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.0"},"gitHead":"4129956341e4cc690dbf141422245fbf9b11b605","_id":"minter-js-sdk@0.0.7","_npmVersion":"6.1.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-ifd8RdUgHSU0rZ85LgwCaZtpENp8P1LJJuZ8Q8FUPr/pFc59ut5ebqYgBugQ5T6s+wwUT03L3v6YGsPviVCrLg==","shasum":"c585c69fc92a67ae2b1361c70e9edbf4fa55f1e9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.7.tgz","fileCount":10,"unpackedSize":15415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTJHvCRA9TVsSAnZWagAAPxgP/3WnzkbXEF5q2IxkO8O0\nXao8qtQtaUupVOT4zFlHGUyn5dNLP+7ZewQzPgMfYm87OdT0zSzJ8sfu59Yh\nCNNvXb61imlPvpA18REepXJCxi78zvBtHDfe393p8hJyJsio0RY8LvMqqhX2\n4YswzSk7Mstcg9eYaAgelRQjwpV3phBQXXxpVVvprUaAR3zMDPk47h/lCmNq\nxs/0AOPygUj8pDI/8ulfyuCi672pX8li9OUE08F3ajko3ZYMXOtLg4zKRv4N\nebatw70u2G51Ci77RrTEcrqMTV/aFVo6AlYsFWzBoNSy/2GF/C99pksYYGuL\nGlOCg1+iJDEJNsjDqcERvWmRiqE5Ri6g9X7WtsqtDOsGKyctHDxs6+xsv9yh\n2/4k7a9h4CPyjOKcnfBey7nLEDbYj3IB08gCORJ8C7656pa9HDGqiXuJhV7i\nXc/iVDiAbYUENvXs5fo4q4zTPm0o2MNbdTXOqneUA4kmSzjrot4osZtBczJX\nVv0NfhUrHdOKF9wAkAK8qzcAcBDCJM3i1fKgL7ZNklyp0duaCobfeoDB0RIO\nZpKWgs/+TxDhzViIEXmFjkpZp5dboOI1GuhmJrvZxCofDxC5rOPOl5c202uc\njJQ9k4+DQY1l5Y3KVudzvIWAgAnAOvsQ7ejdyQZzUXxdZvwIXtfxkt5zVwae\n7OSR\r\n=3yH3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9z1NBUGk//0Ij+t/tOKn1hlul1RSwpJyODz/QBkSBPQIgY2ihAiNc4NWoI79MNt1swTwXVIOXbhhsps2erwvxn30="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.7_1531744751721_0.137191376354731"},"_hasShrinkwrap":false},"0.0.8":{"name":"minter-js-sdk","version":"0.0.8","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.1.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.1.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"b2d3b5a18ec8eed2222c2a74e30f0e684d3d6e31","_id":"minter-js-sdk@0.0.8","_npmVersion":"6.2.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-5qklwkFIi86kGS1rUsdmXW9OUs4u5NbqKGty0L54Ap4h9wmn4uIzdDnFtwlfXwoE5Rez11s44dKe+dMFBmKIdw==","shasum":"f9a3143529b2a4a719443a906b4e0760d01cbb54","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.8.tgz","fileCount":10,"unpackedSize":15914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUgqWCRA9TVsSAnZWagAA7FgP/2Wsy3KsE5vU2RyceD2g\nHYUqRpBp3+RHnCAo5B3NpY7LecNEZUylkRaI+oRUrUZJXdhVJB0ltOsJHcRL\nuZt1vqXGSYcWDVkOBT6oviPfijx1jzhbqsjWIZq0/jnf7Eo71Qf6DoHlTLRp\nCQqR24wf67366o1QwuGdAjcl7w5MqbpHCsjNKHUSMOsrSxvDtV1kv07PJwiU\nz1Oe0H0yq//z0OAC2KIK+Hw6oKK5JpZQ8nQYm7cORnAbEQleVeWHvM+0TRQi\nbNPvNy5Ss0ykp6EPbwtGRgdZDDWIpn7jyt0DAsAORTDF5d23Bwvl+V75IlxA\nVhprr4bUp7Vf9WCiC52aX07Cnq9k2Sna4WaoyV5m+omtKMXRnhvMnsnm+Cr0\n5gF6ZWGziF/TFq9qdhxHvUX1HHUAG71oVDpUYPvjCHdnoPg5U/hlIeyJrQ58\nEAL+PS7GHmGIQUACQZYDF6ROllfgOfk262v9DDk6qX4NBACDfajp0DVwfrTD\nBx7DI5Wgo2fvXBlEsXfeu2EdBVhHu8tBzz6riEQuJWmAe+IqlbqunX9VP2Co\nnpIP2bG9E4JPnUWWJ3KsWJRPornMuKkoCLm4eFAXHtl5xBJVTzgZJOIzexMy\neYswCdcyRpW7ct9vJ9GIe7V+L03vM+X1JO/25Mt25/AOTiLrZlY/7nKODdqb\nrRH/\r\n=SUBa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBpM1hthNpU6NvRRSfJ8A0W2zwoG3xcHCHu/0ijb5b3ZAiEAigDhe4gAAOZudZf/yK2bOxEEU0ONP4fsbkz+7YUnzIc="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.8_1532103318469_0.6524483115645008"},"_hasShrinkwrap":false},"0.0.9":{"name":"minter-js-sdk","version":"0.0.9","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.2.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.2.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"b2d3b5a18ec8eed2222c2a74e30f0e684d3d6e31","_id":"minter-js-sdk@0.0.9","_npmVersion":"6.2.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-++vsFg30YW2e719c7Q7Tm5NQ1zG1+2zjPARYE7jrsdwqyU87+Khg81+bHAlVb/HN8raMMxi6EYvYnM7Cu6YG7w==","shasum":"3f533721289b9ef88c24970258527985fbb2f029","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.9.tgz","fileCount":10,"unpackedSize":19465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVgTdCRA9TVsSAnZWagAAsl0P/2zHFyHBNGlklyAEMV1Y\n4F2ppfsjBbUUrE61VDDXcSADvl1I2qEOQAFYby1+rN1qzEciEH4X9Ok9qyNK\n0smQMYk1FVJd44EKNaTTQm/6FbDszc5c+GgJXcK5uIBHGYNF1rgikRI6ShPB\nwp3VX2PbYwOlm/rK8pnibO+SL3wdB10/2X5OWxG9AA0kCkg+2KgxpKOaHNI8\ntaq0bE9FfEevWi84yGrpV37tojbl4UiHORE1YaPHKZjtvhFKIgUilwKc9dBb\nbtYg8inc8iJN06MgsrTGCXFTpxUM14o5pb/0PZhnp+pRPk0HhCPQ5ob5o96h\niw+Y96t9TeqU8Gjnh9xbXOd/yI+Hty88uTCs2IELPaozZ709JBzA7/9ygOW1\nQs/FN9pV54jdNeObL9/fdFKdUaPnWs0qs2ohvpXl7EjZTtTsWHTj0XNRNHxX\nDSco9iu2+uQQtYMY2CYFxkTYOXkheMszdxZ6vd3XNQybogwwXAm9ytwodo7o\nvKBGLrcs/gjiwkCH7IWkovwEO0RGor1IU07MsCczet0zw2TUgDjCINKn43E/\nZntORMlNibH8aZamyVcs0Jme2Lv2dJAdmo9P4cgiTrLCmcQfTTNF0tp8WkaF\nFnodL1LKJerzWz5qiTRTb0/5LuWVwWDWyN5Rs6dxyjEB+mu/Zz2XMliydSrE\nV9S4\r\n=NK67\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5s4aT19c4q/L8Mkfw6Fg9d7egz5gFVpJNEyH9rxT4oAiBMNK3oW28bI3nXMcZiM2r0Vwk17i8Po8LfHGZZ/Gmtpg=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.9_1532363997086_0.9905754765381074"},"_hasShrinkwrap":false},"0.1.0":{"name":"minter-js-sdk","version":"0.1.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.2.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.2.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"ba05d437895e389b3dfa7bc9ee4acac89d157625","_id":"minter-js-sdk@0.1.0","_npmVersion":"6.2.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-CqQQoJXyhe7tHgWLZCf0oowq/zOEJbyT9KnU7HCSOf62N8yJrD+ZRsJwP6wAAqBAsGFo61bA3Fv6IXWCSb4A2A==","shasum":"2726e9c55d19a21f57ada2c4fcb466e994b0b889","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.1.0.tgz","fileCount":10,"unpackedSize":19622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVhhRCRA9TVsSAnZWagAAjXUP/2iGdVxjAv89UKFlI8mx\nfJNsUWaFQjK/LEtMgyafCKj5CVaatahqPnWdTC3THrt2BiCgBhNPKnfbcOyO\nBMkcM57RwpfFVF3UJ/dXZXpofe2NO14CDNPFBPVSOHI1Z4J9ukaRSl0ioxEd\nvrJ6KOgfDn+ZAeEWkHr6aM2cjwgEE9VVGRR9cfk3hPsNiQA1tgDP+Jv1hdtV\nbTTJLkQuVZOnkWRtNk3YSMs/6sAgJBBBC904ZTbG5GDqce3/DesXXjoOuHdQ\nn1RiUBBLV0HJHEf9hoO3/0+cp593z9wxGdYfjj1YX2nHXaMhf+soXIUX/qWm\n4nICx/JlYOUiHHYkET/1/Vctay9m4XKi2ME8WGJl3vlFAFlHJDJGQ2Q1KA9+\ngz2MAL4QuNsC7uN61jBMedaBVK6sup//rMwgD6lFK5nKpnNVN7074+Av9L+h\n1kpJnC89P6TN6iNufzTW44dghNYcoA4VirlNGkiEQqDM5ClQKGm46SP3w5JO\ndDNvbci6ZnEClvbrL1y6wocFvP96uOEoTFAjGgrAh7IPyg1fxaYXdW8ZnMnS\nmTE+KuF0B1zrBd5OoS8D7VgXSAsnzcB4NzTJsHfGzY6UN0dVbn7/aqOBTfR3\nf/KQ34aELucm+H3GVsPtF8khFfCDSySiwxXMW1Im6UvyvYRM40iO4qGq8cjr\nSA3S\r\n=qDmS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRJhyt3eIjr51/32IAi1PIkf77E2yUm5PlqSvuV68UggIgMQC/p8uTwZo119eM4IxpjZH08D9drpyo2r0ovqkJ36o="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.1.0_1532368977101_0.188229536916797"},"_hasShrinkwrap":false},"0.1.1":{"name":"minter-js-sdk","version":"0.1.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.2.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.2.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"ba05d437895e389b3dfa7bc9ee4acac89d157625","_id":"minter-js-sdk@0.1.1","_npmVersion":"6.2.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-LqK5fu1kD8rFmEVoNZuacIxaGCyF49iqw8coHJ+cQYwBA9Cq5d+7wTtpemVk36NX+lhUPb4rQn0HeWZYsbqjQA==","shasum":"2b1b2a55d234fcc0fafb4e16023c24c12942b717","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.1.1.tgz","fileCount":10,"unpackedSize":19622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVhtQCRA9TVsSAnZWagAAK7IQAIYH1nEe2ICuosVT1lOL\n2jcZ9R0JFjiLED4K8YdKJjHs2nBWoFqlqYxbrKwc4cvRFe/YAXQknu0cuqbE\ndu1gCd1hfBcFrbv1uuQW/qgzn10m1ty4PLWzR6DtaW0i7QQEzOv/dMjS9Vfe\nKdpUnZm4QThhalIZYG6vplBfLCaHmwfJXcfmlJjFXBUu+FPVXhDJO65EPhev\nZVO8UmlqjnS9VV38X7nqXDCYnWHyZIQvD6eZn+ku3TGj8Yuep9fUr4VvyffC\nEY+Z3hpqX0YsyC1NzI49flMFHbxtZmn+74AKlfdqPuP+VSC25FM2phA2BKTM\n6LrgQMFSgdcCQNhqLZvSHN/E75un6Z8QiSrnB0m7A8HJKsMXEDnrYry6dU1o\nuMoq4fMl9mw8e2pzlx0kKucv7a+k5EvoFjpJZ6HMyo7ENvAKKuqUTDkTd06u\nPctuw+ltbCO+XUlKcqq/FXWJQKf6G7bn5VdR6VSDj1HjCo4L/10RQD9leYFl\nmde0MFypdhfyDgNmB65JsvZceEvdUK0Qc/Sj5wHciWyQgrYe7jfk33v0FXfY\nANYD0yyg/RpEg88UoAsaSTObcW5ssOUja25DhI3ASgJcNs5tn8r1xCMI0tv7\n/EVgpcWLH4kRijvf3GpchX5Ez773d4l/3D6eTATLw1c5m57cqiNr91FlIc2b\n4bC9\r\n=M4Wb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHK+q+jADM/waIkCAOORWabbisRki2FxSIgVOZKxIREYAiAetF5pI0OMmpC1HgP2sS66kP+NY9SHo59NwQcxDWwVuA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.1.1_1532369744588_0.4036381756295817"},"_hasShrinkwrap":false},"0.1.2":{"name":"minter-js-sdk","version":"0.1.2","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.2.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.2.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"84adecd10abf56403741cd783457d895a2484408","_id":"minter-js-sdk@0.1.2","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-wxmiWvfMJJVeLNmEeEpvcJh52kK3mx3VXhh7aMyYz530znx/EZEK0JBnklfsN2TLfx+mFyeJd4xFHyF8kOc0Lg==","shasum":"2780c0b1b4ee486746f416cfffc9bd3ac9f47efc","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.1.2.tgz","fileCount":10,"unpackedSize":19631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaLuJCRA9TVsSAnZWagAAM4AP/jS7uCJUbKVyP5TvbErU\njvGgD+nsOiKK8lSjYVRP2Kefy4YBE/yMsHJyBiBcMVUrHffpjfLMr0Kw5lmF\nP41QEbPuzYZY5D3ivp6959AzHFyNvKF+tNMF/5D8F0A29PXbHDekO55ZJbaV\nFNE9WPkmbkzXTkRPTy0OCxHn6xcvzmVfkfVafz/rhQpNzVYxR3LaeSBjm7Dc\nuRu4BGJSZ+9IFRDd2J9ji6qGdwuOq+979crZZsYpdQhA6NmpTB+5CCF/yXHQ\nGxhpTkmn/0Ov+U/z1GMYK1GnP9V52smxMh2Y/m0B6rfqESP1xgeK1EDW8sh8\nXDT8oGos6HjeRHepFEg8JYalxXsPBYDn0xp/nhEUP3bvwRLcwoJRbSxnxcCE\nudwqgZZsC9gP5416XfwJFTmssqI6XQ9gm36E41S1DsFtlT9qjq+tgQJR6Z0V\nCmLJXRrmM2lNpk+sflzJhNVg7hY3opbtFo3mBKGG3fvrTmqVViGqr6P3mXhz\njGDu1nLVYPQd2Gb8+Mb0QcvE1YqBr68p70cCYAns/4sxRzPhUPyHDxUNW5sf\nlb5D7n6gZn+4q2DmqcqjaRvDdY4yOf1Ut7IgwWXdCKS5z/tJxbKJHHvakcKK\nJk0pqyJBinjPJZs6fAbcXjt0NeOxrnNgl5v7lMEKdqduipdd2sMzdK93tGHW\na7rC\r\n=GvGA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoBT9MYcKdnkaB1HzuJlV6uVWEmcTdK+aVKiiPuLEScQIgPoh3SCrCa6Z67mUZ3m94mXIlKFqdUHlK7c18EFwPmL0="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.1.2_1533590408671_0.5062988928115459"},"_hasShrinkwrap":false},"0.1.3":{"name":"minter-js-sdk","version":"0.1.3","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.2.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.0","babel-preset-env":"^1.7.0","eslint":"^5.2.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.4.1"},"gitHead":"8ebad71efdfd3f1834b1ededb2546ca7a454bcff","_id":"minter-js-sdk@0.1.3","_npmVersion":"6.3.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-Mr7MsH9bJ2WVHz300bRhOjm4tlVHSuM0TkBBE7h3kiexlWUl2oT6iL6w9pUYSCzI9J4Qy3ECpYSkcADwLQscIA==","shasum":"2951e86c063dc49d5231398c037265a94efbd2f4","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.1.3.tgz","fileCount":10,"unpackedSize":19664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbCIZCRA9TVsSAnZWagAAbTMP/3hHv8ST90d3b13vzb2K\np0Ycz7/DBpkRtDCuadeP2J2JYBEBB0DnXTx5ik3LBr5MRH6Nm9Nkk0v8GXcx\nfCkk6IIROtwLcbjv5e/Ti/AX3LoaxPhvSJHn/5wZULSy2Sq6L5RNyO83VoMR\n284vmh/C0SyHG0RvQljVLD3NVSCTTIWJuIBaRVxprZUwGL8PQ+6dKSVGvzzN\nwF9upu5uEVg3omOjvFqgbfDbTR7VdQmjcCA7/qVMXAJNbybBmvZs7acLf6UN\n70K2djjI4LC+GyRqwc61n/oj8uJ3lM1Gu9CBxyO/hSq9VXx1YxkGGUnL2VRZ\nPmOiVjlwMcLA6zx/rKhJK0ewu9YDVWcNIFOvq4v8NsaWabfxTydfQfBu/sG+\nf7X8hiRGU2ogW7m2X4C9ijl5avDxPGMrbHDn4yXWzoJU25cf85Fc9U3a6BHA\nhxrtuY9swtxCRQih3OB2Fe+g6dtLGW0uriMTXnAAEK8Ff74B5Mi76cA/vHlI\nrm7kC0elfkiAVwtnwmZSRaRWlpUNO/o1+NAlRtxuOdoZBs+jJg6GX+l5KBtn\n5ftIOYlDmgaDjwvpTQGVcx8HN3sfeUvz/7dMKjAKiScq8gT0Q7u7F89+XHH0\nvuPWdqQFVwO9AV15q7/5FsCQhfsyZ5Jxd8xkACE1vb9sy/ZIUTsBL0ednYrz\nSIkg\r\n=pbZf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs5bZjoo7fCvMhqM0LREhh1fpvpn/551tfyerp2ZYX8gIgId6uwajxt9op0OLPhA5y+O4TO8JHcHDHYtRFZRhdMh4="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.1.3_1533813272629_0.4557992251600351"},"_hasShrinkwrap":false},"0.2.0":{"name":"minter-js-sdk","version":"0.2.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.3.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.2","babel-preset-env":"^1.7.0","eslint":"^5.3.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.5.0"},"gitHead":"f0597efee3889d21f383bdf053c3ad95e425ec75","_id":"minter-js-sdk@0.2.0","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-g4YRjucpyJlx6w51Cob3nZHQ+jTip1+5nkRtjbqzL5XC3j0ebK5fDQ6x6V8cyM8AROv7J36LmxvrqI85pnos+g==","shasum":"7c51c62f84ad0fe4e217ce817a54c92804e65810","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.2.0.tgz","fileCount":10,"unpackedSize":19802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbwiCCRA9TVsSAnZWagAAVWIP/jH5Wlunca5JfZU8Nj3E\nvT5FJ75NfZaqnh9oIOxNyQec1Wa0sRzYpOg2kMGC2GWAxY8s3Xst+v6sPxQR\nZWJ9dWu/6dzj6mFRgD30JtV70GnWimk3CXBXR33l01W8/XcVpmnxTOAUqZkp\nMReljRSa4ox54Oxg2yHxmXd7XF1aSdaQNzhburgCceuTKUfomN+Kl1J2X+ta\ntBmYq9sGPi3iFA9cEduRnqGuTzNafa+6fBrjECDsUFGPZRdf4oiLk15E9vyN\nf7kj4O8zq8FVja85yu0A1OSdLWyBDX/zX0C8Ilhe8h3Gr2sxOiRKOidDTxzO\nnYp9I0knN4blbLCcFBnP/wpp8W8T66+3TjsZ6bFvllzLwZ7cvzqG87U+m0QJ\nujJx7OLbC/yN07Q5f5DzqBGugygejCAFNGnAlPHR8SEzdJ6vE0+NWWQpCTf9\nJrKnA04BtKRgz86Sa4Ad+4j20Ri+ZYeX7NVR0i7VR5wQVGa2Fb9/FMER/veG\nuoS23BvckrWSwtddBUVp8PcRJ12mqIpE06XpK83YdvgCYpGx3hFOLUef9PyB\nX7qsbFKvcIwyRClP2InJfrlYo2wWbOjG3EVid23p+6szWLBVPq+2BMUTblvf\n7oImZqNbc4AGyVO1D4qRs//8/G6m8lSgnBfGukgr5H14ERAVqTs9qQTEZloG\nZ9Kg\r\n=lZcf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUGwP9LHtztOxlYaXHmChNkE3DMpgdNpuLs3VcSLmYhAiBORdzFKhdgngYgGFV2ZpTAiuGX6tYpfgrrv4Aj2DWNmg=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.2.0_1534003330279_0.9446399342119087"},"_hasShrinkwrap":false},"0.2.1":{"name":"minter-js-sdk","version":"0.2.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.3.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.2","babel-preset-env":"^1.7.0","eslint":"^5.3.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.5.0"},"gitHead":"7a41d34be73f0d2f17e6171e3b71de1e51f6ebaa","_id":"minter-js-sdk@0.2.1","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-lh1bha9U9FL84UaW3UbzjV4l/8b6BkPQDfmdbCyQ1M4KYuCAByLXnoi7NNInHV2YVvc0MlB8yVGe6YUjuzhA+w==","shasum":"83a09854ee3be6dc908ddbf4920b38e270f323ea","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.2.1.tgz","fileCount":10,"unpackedSize":19751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbxUjCRA9TVsSAnZWagAA2zIP/iUn0COZ4q+FpKaCfAA7\n/6qGkehmG/iH5A6yN2GcK9MwtDNUoXVzay5wLD2W3cU5kvEoec0XFakOBpTN\nxIM2/cFRUssgNdFWg1CBdp+oZQROAEsDzZZoX1zjYe+TaxGIrDPcJQdDGtoH\nM0kgx2MaLhrTwHAlTIpK5xvaYVLbDqgx2rZDiGt+JvbA1Wf+Z2+ckSGjBfob\n8ycpY+nPkPbu3CgX2a8cPvPDBax8izLZvi07YJcfa26mqhnTj36ohepmD3v8\nW3mEBVj48zR4hD5AlALYnsWbzKY/nmop8+bauyGp7AD9u6/HUIt/Byb9A1/N\nw8M6jnYedP2OW45txxilQ8/D8US41lfPW1/cm0n8OTWgDaGXdhY4+7ma9NS7\nZVLA/5p26TBQFvC+PU2sGih2We3uBeadImGyyJ6Oz/fekrkV5SGvFe8k0i2h\nWHRtoj8r/jk00J28+IulQ3q6HiYIXUMUMO9IRJcjpJqKBpaaa3cll+/DjikR\n2U0SjRKeFFe+bqK/8JKLCXVKMGZZOVWf8dqazA8UsSXxLWOVQGO/xPguhTNi\nSLFtAQ3iVOyKmqHwFjn9KxwDk9xUGNoynYIoKq+VWMkfJrFy0U5Gpd33SLEp\nAdqYFcGFSImFaDVtTPOuigv9TnyCsG4n1twuRAWUdrGBliMD9Nsf6H6ksdij\njT3P\r\n=Kqzi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlpnAKmQNUa+WZa98R/VGcfek4holeflkxQ6d1928gOAiEAo24bwiuH11wCUPnHCPI9VYw/9g1UuNCghb76NzRXnnQ="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.2.1_1534006562935_0.10779294830558195"},"_hasShrinkwrap":false},"0.2.2":{"name":"minter-js-sdk","version":"0.2.2","description":"JS SDK for Minter Blockchain","main":"src/index.js","files":["/src/"],"scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./","lint:fix":"eslint --ext .js ./ --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.3.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.4.2","babel-preset-env":"^1.7.0","eslint":"^5.3.0","eslint-config-airbnb-base":"^13.0.0","eslint-plugin-import":"^2.13.0","jest":"^23.5.0"},"gitHead":"b4d19b5786486e1fcee0c773de27a385ce5f4043","_id":"minter-js-sdk@0.2.2","_npmVersion":"6.2.0","_nodeVersion":"8.4.0","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-8kExZ51nOSc/ryXIemxe99YzAFTE/9nNXS/UfUvhI4nu+DSp+93v0c+Eqfx2i7IhNrYbPCD9rQBydXvJd+pSpw==","shasum":"bd7ad5717c7f54558db54b5a446f4ef9f07fa167","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.2.2.tgz","fileCount":10,"unpackedSize":20120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbyABCRA9TVsSAnZWagAAgiYP/0fXcPNW+xRFOz9vxFzm\njGSQThFWQiAuDSXW0PPfiLwZ4G32BeSQyoaRyaQWMwWB/cziFfSVjVw/fGXl\nXMFLRx+9AoqY9nk6IO1S3Vo4Z1vK+2JJmeS4GjoY+mdFodms1YWTac3UBR2R\nFndwV4ELP9YWzpHSf04UANC7B5V3DW2dCG0tXdVC/vPHYaazoBKqgrlSPe6h\nM/f1V6MMK8+Ik+yGbZ4soe/iV6KGOvWTAgAwxtSv2jZhX9MSn4oALUiK00O9\ncNIXoojHJm2V5CWDg1GCKFB2vkPS+VN+cH9x5e8e6pjQND4Vgb2iJO9XhhFi\nL/ljhSYBDcLDceOgdXsyFmCICNfV/LL8lyEuiFcV7ECwnw5+DDddlRMW3vGA\nnzsDBIKEKZYfPv3D9TD8QnOwM8ApBBeX1kTfgx2ZaZxCO29mF3pxcx6g4+kP\nWEG+p3cG9kXx5OohZKWvnLD0zifRl7FRpxjrs6EN2WD+sBYrSfD3aYA+0iME\n4FU9aWamHw7FOq6a8pzPciHgSeXssHq3dYf3zMcyAvFvup/Bt4meB7VWE4Vg\nFFVL6YfiQbUHk5KETvC69Dw+FcgGOu2p7GkhO2G84am6PyeCyt/BBM82sWA0\nIEgiWzmoAk1lMbcmeFm9JnnEMSdzvNNoqn4ytXjagKa3K8Yp9aibFI0dRPBE\nWA3F\r\n=tyG/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0iMIX9eY2aWKnloKlVDsQ0dFJgFNiL+NaYm7vuMgnCgIgP8v2NpZnwJmGR77YoXj0+Iu9QfCw8mkJYtR+lm2xItc="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.2.2_1534009345388_0.3182751545699545"},"_hasShrinkwrap":false},"0.3.0":{"name":"minter-js-sdk","version":"0.3.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","precommit":"npm run lint","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^5.2.0","minterjs-tx":"^1.5.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","eslint":"^5.5.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","jest":"^23.6.0"},"gitHead":"73b86f1845d7eb65c1947ae9cea8b699d9fa40f5","_id":"minter-js-sdk@0.3.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-EGZFjuKgC28pFLlXvCnciMi9TemHDk7EPBijlb3Aq3L82SLaW3KnYCAKcwEDNMk03SxSuBtHP7+CQCkjs3svXg==","shasum":"8c6c65d7604d73c5f45ac31be29e9ec36a2e3eda","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.3.0.tgz","fileCount":11,"unpackedSize":29176,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnBtECRA9TVsSAnZWagAAqAEP/R5IxuOE8r3r6FpXO4CK\nMJb6rLY1A43XE37loSaVcVF7wM/Ws7ZBaDoPDWfGAQBAfLrj48lRIbZQG11P\nCcSopY5fqoHwJntYE0h7P10WvyYS+he9m2piKNVrGgQcTO3JLzbvTjPulP0B\nRkeR9x8yxWXAjCzX1LVpQEmP9giUFe9DJ9wuCvjKqr7Xc+EdCTeCbXduA5vm\naD+M1UZ2XXk8TgMyAFT9+xnzPQdVgxmvuCTICSlJfIlXXlNbfodV/b4bLfiO\njzNGr8u0YXRxmmxVNndxBFKtYdcZsMv2g/9Vw5U+CveT17+uJ2Ki9N4Z3A2V\npmfHJNE70E4S2JuaZIjVr01uNGl7xg9ND5t9xcYREXtixubBqQcfIiWJEsrI\nFiROeNHdzkrn7OqXnRQq3vB+ZQ6/ogEZ1vmdXXaReC4JTZ6DybhXTxJ1XyZ0\nzE3ej+oF4aaU0D0N0WN44SwQ13opsBFqLmp2xkAq35BTHWHpkQ+M05UVcR7+\nLYB3J6Dn10g3dtcUvIojhP1spXatrRVOJODG3MUBVB/T5SI8sVLRmQveqGEL\nsw2Iygx4WihHR+dOdKnaiTu/wiATbYP0moi6nntj5LnwRZTrAyF4eAlgZJpn\n3+QeE2VIM3llE/E0ekbQfdMM90Gd0I+mUuoNAnXc3ZzM660Ae4rXqDnNXlYE\nNG6J\r\n=1b1A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1YO4pmDf8FidTwrQkKuj30Pn7OE7nQf/U7zLalZmDxwIhAISaIlmAmvB8kJS+mDwpAL6Tn3DpEY6wLqaFObo4z1B1"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.3.0_1536957251711_0.621577095451818"},"_hasShrinkwrap":false},"0.4.0":{"name":"minter-js-sdk","version":"0.4.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","precommit":"npm run lint","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","minterjs-tx":"^2.0.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.7.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","jest":"^23.6.0"},"gitHead":"48693e4478290c62b7888e69a59ef95554a0e378","_id":"minter-js-sdk@0.4.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-pjrOGQzqUFcE7YZZEsxSNSKE1UeONKUtV7iVBFU0iW6odxqHjut9voMbfqjbeu16nMvXnF7F9dUkOeOvwXIC+A==","shasum":"ff880e03e87a191dba821fa75c791eaf7b592ab3","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.4.0.tgz","fileCount":11,"unpackedSize":29534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxKyACRA9TVsSAnZWagAARp0P+gKinVDlpZ4UtdFs4GVX\nhm2Dz1keDPQuMAVathfTiG1X3RL7H99HSmjBjy6SwRYSgZfEx11x+77wjaIA\nIvjpB8yrrQAFpRuMxkZkMECXGgqleC8jBY9yrpOJiifowJCWIGrcwjUWS2/L\nWBF/j2x/f1KNUMPqF0b8efRA8aMSGPZR0/kGi1uluAGCbMSoS7wbyilOl560\nC9yC3h/P4vI428nTUmItNIG+YHXnJjG+BZzPvCRk9nxfQSZ1EVdFU45lDAra\nCd/y26NnVOtd5wkEzl4tASc2+2r+7dEk9ks662zsuvX5vqxWshQI6Rm8APFu\nO7m2zayBXG1Cxi2wtYNZV1aK+TS6M8tH9NgMQHDYS/34vA4dCwkNoxy8Xtb9\nbwhAkwtaf54gWNyUPuwF/nFcCx5JW8WO13U41CCmzmDqiPNb1pPLoioqqiYi\nTJHu8a7kp0j7qZNlyl/BP+eGczgd2FrmTMLS9y9NH+FGFRYmI0Kxq3gGvMtJ\nt1XoHjXssMtJVaDuF9wid2p2FLV1gLi944v00VIsr6nAsrAzJMfmsHJHUoQJ\nIVjmy10D+69gH81iMVm+bdFsN7xf0W0zSv58FrDWUDr/akkGWVDH8oSf9Ups\nep3Sn7wZ4LVQJ3d5vc3k50oSA5xpLkBFz8qXftilqBA/AZEr/5CJ0NXCbs/O\njA9B\r\n=AJAd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYUz/IrcNlycPfQMF2tEU/fvwFoluw70W2yyr7/IW5gAiEA491EjP9HDQnpXrpRzG8wG5XIGkA4uo7zkw+ZFYs6NEM="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.4.0_1539615871762_0.22271951346777086"},"_hasShrinkwrap":false},"0.4.1":{"name":"minter-js-sdk","version":"0.4.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","precommit":"npm run lint","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage"},"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","minterjs-tx":"^2.0.0","minterjs-util":"0.0.6","minterjs-wallet":"^2.1.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.7.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0"},"gitHead":"116e575dac3afe0bcd5e0af395350ae92a1d2b75","_id":"minter-js-sdk@0.4.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-nXFdZ7DMX82lUvW+ZYiLZkuIQROnHrJUbeqnt7o49wsSAhfDMhOkBu42cWeVmLEM4Dpz7hnrfWZyOmmks/5hVw==","shasum":"b2d78cf159b525fb7aa13e0ea25971dd093fa4f0","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.4.1.tgz","fileCount":11,"unpackedSize":31613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyJlxCRA9TVsSAnZWagAABpUQAKCHMFXXx3DOpSpC96lX\npjiXpffBqSrnjK6lldQ0Cm8Xh7IcIdN2Zegof3S6hETr5ozZGK1j/mRWx7ES\n8c+AYMtANRut+TZAxn8g+kFsWISMHLuH/PxQNZIzftT0+Uh6mRK6IQin15so\npxO6onZ9NZc/9Yw4Ko8qGizWdDNJofro7yuMf3nX9tSA0ntcQMtU9EaPqaMu\ng5NkVkwfTqfSN2bMtBBsH114XZHJvW1bdLj1NZZzm6aEmECkyftuJHRFPwdz\nBr7wuTcu4fs+sxf8jw8RshrV67+2MRfJB3Dlr/+vUbTtd0HlzIbt9n2SXexS\nQETbCkSRdn82mVL36zn+H8waZwXAZuGA9vDkxhHEmvq8TOVU61sFYoSSNssr\nuMl2dvwhZ3grG1bmEE3wuasvNWtZzqwCso+ehHVFqqT+ZaCUGMDQwoXIKiDV\nQbia4hPS8cxpjedCOtBBMDcZgtQGCUhv4JleVcv+VuDkyvEi8bXkhRLw3kxp\nTFoEWSsXnW9sCbOMEimRzhjVcaOV6LX5BMVX5FL5/LNDHeY0pmY1+wvAdngs\nk90WHv4KuC9eCvv7P2uq0Oc2LEQAU4fefV2f/EicOmEMwgKEtuBpJ2olX2Vv\nsoNb3nA2G2Rb4a8x9optXFkHaLww6p9OGzuZYcqX7TfzGE1QVq2nf0fiVngr\nHcCb\r\n=82Kh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVufd5ni3GpQaUPSkF2Pxn/cIvoq+lzMqzUMmf0ZscHAiEA2MM91jpB8Bp/ara7c7k70fNaj6feQL7mzdR1zQRnV6E="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.4.1_1539873136917_0.1610412897013065"},"_hasShrinkwrap":false},"0.5.0":{"name":"minter-js-sdk","version":"0.5.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^2.0.0","minterjs-util":"0.2.0","minterjs-wallet":"^2.2.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"fa8e22375742dd703d8ac6d9c959a61ed85a9501","_id":"minter-js-sdk@0.5.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-S7vmfPU1IRqoTTETJYlxX/njHRjiMhBpw7q1Nr6ujWbSlZCkX7tsKwBzBynE+lyJ3JvLlYsWeWcmmTKoiWf5fw==","shasum":"46e86535544e85533d2ca18eeb60cfe385aed6c6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.0.tgz","fileCount":25,"unpackedSize":44397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/HA8CRA9TVsSAnZWagAABXoP/ikVoub+a714pvTnOfMO\nBjdpIe0p/wb9m3kBgpjeLdYwWbxE/ODYhei9grxCEepSDk/paijdzy82EPWH\nOnIjcHS0jmZWjKNWOtCi6s/pFHxh7g7vqf++GQRr/cqQjitJX+EXL9R69t2c\nbv39Ws20xHW7HY5Wh4xqA4EByvErV+dGw1ts0e9qrJlKXqWbBPtGRnQHfFp8\nod9UVbAmHTbygNzYl0merzEP4oDHZG1rvOD5gYHxtMuJONfhhT05fMP5Gchg\niDUJWhS28cMwt4NkNZ1AidUl4pV8t8gAvP+VRoIMDC4fPZTNe8bV9xggfc6s\n8IqsYSGT3CzpIFwD51BXAXE5ZrEaMN8vUWAsaRoIU5Kj3AZwVYRZdMn6RPZs\nsLhO+yo7RuRNJ7+bMS3sFm/xUd//johQGrIDIw2H28jfyucMTs3RtUPBvhRq\nYbQJHWdOMd9loGSD7M5jz09ynZ3zDe9p7Gsu28FLXhnNXPk3HLunEx46uRTL\nmpvgM2CBJg8C9L1ynK+4ECXoFfDECpq2kmyRCrwoHxwVwJhwzqyAmYZVwtJu\nXwIjQ1iKy3rqrIAC0cQjOAog+sSzkiXYXvQs0QH60a6zlHNBsd9wGSFim1Fy\nZ5nULns5cpym5fT2H8ckesiaZ2m5FvhdSoCsV+YxL1DnECk9HpaXcbFm8wj3\nBss+\r\n=PzgV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHP6dn8aiDzi7Qvjpj8NZ/IQhrcQK/CMEyItFGzgWvvrAiACLKx8aVzqywyy4i9D2Xvtom7nREW7YwxI3AUiyCzd/w=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.0_1543270459358_0.4321322866437971"},"_hasShrinkwrap":false},"0.5.1":{"name":"minter-js-sdk","version":"0.5.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^2.0.0","minterjs-util":"0.2.0","minterjs-wallet":"^2.2.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"edc91e1d903295d63e1eae40a27f4aaf0d04d5c0","_id":"minter-js-sdk@0.5.1","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-bPX7DFY/YpiTGldDJiypjZAEpYYi3ns3OnRFmnoKCF2s4l6kvjn9XtJuM96RnJ9BDUjLRdv125bMSbTAJuEhZQ==","shasum":"4d419bd53cee1f59b6a776d7249d8e7f59c07527","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.1.tgz","fileCount":25,"unpackedSize":44397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/LnuCRA9TVsSAnZWagAA1DYP+gIQLSgJoLk+tc97kPU/\n3Kp5zsEhPot0NnVMxVB361zdBCYWpPP1TquXrnwNXRvGkxrm8KtYfIGOCHeg\nk1ybpmZmXp/fycvY27DpNLxA5XSHQ7vpUguwTBLN98FOdx3WrL2H/hy3zJRx\nzixUPjzcFPF7ejhyimDf1+MWsMvcSkDvlO2WB7uvnNjsKFUTdMoLtFK9H+jM\n4Jh5Q+DhyuDfgV8Y7GiIE5jjMLQFcGkpxkVXEmTkovBuOom62mJjBhKpDy/k\ni0g4t8IvW1VTnsOUGTlH6TwXzUj61T4WdBkbcjFVQKiPF3sDuxDFLDSGOuYl\nKTaQcp0lyMXckNSlcvsl7AkrMVotRVa+vnLqZghl/tl1Kk03fdiSks0aDqoS\n2kPP9yS6TFtYksRqNLb9wh7+s8ZHz1eZ5k1bv3hdQwfW8ghxnAmmWsWD5keJ\nckDmlHkgHtFrTX0a1TSTDEiGAZtzhGdG6LlYy0o9PT1SEkrXo6Iw7Ukrm9R1\nxcMtmuVNuVOOpAKXe7n8YLyt+d69UjfqOtjH5dbbs2O3n/LlNDAJ86FTFX9a\nSP9KU0/RuskVAW4a/ysbIe8wYA/vkEo7muSjtV3j4jldlfZTcPgpFQhZjGQ8\nlo8ShAyL6CensjV45N6RH1eNe96yQpEd3fJC4YjEPbDbszoPcqazGCOEAcjA\nQLFC\r\n=AcnU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3djnShJFQxg3+x4KkDrSrARaJcSqQBSqTjN9uew66cAIhANy0ZT3GUZ6r+3D3xDQVeZe6rMxOozRpTHp0rkjOMkPj"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.1_1543289326058_0.6189005865027628"},"_hasShrinkwrap":false},"0.5.2":{"name":"minter-js-sdk","version":"0.5.2","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^2.0.0","minterjs-util":"0.2.0","minterjs-wallet":"^2.2.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"f020e3e3ee300a7a07ef5aa1cf48f3512c5c3c02","_id":"minter-js-sdk@0.5.2","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-nLp7reeSZiRZg6+2sCdTJHGtqIu31ZKK9ajPIoLbK533P+YeXkG0MAuxT7mpwWN+ALj1u+BwXmhe0nbwhNxR2Q==","shasum":"fc72ded53a0b1a1dc5f5bdbd5d4730562164f8fc","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.2.tgz","fileCount":25,"unpackedSize":44260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/LtACRA9TVsSAnZWagAA0T0P/0WDe+MZeR31gJEIC3AM\nnxZYexaJ1tS5ENQ1KDXj5AkjHElndfzNVMtD3GaG6kQVpTukYrpbzpAlnBEd\nA4ZRQcYJFm4ESgCnq/hpE1GMhdI/gEurQdIBPbl+NXbCg52d9oqs1dfRa6ff\nmh9/z+oowK2LdfpvQfuaW+u3BhOKFlqlFUR6ENVntZHcVsI3yST6K8lunC5G\nZ5YeK+hjyFLSqLkeMnirI0+EbJ6unwP10qfDZzG0l/ZmQXuX4yeqcASV0TX4\nk088AT/YgQ51PLCuFCsbfO1E/dQhbJ972qbLryiipKqEYTYQCq0kgleWV4hj\n4IPAZAzPN9/vCNxV/hbWNYGEn04bOqy9bk3g4L+IKsIEj/TDMqcmcVky1VQB\nRiq1LADtsRqQ2MOcLDpAr4fpuBF/+uMRPG+icDaqoxKqF3nDbN5XUo6558Sm\nsNp6Yi8kwOpb/XEwZ1UX+zWFrCqbX0HXxZcPao+0sr7DApt9o20l8MuCRXgw\nm4+Yeo0b+bBtTtU4E3tjqzmaPm00ewL1lG0PLehXc9IFBqytq3P+9IhI/Ju6\nw+PLlw8kNn4JbxEpV/wtlmkTS5A8EK+DGe6L+WvZpHrWmfi0OT4NOIDmJIxs\nfvPb3qbap5zFZbLVs7o6dNcbSF57X4MuUidY5frUEKqy2RJIb6PUqeObax8V\nIQwI\r\n=wplo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfQFvf+ZM28H0XucQnJCwJ32TD+vVWBoj5V1pIRwDcuwIhAI5HpoQtbIvVDdZUFI6jG5/bsjUbIbFvB3U14bc32YXI"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.2_1543289662729_0.8627510177289637"},"_hasShrinkwrap":false},"0.5.3":{"name":"minter-js-sdk","version":"0.5.3","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^2.0.0","minterjs-util":"0.2.0","minterjs-wallet":"^2.2.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"8fe59293af582968615c87f6640f6ce5f9e6f121","_id":"minter-js-sdk@0.5.3","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-KOzlyneJo7b5nq1yP/ZkSPWMkPZ26ejYusqZjCBkHTxoPBqpgSmt8c3NFd/H0OqYUYAgmBEH84+R0W8yRGaxUg==","shasum":"7e443407876d1eaed331c83dfff6fda606c69485","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.3.tgz","fileCount":25,"unpackedSize":44579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/MgaCRA9TVsSAnZWagAA8CsP/3OSrutbFOFZr071A8mS\nklWIpbj8DyUb7CLgxohubQiktFe/NPdajqfBcDta2qZCdWQ1EeBRsWVc861h\niMCU6Q1V+HyS757cyQ7OQjSx9t2LoLtDic5N/LUs6x5EdnEoiWFI+O1ECLht\npxPnIIf5q5jAQlLAOGTXqnRTD/R8s/2hg2oAAb41J4WEXqOKSWbwfm1uQaix\nyDvJFe0sZ2Ua6GN1yMsHmj55zjEeja8RlamxKnvQkO04d9uvl71+pe1O6UcQ\nLgcQXFGXD6f5/301INT6J46sl2XrXQ57PJ8vxSjXh3eUb+6yNbeOSYVJ0FHf\nKGUC6IAPjtAwtge8w0MQjCJJufc3i0tIUd1h68Yqh0Ix57a50RXhbQsloe1K\nUxhLJd5oHniykw2cdLeTfLLSxUNo3Uhalab6691agwWsG62NH2KgGETQxMmG\nhEfBC41cSfKYlcJmur7Ejnkos51hL3NHcqd5tFgRXjdMydrZRRY3OT3ahta4\n8iEoHxRWYWjN2GlR09qzzQ77adA1s/sveCTUDa+kooj6Q3AMV+boRSSJ4YJa\n8Y1VapOcdMLeffbJO/8eCprWeEtoLwb+tL9RzZFNT6C2C/Qu6UMOyLsztAQO\nyzzDgJdIV1d3Mn3pOgaxNetRiUEwEn4319seoM06d8qVnhe4UDt7kL/ZRRqZ\nx23T\r\n=NOr0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFTdoTXusGqBZ+2AiC31nUIQOaBKA6ngqGHn/oJZSTCAiBsZvR/huspzLoJfbbd5zsG6yhy5GVuL7I2RZyu5MMlKA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.3_1543292953914_0.29621329515535"},"_hasShrinkwrap":false},"0.5.4":{"name":"minter-js-sdk","version":"0.5.4","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^3.1.0","minterjs-util":"0.2.2","minterjs-wallet":"^2.2.0","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"96c6d6962bf9461513a9a44304b9f38d56269718","_id":"minter-js-sdk@0.5.4","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-nTi8ndTHCFMZ4ivQI+mulkJvnBB6oElAwI68WQqFih4SW9JpzipCxRga8huHz8BE4SN+2sRti5lP7+GibBo9TQ==","shasum":"78d7d32ea06006f446f1ec44f5da7dd97c2f3fbe","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.4.tgz","fileCount":26,"unpackedSize":45655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcAVBcCRA9TVsSAnZWagAAtVEP/00no898GQ3jga1xfQ7Q\nS3B/aovfDBA+ndnWM0y/zuDV7+ZBIOZn2toZZep4iTXMVbebjxmKJgifzkw2\n+Pq30pVrL7MZKHhaoKj5SS8qZMl70o8eDWFuqRzki0Nig2riLoc6fKJbIaij\njcpnnG+voaHgRaBCN9M/M5NdxwutSZlZY4e+MnGOoVesgUFO1zaMH2Jk+diz\nRDc4wFzkKGaGREApFq2PV/qkYHYQxHnk3mYBxqIKBr9zhBV6O4Ovb4bH5Tcg\ns1ZF1kom+BU0pWqDUOsPynnZtic7HURc0nvH2jTyd6egCSRaQJCWXlyqS+Zz\nZbEMGWStE/qhez7+RrEilHZOII3KLd7fnvehybgZpGtow70s2Leuqjrq4zw4\nvAyBxc4c8xubjEG89cJaiy/nEYGPcyMPcRNHvsq/+KeN2r3qnXfAI94ggX0C\nK4Uiq77U/l0pJ2qtDTLr3u+KjFakpQ7AhMo9Zk/SSn9ya5AslRdzyutv5fXY\n2OAFuGZb/FNRK4vCcItCUQ5T8DFe/suc8JmuGHqXfo+JK+SByR6yXn25nfq2\nRibuQarrJcPU0GEHBV0huIhGukrmrD1p/QOGcvHstNrUSq8OO/g9m1zCFMAJ\nbYLS31c5r0tUq3JRhYJq1rJpsgkItIOv2rHwnKcNlmVjiwo8Wg+yRXkBCkI+\nsnpD\r\n=zCbp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWL/3ItQKnnlteqb6s8+wPDKXUHzWTyr/3etkpPefvzQIgU+UndisUscTgWqyJ5r9IU/Y7Zfm8lX3Al0bgqiUkH0g="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.4_1543589980231_0.8499317416054888"},"_hasShrinkwrap":false},"0.5.5":{"name":"minter-js-sdk","version":"0.5.5","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^3.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"c8009a3c8fe7440fe185849620f4a99482d2823f","_id":"minter-js-sdk@0.5.5","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-ElArTP6kB8Zh/B3pmtGKEgtE8noZGo5aryvxnGg8+Dy9mJ3GeIJJpe0iqziBf+vm5w0fezAuwuyfKCitVtqYGg==","shasum":"07a956e01f712e9ffa7e79d85cc9e99ef5dfe34f","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.5.5.tgz","fileCount":26,"unpackedSize":46015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCUIpCRA9TVsSAnZWagAAPSMQAKB60aXQubE0vhOef1Gt\nbBWrORIb48sEJ8rvgxN4mwKOtugRHwowfeaMYr4sUbuF6h4v9Muu/caS1NM+\n+B/wQRhzBuyr6X+2gi9+z4/48DxBy7hydlc5wRL11814o8niSjWNLnOzucPd\nP9Y5NdoO10GY0AJvJMOLZimqSbIuD3neJ3FE/qYTyz6PYirh4f+ry2Ti6Lxy\nn99TBChBHEynsn9YGzhB+EBknqOUuORNgkgij1rtqRZY3UA5uHrALP5peX1F\ntJxChRHYdiAxxKwPiA5GmZAwH2OFoFElZDqOKaCGL+QHzB+8tBSPE48xuvvT\n1lccB7bp2wsSmF4ZJCI7k1LHTjEZ6rTUiPnMeLgIkGLZPrD9aFZNr2rLbiOq\nTf7HlB4ZCDAaSTVbhPTbnx383NcZg16nAsSF2nu5U0vkTMuAqprFCpnCYSll\nRb2zIQdWOQZ1BIujYCISDzpQzWdi4spwNLx9FUift/Nfrzilj9gEiit+a7jV\n9qQ0VGFcLOVrxe2zMcwkRG9Y6wRzRu0ZhW9Cjvu+k2SKvi32cmRZ3DjCePYc\n3SUoFcUeTiTBJRDe4MLDcwnHBVAFe+3MAMvvaIh4Urx26gbC/MF5XB55spzQ\nnE5P23UQlUWTlpvKG9Fv16BiGi3Kzj9jqpmUlPfRy/+KKBiW3B4pByzYk7dl\n7MIj\r\n=wn8Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFtU4S1vLxqYKj9VKwmDcralMibFF/t8zN9X8nC/slfsAiEAlmLIsaSkeTINiY/zxT138IOZDdqJw+xAMLi8ZnRsH7g="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.5.5_1544110631828_0.6989652245850204"},"_hasShrinkwrap":false},"0.6.0":{"name":"minter-js-sdk","version":"0.6.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.0.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"ea8097a302d7f455a68543c547533dfab5db57ce","_id":"minter-js-sdk@0.6.0","_npmVersion":"6.4.1","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-7BKwjHkFr7/by6+Uyqj3C/brbjgYGUKtd+HE40RAyPTTqa+DCSBL5zHE/2peCFWuzp/BMhhTArZ7OSQOt2nD+Q==","shasum":"9ac55fc7956b19b16abd3c4352319e446551de3f","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.6.0.tgz","fileCount":26,"unpackedSize":48607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDkT2CRA9TVsSAnZWagAArvgP/R6MjdwDodLb6KTLd7jS\nJxk/CO3HIoRbb+sR8GNbCUYJfrDW/aR4hFdpNUqBSUO+DHZH/7eQmQ6XLCWS\nnRE/zaXsfky41kjQCdM0KUnGq1NQmyXhRkS3TSZpo9EuQuQhF3B2OkVSJyee\n0bF1b05EquGoF0poa3wCA54IpEur+aiucQg+xWXOImHa3vkZ6ETwdS9KAv11\nkWzCxXveEHXwMEaGq1YxKxBB9Yjx8R2a1zJS9qfvuV4ho9j1OnibJBncjfFX\ntdGgQHGtNWJEKV10WesQxYB528GtCiWnhBsIEIBGc3rra/SnL73BLdFmJH7a\nNd+TFCPHHEOnKwC+5+31aUlOAWBCZsWxAkiLdXAOwaPMEAKbFbxSJ/m4dJdK\nFuHD3WtZ1m5OgzkywAQHU1PyQE5XJguVUiVYRgZSlx2eGSmHNsC19KFWbJMJ\nYS+VEqYVu3urVrqXJcgUxK4Dkn6YEOwmjC42Vft3xPnmQCBnd7n0RP5IU2/9\nzowlR+bzpCkNwS0eR2ai5FVTJZvkkZ2RrRw4lwDb8l25JWMMdvpS9AgsNwdt\nmEMGVYcwmJmZ2slOPg1JOBlBUVT56a6pPe1RY7r4wn4yrE62HuFbaYQ9Cj2t\nFHrxdZVpvfmhnSq1ClrNHdqVSyBUKMuDnFSjdjGQtLPZStWC9BNY+S/5y5TN\n7tZf\r\n=Tnct\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGNtvwHJImcTDMqj40GSVY8l/O/r7ITxtxDB+OaMi7qAIgGqsfE0z8aqOUKJtvcVoere6sxoUkR0NMdH/kThnNI7Q="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.6.0_1544439029709_0.24495027366873723"},"_hasShrinkwrap":false},"0.7.0":{"name":"minter-js-sdk","version":"0.7.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.0.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"latest"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.9.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.1","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"7ee7bff61dfa5571494e912d28fe3f911f144d90","_id":"minter-js-sdk@0.7.0","_npmVersion":"6.5.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-jfXhAbBIwUd8ExNfYaC+U9dJmFqoprri6jVDFY15rT2ByLR8HByJ3kObb+8b7sxX8G0UHZHQBYAq1yxD0DmL3Q==","shasum":"999167c8dad36f6cbc634a471499abb9cbd4581a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.7.0.tgz","fileCount":26,"unpackedSize":48743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcES/zCRA9TVsSAnZWagAAiucP/iogzlDP6B3NSiU0zORB\ncb28312s1EYFs2p0oTFB8BFJzj/34SdmGRW8gjjGl7d1Z9kuT1tX5TlBSqrc\njurHkV6fdC7Tv7Posif44LqRG88dLfqj+p2j8/m+D1Ydx8N4kjX1lnc0kIUE\npHi2r+0cVgGbDnEIBAoRh25MXKJ7XZTBfgNVofAvfw8XK2UEZI0bbr/vs+++\nf8eJARe8hjfNY/UrT3SgdTEx7uUNfT549k7oE8ffd3IVmNLMyD5bv1n2ZwmH\nXjwf5d55ygMqhNhbCLMwoSBrhiyTj+ML1Epp2j/mrqFhzkow2dRy1Vjey/eu\nczkQaYFGLqvJFqj/zdv8t+T0NW5kBgM+e8UEUT+HpJRQZlxpiPG3F1FQX71v\nXph2XgEXRygVx2cCi4SWdvceEQry4dDw5ptcKBtPWFdflTINhJAEoeLyRwLS\nnLZjfS2uXWAkTTWg9DYLOR4BmYkvqyCMi6v6SUUCa0I00Mj05wYIhCnJFeoL\nTGzc0yVCvOjTLkPU3e9arBivWDeTYiRZs3GulemnN4V7+rySvAtL60nZASsn\ntUmXv9APfv0akeXdHYClC34AiiAqtFdihasWJ2sQ7T/WyLLWS8L6oaf+QbaK\nmRvG3Haexir7OQhph3Ghd4l05mRZDALExFFTl5ynI2jfIO3K/RxYl1spqUPt\n0X81\r\n=yBDm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX90yf06YFILCXt+RjNi4IIhdKRUw9DFOBcwFLq9ppGgIhAIHalUceEVwU+HIOAeMkosLYxHTljqjbe8x6dtn03YxV"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.7.0_1544630258778_0.20285815186453182"},"_hasShrinkwrap":false},"0.8.0":{"name":"minter-js-sdk","version":"0.8.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.1"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.12.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"96952a8c3a7ae8a761e9cea0aeba617bdc11d846","_id":"minter-js-sdk@0.8.0","_npmVersion":"6.5.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-epLkTrztiDVvL5YU4W6TzZ4slPp7x0c0+eggQstnHul9DF/pKUQmI7oMQ2YeVMej5ueX3D2c3mxf8YmjhUdYyQ==","shasum":"8377bd2efa981dcd6b4e5a0be50fe6a439cd28de","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.8.0.tgz","fileCount":27,"unpackedSize":50037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQKvjCRA9TVsSAnZWagAAEKkP/i6MYvoa0Evk84DiChHU\nCugg1tvrx6x3sZUn+/QjQeWb4VZe8C0aQaA14F7/JbrFtFdYxPQXXFaFswxV\nMP/V/ZPyuihU/w6KIcokr8D+0Ol3HB09yUHYblHCLXJ3rb12wBUr3inK5b0G\nDASDt9AWGdNX5b9l58zU0/Pkww+EB7tJXwp4fSuUixA62bOl1HgDIyBW015A\nTR26SbMRwirfNK0Y+a3+534v+aHW28EZD8zkYMYSjkAOqmv3AoRw7XF4UpaW\nV57pR0Khu8iSCOEF9Pk1j0OinDECyf1Zyi0SCB4ttNJ1Z5CNqr4wigPn2Rxl\nRZruSZSgFSjQDvfTlVimfpli5KP5Wii0D30k1RP8MBuyd1AEgy4FES1iXC3I\n96Ja9wQkpZhyDeKgAaiUpibazelwF3++nNurqxDTHn4B9RTkclfZ+7+tbkZ4\nvTaZwwQBMpiVVvBrFjYkDSmqTY94BCu2A9J3gKXgbhYhfdvJ5luQm9HfOAin\nPVOySAjUA+cjItdWHrJJTT9qESGhEmFIrff/UMAgPNFZ311M+VdNNyqZ8YJR\nCvL7sLreDZbVfiTH2yC17NCPMSLI7t3SnCZAGaUZqrB7ztwtGViruIQJGC3f\n4VjzokTPYnhup4LQgMivbrKG9Pmlr5Kiyxm84r5iyFFJF3UuG4+rREAdDnpF\nuwpx\r\n=BBu1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd0NxJqXpPQTCoFNMuVBUu8GNMh2AoO8szL0d5R7DoiQIhAIgc1WtYAEizVIYGt1Y4xQPEVdsyi+UrRPaTnn6i818r"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.8.0_1547742178977_0.859748815170281"},"_hasShrinkwrap":false},"0.8.1":{"name":"minter-js-sdk","version":"0.8.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.1"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.12.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"5b860e757beb0a61f5e4e055b623ea5d2efa3792","_id":"minter-js-sdk@0.8.1","_npmVersion":"6.5.0","_nodeVersion":"8.9.4","_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"dist":{"integrity":"sha512-6leleA/jMCIipw+EgIQXs2pSjF0Pf4jdf1lYFl+DVkmHMcK4vtSNe6BJ5EkAP/ZGIf0a9lzTmKMiChzd5AMl7Q==","shasum":"3cb24667a2d0503632e64018c2d6ef456b6744b9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.8.1.tgz","fileCount":27,"unpackedSize":50079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQLA/CRA9TVsSAnZWagAAqzEP/0f47kTBjG0ZgjHABZ21\ncqFS7oJFuRmMqMLXE8BhtwVSdVOfWMJFgF3TzgWyL7849fIPucYO5VE9z74h\nP5sKr8G8whpWUpcluRlOjAAQSdGIhpRsTH/wSbHjkerAxySzxK2lNe7VToAa\nQRhPKo31HNB7tVB44eha+aEX4Reqh+9Rr1swWoiDPGpDZQj9ZCUaRLtsOCBN\nMKCVSBI33+xQUXUFnyWFuHkX7ukKSqprT7911ZQ1mNmyOMccqNGJiWC919u1\nRBN6ycVryQ/YQoTg6VYzyPUH1HWww8+GCRVYUv09qWXbvEun7hWim08ce/ZU\nGEWLjLgwOL/DXwDWF+cqGl/G9my8h5elsxL7TKikgLtD7raEJS6SWmdbGqeD\nhOB56KnMQD1qBVrJTqLst+TYBc4avLWBfnxza9gigXCXlPv7R/AFGXsDoMcA\nAgxOmCMY9pXO1bHQIbdF9Q5vWMZNDUC1K7B2jr9Y7m5noYOhSiD5wotPjCzQ\nb/SFr+ZK01VtWags8SHsvBBRMVgFY6687IY+GC+v+IBZd6+JIdy3vlTZxd2C\ny9lKKzaL81FgxogOZz5Syx8Zr7TyyLALx+dZxyrsrGVSlYRlSizkkNpwtwm6\noxqCRbo7HWWyjhtdAhSu+2tzS7P9Pl/mdaAzCRZts9wQ/6DHP0uiTm/+lj4/\nddO2\r\n=6544\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6gleOvED+cv9WCixR4YbAmWRSjeO0TAVtrwio1/omtAIgb4PCNn2mgrN5BmAqVhOdV3C3u3izCzsO5if0UrPZPXw="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.8.1_1547743294673_0.14626909453686388"},"_hasShrinkwrap":false},"0.9.0":{"name":"minter-js-sdk","version":"0.9.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.1"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.12.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"75b205ff476513b2f31e502092c2dcf0e1fde526","_id":"minter-js-sdk@0.9.0","_nodeVersion":"8.9.4","_npmVersion":"6.6.0","dist":{"integrity":"sha512-TgKqH2Fih0k5XSN9rvX9V73q51pJ+iZOs8WKVLX/Dvm2pkbYj8C2C6kbkEtzLF+xbvjB0B+qhCfczttxbSFOBA==","shasum":"77261294a84b7404d8c12fa839753d499c8961b1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.9.0.tgz","fileCount":28,"unpackedSize":50760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRwBXCRA9TVsSAnZWagAAf7oP/iro/EooQafeG4GKR4U2\nQjUMf3jkGKyKZHkSWAkSGhCOHJw7YQLvoeyxYznDdfYPuwOixtjM7T0yMEKj\n/dvl64S90s2Gx9LeEYuB9SdYN7k5HbyppMGqwk7zUBSNcG+iLRafKotOxRby\nQFzsIFSipwdhBdHxAgfL/lGLr1h+cwJx2Lq+GIs47An5vk6oINg5x+FHM+MZ\nAj9N7e6EK5D37guIKCblpdpMqaCfdZFpcoYJr23CDqNHrDVu8lGiycdgTvsq\nuuKK+uYcp1T0zwXcGh+n5awQ2jWbJEE85BvMr6yFIMvdOPHsb/oLd6/JS78c\nJUwGVsRbH8vM4YxhwmJ+atoCQql2wZEWEtPbl3eGhocti+gSjBsJHJR+4iGo\ntS/GZY2vqPZq68L8eqEtrOgBQQOnrGMM0HlWFZlRGtAFKI6f0kWej5gbRz8d\nadciUc7gotpzW0DU00z5iJ0F1uGJgUkYkNN82HecP8fA8zL4u2FDQUY++uDM\ntRH0GG4p2/ocp7l6Xh1IMV+J1fnkHo7Dk9L47OgAbJIUddQMNVFgVo9jbQZ3\n3RZhiwsN+UMGGQUhNtSaJcikEu6xgiYAA3ArHhTplWF+Ue3DDeRn6tV0L7Jg\nNQ+o/HyMqELXWQIqvOK2p2etgMzcgn3iWolXTaO8sP+yD3iTthFQmq6IHenv\nex58\r\n=gmDc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFu7c4X7tLuDVhWeOXmkCdIKcSeOIGSj/PMR+nPHPaMgIgEtvgA3EcwYLlHgVzOjwOWQSQhXnfeH23QS6yHcHIsSA="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.9.0_1548157014994_0.35028881422555425"},"_hasShrinkwrap":false},"0.9.1":{"name":"minter-js-sdk","version":"0.9.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.1"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.12.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"25a2d67cb2ab374bf2e7390b31b76d409f8a4ae8","_id":"minter-js-sdk@0.9.1","_nodeVersion":"8.9.4","_npmVersion":"6.6.0","dist":{"integrity":"sha512-lGM0AqC0nOcxF9xdhxTXkkqK7qEx8UDj8q6u3jSWEmwy+lyHbKu6aZ7RWF21ADvmQ7ZYutoyXdna1P+ux/SMhQ==","shasum":"89b4dfa978020978a68e5dff5296390f0d6ce8e7","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.9.1.tgz","fileCount":28,"unpackedSize":51194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRwSxCRA9TVsSAnZWagAAtHoQAIpPhKIq9l/NhCL7qqdh\ncF94VJWWXinCvZtx8SL5xm/c0JfsIxmCji4ftuyvliDSa8yCijNaXz4cWePb\nwuTA2NmYTlm3PP4AXrbrh80cFyLsYlTm7S+oDk/dwCsyiZv6tP3InYRqtKR5\nLER224szTT6swjRDX8nMv5pE+C6AcSvBNrgXK8XO5UbN28CBfouE5M09B8bz\nRbX2S8zzp/Wfw+TDJt006X8eu0fw7wXCvNEC8HY3yghI94S4loeuoEklHG3/\nq9PYOA0IKOfXrdEQmWf7l/UslbnarSOb0pILLUdMl0yoYsfvAXVAcep4zSbs\nGFDNFq7fz2nT0ogseJRF3AFayA/zAyy2ftWyaBwFKjbgaZnh887CwZ4KFFfr\nK8QeHCx9nFMMV1lgIVOo4RzYpGPXnyhGe5Ui+h7El8iU6QjWVzgwVbo3I+y4\nlPHX9EndEu9w4sY6rfX0fPJKyqGdwK0/KeKAl8xQNgbx/h38boMX/coGMe7j\nmwSnII9Bba9A11M6kE5MWWljpiyCJ11HXFAZJHVtNhxbTu+65UvdaIQvrA1Q\ncvByn7lrCRLppO56Gb0VJ/2ZhPRt4rLuhSxmNUrc/0MyRcWFdF3Ag5YpfBdl\npC+5AUpS4aNKtLRUZtUDoDPgvYvBPfZliWkFwCk/aC0vxzj2Km4EnqgfGCzu\nyhwC\r\n=Zk8i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICxuWO5V5+6XuxIvJvE91AR5/Z0B3tLk2D7xvlivC6VAAiA8E5hoDZrK5mnr262ZkSqMk4kkJjkw5ezQ60ypdjeNUw=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.9.1_1548158128533_0.8092883404920652"},"_hasShrinkwrap":false},"0.10.0":{"name":"minter-js-sdk","version":"0.10.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.1"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.6.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.2","eslint":"^5.12.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.14.0","jest":"^23.6.0","pre-commit":"^1.2.2"},"gitHead":"3c55ee52918872d3982488941404c65ad5bcda4f","_id":"minter-js-sdk@0.10.0","_nodeVersion":"8.9.4","_npmVersion":"6.6.0","dist":{"integrity":"sha512-Q7E+OYT6gl3swkeEDi2ZVNussF4hH01n+DM4AnlIImQXt0+JkDxodjMkU4frPW8JsZYUF+AjvVkkUI2yOdjZSg==","shasum":"11df853431aaf7b6d0823b016d3b71a083b12999","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.10.0.tgz","fileCount":28,"unpackedSize":51296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSZWpCRA9TVsSAnZWagAA2o0P/ixO2l/4OzdxxnTRlFbP\nmnfOHG+1LpCCPZRH79XudrpO8BRROjVnDE0DINV249i6EUb5geI2281g+jI9\nfo6wKJFFmN2dDhtfU9L2bhbyo3+WmVR+Oyt2jCHquHLRICKc9weqy2Bk64Br\n/TRWiulqfO36ykC42xOskuPCiJB8n9RblU4fvJCXNrKCPhC+OzzJ6bw/P/na\nxyaeu8cRdNTRDw5vfYRIIcHwMo7nTISdArZvNtdIG4Zwmu9xXUo/HyUgQT+o\nKN/Q9PCWbtj70mJ3ib7E67d6ZrRGcii1z6S+MISCdFjeKhLDNeaqj80iH4XG\nCY5nFDOXcLY0Ej77vz9vHf4KKbDZqfmNEu09rK2iTZghrbsKvDY90vsHkgfE\n9SiSe+N32dkATXC7JTO0B68xRiOVB0geKT2gjU0unkYQmnN0sGAizeojlb4e\nelrQgy7XhIkeYjf2RoQxLhuY80wX4bQQ3ST2VOzY4DuFRIYopFB7Og2W2QDR\nNgjj+jnzSd+UTvGVPK0XoC2ArY2NKSuuzUE3RX3gFj+t48aJC9GhTJkYwah5\nVgETOCIdSbRQM5/V6Uusqkr01RgVh7C6tD15U9+RMNLSbdFMCLopjkftq4/p\n4XDuXMmjZavYYrFMjZaO1D3RVuw8hGnCL+TlsnZbQW8wPywkEDpsueE0CY2d\nzEdu\r\n=1PGx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxl/NrsMiG7yQR+XZnSgsrLtv3n+d0x+WihNfATjRPEQIgEIsp8GWY64xvvU9YsC04Fo4pJpuExWLWVBuwA9g0UvM="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.10.0_1548326313111_0.6506333076683941"},"_hasShrinkwrap":false},"0.11.0":{"name":"minter-js-sdk","version":"0.11.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.1.0","minterjs-util":"0.2.3","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-jest":"^24.0.0","coveralls":"^3.0.2","eslint":"^5.12.1","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.0.0","pre-commit":"^1.2.2"},"gitHead":"b559f3c23f483e2f4a1cd6dabf53d62ce297ad5c","_id":"minter-js-sdk@0.11.0","_nodeVersion":"8.9.4","_npmVersion":"6.7.0","dist":{"integrity":"sha512-DNgYrn99VTTFFHoWui6pXuUFz+j2I8cq0tHdlx0keBM0p1dPmNIqrZl8kgVN1nh79a8b6JvJmZfUG779zznleA==","shasum":"651a7a982f953a81621fad5d9879d6c10bb81b60","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.11.0.tgz","fileCount":28,"unpackedSize":54358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUuf+CRA9TVsSAnZWagAAZb0QAJ0NeP936HOgNuPvP/Pz\nJSSg+rLz6UH6kLaSCXZDxR9OZ9NXndpbFu31S/NQk99pwhozBotlFroulOP2\n+LzefPQE4iIt5u6Iw5yYj5baTlrkOFhL9ymODDv0pC5I4EiHXZKPd0H/WzK7\naoPQXlzFsBwt3MI+u03/78xnLdB5597te2Ygu++GVB8dYkDaeHmrtHJ0lyUu\nqPoo1qkXhFw8XzDy1hmMsxBjw/AVhh6L1CH4YW/nLrQpAMvAJe+xTdFOxMKX\ncEiEP9zuP5AD9vPyR4niB/UZQb1vpPEMvVDLF7tXK1gu0iEYigCWtg9k6QNb\nJvzZEZDMkqVPkBzUx0yC3wW36npQVKg4IMRDDLY7QjNKvLq8mhp9gAtEa55e\nMVihVeIv7lRlqCUIriUQgYB1VMm2Oeia7rsaEJL8Lx7TSlyVN4hnc7Ui+Ag+\nmHxn2ycbhkMKYOKuggaqkkmWRfhrtEcnUqwnODV0W7xete7AZkYxryr+5yR1\ndjLDmc6y7z9oXdyJwgHcjvqdqRujIJF9oSnD7EYlDjQmx2GNgv62YziEjC34\nitgRqb5TbhKjx/8Y5i5wqK0omWuK2hWFqJkhXa/AXBTSxzg3OiH4S7lDpdFa\nLaR6Kx6XuY16Goqc89SDbjYBt6YEKig9oQWfcHAOmfrL1bjG10C4j+e8fYM3\nFqsl\r\n=LdCB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2WaoF7Ymfzs/752Knm1CRc3GhRURDMKNq1hZBqWvPEAiEApPQ3fphgyM/g9LOsdr1B7HENbTI8SZkREQryeYBz6cs="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.11.0_1548937213979_0.5858391886660532"},"_hasShrinkwrap":false},"0.11.1":{"name":"minter-js-sdk","version":"0.11.1","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.0.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.2.0","minterjs-util":"0.3.1","minterjs-wallet":"^2.2.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-jest":"^24.1.0","coveralls":"^3.0.2","eslint":"^5.13.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2"},"gitHead":"b58405064564cf7e443372e3a804e32d61ea9c47","_id":"minter-js-sdk@0.11.1","_nodeVersion":"8.9.4","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kXUkR0EPn4W+x04fBQLXGtwKdQUqrP8SkFYA4cwRmxYsBe1eHLd5pfDOEvUNFA5GKN3NSI5sFERyVNym/sb2ow==","shasum":"e921e7c5e77528fede2f41840d68c098f6ec1127","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.11.1.tgz","fileCount":29,"unpackedSize":55059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW1LgCRA9TVsSAnZWagAAUkQQAJKyMVQCvaOdT8KDxemG\nlmdym7TmTVyQro0SV2kZs7fakvuq3HuYqtOACtM3y+OCIUJgJR9ehCedJVqv\npKL/lstCUGxTXhke0lx3fql9zOz/4wBW7zqXwHUQRxmCHku+2ojuwsgWKA/q\nBcE1BnyDCa8F5IJY9A5AuFQizteZUp0LQvz8VDh83bK8ADQgVMOTQfowC6JE\ny3G87kT8GPkp1WJDdHmwJqEAMVCnegqIK/65jZAIvRn/18OYa4NDXp/SrUzF\nH61M+h8p4vaG221wz8zx1slQgvMK/dbHusNcAWnu97EnlqRcMkVy+h0qr4zP\nxifyyOrqRhNCgVSkZN2ZJH1t5jR3fTYmrFiaXAKAbrZhlKRQoAoVCw1scRGx\nx+tttHV4G2nUIDcPAUwKB/uRMfxfuMOZxo9oZys3r+AxowcyNLzBZfFpelqn\nDIfqzeEMSKYOEn1BrUlh++KtPcX9C6cR2jDSWo30nu1wnVmj5EMGjpKCyAIG\n4nPK1KHquz4z5PCPbbDuQLMnYzN4C9RvULw2OmHaogmu0sbwqUXprtElHkV/\nCIoHsZ17GLIQ3zMb8zRb93dZtfdVfXUrarIJmNQX7UYxd2MQd1VMUxHpOXN3\nQ3s/s5IKce3LGGUSN37CLGneUuC7EPacKBQgNpXhL6AwuqHNbnw3TsUtwKWB\nftG/\r\n=GqXw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiRGv4R8JNVzJYd72cweBT93eHAzbOSqjkEjcGq5HjcAiA/y3CVitmpwB60fc/DBcOMUzdW4CfdXRU1i3KhAhzVOQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.11.1_1549488863548_0.6755184548024808"},"_hasShrinkwrap":false},"0.11.2":{"name":"minter-js-sdk","version":"0.11.2","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.2.1","minterjs-util":"0.3.3","minterjs-wallet":"^2.2.2","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/core":"^7.3.3","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-jest":"^24.1.0","coveralls":"^3.0.2","eslint":"^5.14.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2"},"gitHead":"b6d5e441156915427e189957d72ec2c0584c5cd6","_id":"minter-js-sdk@0.11.2","_nodeVersion":"8.9.4","_npmVersion":"6.7.0","dist":{"integrity":"sha512-F2DzTFQrc3HHH+JNqWPL4sXGB7vj6tjg7VKGpUEB1mWSE75R9cyCfuxk0tRwcVhqipDPmkhqO0dhqHDw0E9M7w==","shasum":"2e1970c1c99e94fc2c164b68ca81519b2e629ede","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.11.2.tgz","fileCount":29,"unpackedSize":56632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcasGxCRA9TVsSAnZWagAAyOoP/21eGfMgli4B4vVMsJYt\nK3Bu4dAe2GI0dK73q5nGh0sSuzQG04P9ZOqlomzZQzAyozs+n7WkzA8PCko/\nC1tfhBuLSxKMZF+ZxSFnLpwxTyj03qQ2q6vjzSwV19Ic8flNxvZGzbbuv9Ck\nv3Cf/8eYMvKvyosOvinTIYaMM7UKMbr6aONgHD2bCw8otrSfgfNAcs4D7XvJ\nVzGgBD7JKJYdI7T0YZ69pxYUYoMDmAW3u7jOOppVMYIuMqsu3XNA3Ri5Um+s\nczrKcXbXdTvMz9fvhT+B0U9GT/7gveENcJwVbBL11ljfMBRT9bCM7efr1hxV\ng8JvlvTUC/kohz3QYLTub4wIyl/fk+1ZTQqW5/xPkYhDR0ClNSmd1bS58wmm\nNmKHtI1gEYNeJ+aMQBsHaAwv+0xPaJjssxxtGoMFjueCkovd6dC6seY1yFu1\nSr7KGAZti8IxFnVCKYR2wkyVhbbTATT+sw48+mefC1ioy9zrWNRtWva7aKu2\nG3jwEBw56A3Z1upNsdWtaRj4dZ+8wGZjZrZg1flv9CZopxeQrTv+rpfOIfsW\nptd1vlHRzDzevfjt13h4zJmnW+hKS1rPZe2dPhuvfkN7bru4BdUce4eqMFC3\nF5VHowRFMWY2I2cSHO2wWQ3OPZf1ow4aguT05BuNU9AhqEYGGqM1Lq47YTmd\nzSgK\r\n=zblL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0H4VlleMN+YPTQiJaQt9rm6wEMZJYWtB8FyJ1aNnHNwIgEVEg4mpsJWwLAfJCPQ/VP268dryqAflbSGoQ6eiCPm8="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.11.2_1550500273089_0.5326599904757032"},"_hasShrinkwrap":false},"0.12.0":{"name":"minter-js-sdk","version":"0.12.0","description":"JS SDK for Minter Blockchain","main":"src/index.js","scripts":{"prepublishOnly":"npm run lint && npm run test","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"jest","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.2.2","minterjs-util":"0.5.0","minterjs-wallet":"^2.2.2","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/core":"^7.3.3","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-env":"^7.3.1","@babel/runtime":"^7.3.1","babel-jest":"^24.1.0","coveralls":"^3.0.2","eslint":"^5.14.1","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2"},"gitHead":"31feb6cd7fff929b368fec4a2c67a56853b963a1","_id":"minter-js-sdk@0.12.0","_nodeVersion":"8.9.4","_npmVersion":"6.8.0","dist":{"integrity":"sha512-CC//WBcu/PQMVZ2sGBC7onPFa4gRcrEMGXupKRUic46ZnqBy8K5nQq5kNR/BRNYO5sL9GpblW+yucGGWInt/Fg==","shasum":"d051a5f9dfbc7bd40a5cc4c5b759810051ade314","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.12.0.tgz","fileCount":30,"unpackedSize":57821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbU8HCRA9TVsSAnZWagAAZhsP/A28+Y+aWPjMQWacQivp\nBqrtIKSZKaTD0wMnlQSzYET37QeezfUWlSshktcTLxg+PvRC9gHdUrRPFk9z\nDcSY4Dkcz1q6+CrzeEPBfXd1ZkTkCwPT10iEIs+/cFWeX6T3X/7ifdPBDTs9\nMDyWm8XQfeISzpU4n7XBX2PTcACMIpqsRpq0izPbtQQSNWA78L6SNSnODuoS\n2Xy6mHHMmMxaUduPOBds939dLFdze+DeJ7R2pBwu5Z0NMIhENzMkxy+X75EQ\nmyEwuBgqXfBnFw8iM28tVyf+xpBzy0IbTcjTfmvQPfvTKeiCsyyaAas5vp2D\nHXoof/dRtIcJILOi0uMjnEmCEpRrS661E9z4aMRKjMIHi8aV7I2eMfqy9OAC\nlK9Z64l58h2580RuJqb5hCTd4n+M0d0Z8C9ZfL+2KTfl7ktArpAuYg+/0IA7\nSIrQoiMw0QdIYkvMum7Ux6u5DXuLJXWJlH2Z31T2bFXu3vmfdjUsZ1EzOvD3\nwS2LoxMhiljKyW63VlddJ3Z7NyZMYikifyrud+JwA+45qFMhHJWT792grM7A\n/kfLh5GLLoJePNK2oh/muhAE0PbSfvGBaA8lxAqt/fBMDuIAdigNLzXwzYEX\nNsbWkW62xoQdwSrlmTiAaRN0HfRCB0/4QoWeGEiWyyrC5SfCuY4bW0td7Aqv\nWy1t\r\n=Od1F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEzmVwcdToiJIIgadYkPUhUH8451QWY9h3M3Vwwjxyg4AiArKmxjJfAwyE/K1IEMhlzkQNq++9aOSGSAdeTe1tFC5A=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.12.0_1550667526858_0.4181487899906253"},"_hasShrinkwrap":false},"0.13.0":{"name":"minter-js-sdk","version":"0.13.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ -c build/babel-cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.3.1","minterjs-util":"0.6.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/plugin-transform-runtime":"^7.3.4","@babel/preset-env":"^7.3.4","@babel/runtime":"^7.3.4","babel-jest":"^24.1.0","coveralls":"^3.0.3","eslint":"^5.14.1","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2","rollup":"^1.3.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-json":"^3.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"gitHead":"597cd675c5adcdbb59ac975201f9d1ee090bc129","_id":"minter-js-sdk@0.13.0","_nodeVersion":"10.15.1","_npmVersion":"6.8.0","dist":{"integrity":"sha512-qc4KOaIDa3uqO8I1d34nANmA/3ZHQxX45yZk7eE991DpQ+QedSXJZloPXt0klrg+WPQIa96S93x4gsDbce++3w==","shasum":"0dd334e80daeb40413d03cd2ca02d97fe406e0b9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.13.0.tgz","fileCount":58,"unpackedSize":1666688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd/2ECRA9TVsSAnZWagAACDQQAJtxt4n+vy7wa9fA/oQo\n9BS0ezkAZyaBU1XJekRLFxlJjqinMx8meDyknDzgaX09iJ+uyQUq348T1f9J\nQK01paOgAZ+CGNDVntxyr9GEGIkpqvv7Hyrk8WpfH+abvbtzMt0cJ2nsic5u\nlymmLLrVp8Pn/bx6F/EZg2jOcW0QRKfhvEkHWZgLPnXZ9uSAL5J+t5rYl8Jo\nBmXYDL2E/pekQzCNUnopaCvvEwl13HKLxuawffvjD2G8t0Rt1OaGA4DgwGJe\nOsS8uEbbGR9WLzKgL+tQwEuH6IUqiGKeKLHyqeSNcKx/PbnZwig/5aQyQu6L\nsZ+b8zmnAMRR0WPZGUJ5HrROzgBIut/oFQgYsh4gMHk0fnV4mFaE2iD+5VSn\nv3VTo0t5xMBl39+zw5DZ+1ucDVdTKsurmF+49LMhgEKB3w+/SsKwvGCmlYPq\nBnUuIdvB6VKBHlkm8KipfDXJkKSQqckwmb3ayRd1ZLO61VCJH1UICkMb1LxK\nIVTv0I0Wt4pyPZ/sCsUZ39E5EuWzzBGCQ9pHPKDeDXHcES3q9+3/hc3u1M/q\nLgpBMyf7sFcagCy/HkOLwdFx5VoMeYmjgbWcspcNW/PPsTyq8DHhh08sHrNw\nPNUuktwvS9ovHbXcED7N2JtzUgM6LfcV+MaSBphgJD0/5nohEpps3inJwZeZ\nytyk\r\n=ToA/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4K5CtCIppIbTwVnMj+qTLzlyItNR+4sr+T4QLkpsungIhAJ3hlN12Whj2dzZsiW3LY1Dh0I9nvHhc9iRpi7CiN24f"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.13.0_1551367556061_0.9105679415140644"},"_hasShrinkwrap":false},"0.14.0":{"name":"minter-js-sdk","version":"0.14.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ -c build/babel-cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.3.1","minterjs-util":"0.6.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/plugin-transform-runtime":"^7.3.4","@babel/preset-env":"^7.3.4","@babel/runtime":"^7.3.4","babel-jest":"^24.1.0","coveralls":"^3.0.3","eslint":"^5.14.1","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2","rollup":"^1.3.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-json":"^3.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"gitHead":"0916be56c14ebfefeb60620825c8b8c9529bd99a","_id":"minter-js-sdk@0.14.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-/vI3Sj2gIyHVVn09Er8cnlsmh8Osm8awG6iViBwZHGrcpuXmmkUlVxNT1enRbDTzQSkteeWRq7XgTr5l+Fby2g==","shasum":"4ae7b61bf9d6e835ae9e32a37615755115fce38f","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.14.0.tgz","fileCount":60,"unpackedSize":1667285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcq3L4CRA9TVsSAnZWagAA28cP/R6Ydb+L7UbcWbnpZSQr\n8dH9bWO5Ij1ZlIBmaw6CXGB8nAYvcSqwS3siIG+LMr2iaJhxXsm2qVzoQwJW\nM8ziugrydF3EBDuZ48VDHDeYzXsScSxiZcRAhuJD0pIbdIRsFSZanEIwxLso\nU6fnTrgdSbXGYFvDfMfT6fieywIhrraiDBmfsuef/1jOCI6gKJVrdjaSFzca\nWE3cIqYTZKMOdSeSC0hRLCRS7jvL8r6gCTtoc9guTX3lfKcIXOBb0v8e0Mfs\nGONdfbUkwzwVLAAyzbB+/Y9prk39z5532TBxG48KNnEPIcqdR4UKgGIf8Y9b\nsU2eka/BybDQo63pNyU1cEi5wrziuQnRANViPGZ170FhzO4qc/rGJhDDrpyR\nbPjmWUlgjt2od+3ylfpb6SfPSRSDHBObxQl5q5reYnxpGZdhuDj7mXjj1TVl\nFoboFssp19BZ/YUHV0lwuHIvdKLdaluJAP/RZygOuUCKcknicd6U4E/EPSM+\nsycJoVTNg/yaMDQzB/urBLvRbgVh6fM/3Th728zdiumROCbzOB91T8TgpiuN\nPYMjZtVY4L2sNcf+v6hYDEegOFkUJgJHh57znm4CBG+YYpq9ZoJtKABOzXiB\n892eVlLDRPNqp3H/6LqAJy8TolNh6tQGmDyh3B8mjOUcbJ/Qk88xzlyLCw7v\n/K56\r\n=S10Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChYXmXuCOEnCSq2TZX1wyz1vdLvjh5ERvOvmjZJ+v1hAIga3ElnZH8uAM6SQtGqgQ0DncwHK5pJJ4vqmnzU5FIYf4="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.14.0_1554739959789_0.259327360177362"},"_hasShrinkwrap":false},"0.14.1":{"name":"minter-js-sdk","version":"0.14.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ -c build/babel-cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^4.3.1","minterjs-util":"0.6.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/plugin-transform-runtime":"^7.3.4","@babel/preset-env":"^7.3.4","@babel/runtime":"^7.3.4","babel-jest":"^24.1.0","coveralls":"^3.0.3","eslint":"^5.14.1","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.16.0","jest":"^24.1.0","pre-commit":"^1.2.2","rollup":"^1.3.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.2.1","rollup-plugin-json":"^3.1.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.0.1","rollup-plugin-terser":"^4.0.4"},"gitHead":"b5fc51db392b7def78f4320f448435e0ffe9a93c","_id":"minter-js-sdk@0.14.1","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-v00XwliSyEu5S+R/CCjSrNWfpGcKe92P2rawtNLg4r3iGazWE7Y5P0a4sbru5NY2p4cq/k+3JU5UV5fz54O/sA==","shasum":"e68e104f02d2f2820e73817df8d6c65b52b2d930","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.14.1.tgz","fileCount":60,"unpackedSize":1667167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrLVCCRA9TVsSAnZWagAABxAP/jVpoWvi/DW9EcgZYWZK\nBf11MVwCiGV2iHnZXmqNzJAmkqdmhPRyPHNWk6bmXqv4rpGhUIlikgQ0NIMC\nuuogYBYkhQGWVotjZogrrN9ozBZrjfizzxNPt+OMcY9wNBc1+zXg4t/4dKd/\noegoNka4BGKcXUgdbrSqsycduEge/8Iiisv0ljM9CB2ZxiPeOetnY/6KwyAs\nz+/ustWEy/k3jB5f6og37LzGEDqDoJ9SvlMdA2kv6bMOpnemgB9RGwQ4Fcy7\nP04JHZVoDJqC+1pcXyWW57HYBxWtxIuRh4b0y57oNb76QS/0LW8UYdLTGjGg\nPl84j9TpppgsXav1jR+XqDAgE4sl74fp5Gq5JyogjigitRFAguswwXseXI+f\nY5WXHOFV5KTCfwhJ8EX056JQnK0H5npjlF8rmK/INW67pxzLnzd7MHRCz5zB\nxy1WF2VKTEBdZhrdiSVS8ztgqr7iAo1TpBtxFM1H0I0am6m8R01YdPXeECNr\nKfuqV3jHk/S5Tb5nwRSbXBsUs0SGuKWPHCV4KVQoX0b5IMsLcZEcd87NQsg9\n9pCkhSQQLcLpn6UwP3C0JK493e3m/dLnt0611P6lVodp+MhEKzDz2E6/oQeZ\nWkzYKzAOz85czoCVBjI9bYbOMfiW7pnVsqeX7w//jm+3fuRWnd5d2oN5YoaM\nnvqY\r\n=H4+K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnIAjv4jjBQ8BJMDKoI+gz96AzkCRxkwEmKFT4xGYrgQIgSYtXRO/PzFLf9ZT0tQIVDeTg2uegYS3q551xGVc7ET8="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.14.1_1554822466047_0.8289528310834293"},"_hasShrinkwrap":false},"0.15.0":{"name":"minter-js-sdk","version":"0.15.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.0.1","minterjs-util":"0.7.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.4.3","@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","@babel/runtime":"^7.4.3","babel-jest":"^24.7.1","coveralls":"^3.0.3","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.1","jest":"^24.7.1","pre-commit":"^1.2.2","rollup":"^1.10.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4"},"gitHead":"3086889cff8a3b8d66e31efe01e5f69969cd9e21","_id":"minter-js-sdk@0.15.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xbuh/4UYQ2Gt2rr92wRWLKUH/EzSpxpVQKTtdqrjcNn/wAvSBwIYzVVqVcHlCJ7BagYTkENGHjUOIkcHnfgVRg==","shasum":"066bdd26e5dc0695456e6d73b6defa3c0415570e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.15.0.tgz","fileCount":60,"unpackedSize":1677030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctzyOCRA9TVsSAnZWagAA2RAP/0DPMS+W8m/r9fP1hMwt\n+VoQylgWilC2N5YpB7OVfutQVa6z5ctcXfNHqwET0CwEDErZ7GpeEPXcMB7e\nO7aHNM1lKcC1dJRLHzC/RVCXYP8FYg1GvLYgWppG+Vf3xQM4ihvCmbGUDQhh\nctIjOJit9aGY9bud2X3LCe3KNHFA45Q9Uy2kiNfcKM4+PVJJJO+6MdTZpNCG\n9UM7E89XnsCKxF627q5zjJfmn1KDsKKKu2Xegzr+HWgR2he3uxMFWZQAcYjY\nZ0xXrpSXNOiIh3Oo4bCP1RCkjbbhv18HwbMdDx83H6jUdJrAYLXc826OnNjW\nSwU9ZDGIBqj/dBBLBJdynO094iV7ddBTmyL2aLQvtkzUZvz0jcP57RKsl8Lt\n5MI19mgs5JHIChwDI0fInuaz2KmwsuJbn8rQlC3kM5I9MvrST9j0JeoDQg5z\ntRBlXqhu4ub0YbsdPuVvYm/hqGA1U5Zqg+VKlhiXZECQgKZwrMFcT38fTnwR\nqm0wJZyprvp8UIIVMuwXnlGwVjxQB1rYp/M+4t40XCt8+coPbGE1LT3+x6oj\nBOb9hKhM8u4iVAIYtPKueXr84CPlqy2WvetVYre+UC2hxZ05W6TiwkCYcScL\nL7J4oX3zxu03aO3nZdzRGSm2lRP6IPeEl36V9bWiUdblJddqicsFuQPwDFiL\n7zsv\r\n=a1Iu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGyouZT7enVy5Q+GRPf8wem2lBR8ztuovrUfDqwCJ/6WAiEA/le0gBZ+sKd/ycCZrZWRkFZ3jES9EKBV3F3ZjJkk8Bg="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.15.0_1555512461226_0.20489455091544895"},"_hasShrinkwrap":false},"0.15.1":{"name":"minter-js-sdk","version":"0.15.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.0.2","minterjs-util":"0.7.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.4.3","@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","@babel/runtime":"^7.4.3","babel-jest":"^24.7.1","coveralls":"^3.0.3","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.2","jest":"^24.7.1","pre-commit":"^1.2.2","rollup":"^1.10.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4"},"gitHead":"b65154a7acb717c69896f363eb3ce9c01d2b0b4e","_id":"minter-js-sdk@0.15.1","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-03ktO6C+vQtr0CJVTSHXB0qOzCX9W9lBOlHEo/Mm5FD/BBt8jtTLFJcpK0iexma4ZNAFXy/u/Iua4360Q2pn5w==","shasum":"0f0a9f8353d4faaac76ae640fac68e1a749ccbd2","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.15.1.tgz","fileCount":60,"unpackedSize":1677101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct0E0CRA9TVsSAnZWagAAvz4P/iBc0TwRvvFDhK8zGwsR\nCViF0qzsJF/eRuuBecYrqV17ALCvk64wUojscX5eV+P0mryvqqvcTO27xuQt\nZsV9RoOeQZqcW1tqywwjIIsT2lDxWl1hfCxVhLYzneg5NfwVQUo3jD+vFB7S\nrZSN2Q1wTSaqGc1PmdVFzoqsnG8m7Mn0lTgkAmdGEg8jDdx2afiFq28CApsk\n45VUyYNY5gqOtrJIIhoJvxNB0Xj4NUVSWrDlwHsKD+em0syLjbDl1sFBhAZJ\nLRK6aIm1O051W+GI3vx46+VkKvipWR670xRmutxTz7jitbQn+AlG1KPfcVW5\nAIFQo/JZUa1P4uF1xdOkj2zNDPI3IJdbbDshzuL1ve25UhbJbdU9N1WPUl0L\npj/gty7fWYQci+7gjZsp3pOakt3aZonFy2sCtownJaHz1Veimpy0iOVMppXf\nR7TeheywrEZOrO71Py/wd93df3tGqkZfScew+67/Y1pOkXpSc5ya7ICAPC8N\n2iBYqCJ57eIaO2z+4GMZKhKLlQEd3yxAJr5ZlfJRxkzGErOmEd+57LWSQTua\ngUAZDS5TDHB5fY3eqMq47RFIojCfAySApSDdujATT3ksMqN8ut1eM8QR6YXY\nAmC8emn+b4QsaFL5o9dLWyywpSFVOM6g9s1kIz1rSVX15fETtARrGXkz6gMM\n7G7J\r\n=5HZk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2xHxFHpehVS8xxVqOHf19mGjFR6juRt/fhRUUXnsk1QIhAOvT0koUGyV6nUUEkBIfGSRzfFGSUiUsP/8DmpYkDH+I"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.15.1_1555513651801_0.42153230947457376"},"_hasShrinkwrap":false},"0.15.2":{"name":"minter-js-sdk","version":"0.15.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.0.2","minterjs-util":"0.7.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.4.3","@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","@babel/runtime":"^7.4.3","babel-jest":"^24.7.1","coveralls":"^3.0.3","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.2","jest":"^24.7.1","pre-commit":"^1.2.2","rollup":"^1.10.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4"},"gitHead":"fa47f75f4b1c40fed1c011ea99323404f8332682","_id":"minter-js-sdk@0.15.2","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3Exk9YoVqfJxl7JR5yQ26M15mxTjMRdT7I8vWuSmoqBUMmwqb2GMl43Wt1Z3GbuzQsE00zgPkG0vJp0lgbLiCQ==","shasum":"16963f4585bdffc33b4aac9e6e146eb323c297a6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.15.2.tgz","fileCount":60,"unpackedSize":1677962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct19sCRA9TVsSAnZWagAAjFgP/1vD4nz6/5UK0yGYjBTi\npkab1kkXKsikdoi9RO6GoJ6KzMGUj8NOQZpy01WhS/pwjbH/NMY6zEwol5OA\niPLDc1L5CUWqJi8e5GxwRn1gjV95anbpAur+kSYQUjyUKhg6la99VfWOUZq6\nwNu0uJKlxZAlDrqdnVYBM3kTAfRX0pbWAbjdN5+06T3VFADk2Mmov8/bgq2H\n2MKB3OqJhOuIwMzHJjeMX+vEmeS94oXkGTfpSh5KROV11N2vj8t0YvzaEBpe\nXkK4qy2ztZ/WtX1jFlH5SCU/X+sL4YApfFdIhFpXDpiN+T1btTfMKW16bvFG\nTTOTXVj45mnuwdC1niG46TglDRB4U1UOZNjdhpG2weJRqiVTvCVCrfL1uSCr\nHaBPfTVrk70DYwfj9tp7DYy3FQV40dF8rKWge5Squ22ryCHxwI961CVRHWk6\nHs68T7pzCDMLmEkBWuxhuigA6m7zP8AztR4Bm7RYQjaQ4IgVcX5qUjDJPH2e\n//Ys6oU3HH4L1KRrQyklvcWpfhWk8ORPvuyOp4G891uf+1Av8hn80byq497b\nCkWWCKIvtZaDOTqINFs48/VI8DgBPqEa1vcEkP3QezHaotKD4ZKvjhc8Ap/c\nmgTNmHMo2+dwNaJ69Hfdbrud3bn0txjZk/+2u43dPGcU+01HeEJv9BwGeZ/l\nCOaM\r\n=d3PC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETq/RuhAM5lmLt6wm3bXB9ndBkWp0ZAHP5prSRQjL7FAiAhmbw7pP5VuYUxIwAlkQb7JnTP2LdNOF97/Pj109kTfQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.15.2_1555521387252_0.32146837548916185"},"_hasShrinkwrap":false},"0.16.0":{"name":"minter-js-sdk","version":"0.16.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.18.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:xg-wang/elliptic#8a6bb93d751559db43036a2670825af215d0aa43","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.0.2","minterjs-util":"0.7.1","minterjs-wallet":"^3.0.1","safe-buffer":"^5.1.2","secp256k1":"^3.6.2"},"devDependencies":{"@babel/cli":"^7.4.3","@babel/core":"^7.4.3","@babel/plugin-transform-runtime":"^7.4.3","@babel/preset-env":"^7.4.3","@babel/runtime":"^7.4.3","babel-jest":"^24.7.1","coveralls":"^3.0.3","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.2","jest":"^24.7.1","pre-commit":"^1.2.2","rollup":"^1.10.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4"},"gitHead":"9514c3f120647fe186a42c9ed7170e75601351f5","_id":"minter-js-sdk@0.16.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WRocJQJH1pJGRdm0FoJAFw+9AessciHLC9hvqfatIe+C4pUtrBgNx/LqgNOTQ/rPHFWIt9m0/QkZ63vFfLz8yQ==","shasum":"04327f9f68d39a81cad20953e05830b2ee434b56","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.16.0.tgz","fileCount":62,"unpackedSize":1680581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvzcKCRA9TVsSAnZWagAAiAgP/1pxfrWjhgjY00+mL93Y\n5CGM69cUNA2Z+CwRjiFw+/2KR9LWEBvoGHqFwRk/y16xNoxggzke5Ngl0s1T\nnSvYemoQA0uXKHdhheuCyF6NpKvkq2rLj0R+8pXU5oQN7Rrxaz+HjM8E9+ow\nsCl09hzJ4dr1JpCoPuQWI79UReduh5PeFWExku/H+rJosNGh2YyWZgap9N90\nuP1vGCvEDqeK33ByFeTCoYVJIQGnrtbK1wqRXFL9Gfl5P1Q+TL1Zec9h9Cjz\nRkSKT1wvxbZIrdH2T4dGt8H+PyM7x8r6KdNwAowuzM5QC8aaPdD6e+uzJzu+\n7op/3IVRDqnQ/PiYgPQ4eTT8/o1HY1HubilVQAGdLu8yo1DiKK/8ZPQTXIPg\nT0rLX5UJ4VB6m/k/hdwEaX7RK7T+lO2kT8flRyYXB4pCk9EUt6zVTw95Vajo\nGQF1Oibo5Y29jaw3pDNybrz7MEbBGVWW5ZXQipYeN5VELXjSilzXJj0vWxzy\nSJx7QySHR1msoJa2Er75PAeUPNFeYZjZvgz2eUHrOrkpFb+QR3g/cJCzqt40\n2bkVqjPaMxkwvMhO4nSRTmBTEcC9vuRm3t2V9W6EERwXSoFXdluoVhoxtdbG\nKm/qjI92Ixb2wZvQJPDRWeKvWGz8XA//c+E3kavVdJCkl6JC6rqTIB02wPnl\nw7dS\r\n=VZEz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEG+O9RsXKjtTyOc8TNwV4C2ndY8wWczbz4SKClvCjv1AiBjHsjOBT3XGD0DpY2DoPIsL/cfLdPNGOkjdgr92t/iHg=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.16.0_1556035337909_0.5608697155969034"},"_hasShrinkwrap":false},"0.16.2":{"name":"minter-js-sdk","version":"0.16.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:shrpne/elliptic#ab34e0f08994bcad9fa986899cd8d1ae4436d66e","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.1.2","minterjs-util":"0.8.1","minterjs-wallet":"^3.0.3","safe-buffer":"^5.1.2","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.5","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/runtime":"^7.4.5","babel-jest":"^24.8.0","coveralls":"^3.0.3","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.3","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.14.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0"},"gitHead":"93efc1fe36b5c90c9fac00cb92baa54f563cc0af","_id":"minter-js-sdk@0.16.2","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-doSc8o+VoIJmV/zwBvjNFUK3re0OwmOUUXDXd9wGoj+jbn3J8dhRakuIbAU9PV/uxvNHEV2o9BpXT1KdLefSnA==","shasum":"51204f9348762d561c415e3f7a45a392525c82fb","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.16.2.tgz","fileCount":62,"unpackedSize":1338926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+RdoCRA9TVsSAnZWagAAVJAP/0jqxBm6FPxmBd+6SUrE\nSqVBzzk1nJxz2gN4tXu/9tWe7aWz3VQawLNxL3SNPaNs3Zil7C0cWEC3oe83\nI6InJb6g4h3nuffIZMn2r32UH7+Uz3Y0a9Mg3axbm6OezmZjuEdwBIbca9Nq\nEjt8sA1YvbLm52KIFevlQ/ICq9riTAtuc2Lb091sJOGCINkjpmtgIcLsl3nG\neVztpErcLVJiuy2nuljC5YuTyextzcalqiNhYS7LusdztZ6cddOx+7Adb71o\nDDvlOjXGKEIQ6MUVpKeXWQBGaQDam4/Ur9B3tkKNhMYfURNiGCKoqxUDIqST\nBQLkJOKd2i5vTW6oRrhSNp13X40FaCodjoHMo70f2iHEzd/BXuYS/zxA+v7t\nErXHiF//7DNSMXwjw3T5ND8GunoGGcpb+RSEKhozma+/Vwvqb2s49CHu030W\nxUirAUu4C2nO0T1KWCRRFDpFWQuRxfxAQzMj7c0wDEjJF+5Yxk65VMR1+2Lh\noL5bY2mfQMjuGIfTLDxflOkT18DSP2G2q1I9j/ti+Jyil4RY1qEPyncP69Zq\nFZ/gebJbFbPU0m9p338/jXWgZd8/f5uYd2n/J11hgCSEnk/yz4N1PploGIEJ\ntLGQd70Tuzg/uG20xh3PeQi7Vy7P6lU06SN0TiVp8I1LsqtdCo1B3QVxgW8S\ntinl\r\n=Gdpe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg2+7qfXlCzaoWsm5F2BJUcRieHAp66oi4K3GrxivuUgIgHD9K2d1pPSILBXZ/gT2etbFHwQ67PAfWr7ZIi+vck90="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.16.2_1559828327197_0.20654184338706694"},"_hasShrinkwrap":false},"0.17.0":{"name":"minter-js-sdk","version":"0.17.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"github:shrpne/elliptic#ab34e0f08994bcad9fa986899cd8d1ae4436d66e","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.1.2","minterjs-util":"0.8.1","minterjs-wallet":"^3.0.3","safe-buffer":"^5.1.2","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.5","@babel/plugin-transform-runtime":"^7.4.4","@babel/preset-env":"^7.4.5","@babel/runtime":"^7.4.5","babel-jest":"^24.8.0","coveralls":"^3.0.4","eslint":"^5.16.0","eslint-config-airbnb-base":"^13.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.17.3","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.14.3","rollup-plugin-babel":"^4.3.2","rollup-plugin-commonjs":"^10.0.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.0.1","rollup-plugin-terser":"^5.0.0"},"gitHead":"62ca3e8f9c7ff39db1fe15f5f2e345209021df3f","_id":"minter-js-sdk@0.17.0","_nodeVersion":"10.15.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EWLp2p2xFMmB4rPnNEAgcs5tDCQdq1GZRoXjutead2vmzrWGpL2hUkfTvCUqkxDWY0fKYx/T1UBjkzwYzxPw2A==","shasum":"917ee1e42b9a52e34f8295d715f1e3ec80e567af","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.17.0.tgz","fileCount":62,"unpackedSize":1338971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdB24tCRA9TVsSAnZWagAAwNQP/3FNcvLMfQFqnoUB7q0l\nnWCxR8MrDBG6ma9uXF9YhbBzSXtzvHg1VNsb2Ju63tuHDPZI6ctI5hlzU1jE\nIoG+bqvyfxhBJifIDGCL/3K8Wv5u7cjW3qrlo1VHtTDZr6epMomD0Dj3tPqt\nhKIifJOFYC/rpOSHTyX9TtH2T9CCTzp+71nOuqmWfUGZHWVvVNj0apgrKLsL\ns25bASr5pNf5ysaZvKMVsSyDYs5pBxlvs4PCWkD8spnM5w4VE9eiSS+fET6S\n/lVDwKd/CzfmQuHX7O+dMoAmCai3b9XKF9jB29GTRpd57zYplVBduwbmn1s0\nk7sPlnL1rN/sWIDx85UKX37h0pGzpx/TeOlC1S3vGX4pUYzQzHna3i8TDyFC\nUWToVptOJxgk0fTLokPKHlWIsvXfCBIIfflpM65nzVASRn55SAweac9NJwQp\nASWed7OZpBRuUl59FUqkVJvnxyYlBsuxWWZb0HMYO0RHSx1loGHhHdfcfOk6\nKGXnsbT52SGGX1LruK/DTUC5nChF3Wpx/5TeyR3nLA6feO5lsxTft2mh1oVJ\n9ZgT7b884YS17SKjOEPwSxXeEodjarjsgEQBP0zwoHaguAxbBx9OJ2uBF+qh\nVbBOGEv7jrpMRlXTF5ZMw6DsgEGZDTtLdEc6Xo/fyDSUvYgp+fGSoxPyB8RN\nvL5T\r\n=uz1w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE0FRCo6mxmv5ntzx7XoGKG0W4c5K8Ht3pGLthCpZqoWAiEAmAqlJT5uzOJFyWbESnPbThh/jK/NO+v2AwMNy8xIGd0="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.17.0_1560768044475_0.701616870411373"},"_hasShrinkwrap":false},"0.17.1":{"name":"minter-js-sdk","version":"0.17.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^5.1.3","minterjs-util":"0.9.1","minterjs-wallet":"^3.0.4","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.0","@babel/core":"^7.5.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/preset-env":"^7.5.0","@babel/runtime":"^7.5.1","babel-jest":"^24.8.0","coveralls":"^3.0.4","eslint":"^6.0.1","eslint-config-airbnb-base":"^13.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.0","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.16.6","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"5ba1a6662cd16ebfe1198e21cab154186360d16d","_id":"minter-js-sdk@0.17.1","_nodeVersion":"10.15.1","_npmVersion":"6.10.0","dist":{"integrity":"sha512-0lbnsc7SnQum+Vi43Y1cD57kjlpGwqxYJlaiPnIitmfUsnYS13i8C1IBYD1GpL3zzIFw+5SKy5ZKkkj5x5Sq0w==","shasum":"e0d048dfaa2cd8dbfe39341965863de9460e0e4a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.17.1.tgz","fileCount":62,"unpackedSize":1341349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI1kcCRA9TVsSAnZWagAATt8P/2zQzwcfw6s+i0OSvEAW\nWumoqxXWsHMiD5jU7f8xrYq93+7eo4eQyEutSYWWStrZiQKmv3z/EnB6ckPb\nfFldpaTuGkgMo7ygXpW+4ux2vyUOXufQdfPn2EozY+SFGwyYL+zGu/iXwD/j\nxK3eCZBwkYt2yzqnq0XDyg+9ZJNSt4EL3rlXcXql3GYCrfqen2rSmxQ7ECtt\n7GLSI0Ei0PIL+K6RTSsLPwVFb9gDlfgwDR3zKbu6ipai3gUTJX+5lsfN1Z62\n6xH/Dk9fcdFX20KH3KhciF1arJP6zE5J8f6BrHu1D+/UCrxF5vzQfuRbqwht\nhKf6zAgsSC1dK8WSzvoaFW9tjNwNWArTy29H2bZpTRNOxVcTt+lwku6la0Xn\njRSIEsC7lb6IvdFbR/9EsuFPwMskiw/21AmRcF/CXyOeNUSe5s5Hr0W/IbEO\n/UgWe+M2179sYxu/dkm/FGQPbAJ/BLu00H8TSCvIT5Gt2vgGm+03Y3PRDipy\nn0+bTKgt34Lyj2K79ceKVQwj3i+iOMrk4deea4UXdBFO1zJSsKdLn7Fc9840\nvNPqc5UXP+MHGvDPsfSrFvjd2/p4kgTZ9iCUn0LqXwU5rTUFakc6tztizi2e\n+4YX5LFCdt8a1vAejDhEq1MlFIJSHrLr8iuZvQhnJj/i4QZLIaQnSv7N+LGx\nplXD\r\n=wIrV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjRt+kvufM2yi8wlAL2VYz4RSHbYzoKlJIzDI+gmk4xQIhANWbX0qfzwZq91nu8/KKNmNaDnIgBt7COCOLcFxIYm1x"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.17.1_1562597659001_0.691728411970528"},"_hasShrinkwrap":false},"0.18.0":{"name":"minter-js-sdk","version":"0.18.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-crmjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.0.0","minterjs-util":"0.10.1","minterjs-wallet":"^4.0.0","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.8.0","coveralls":"^3.0.5","eslint":"^6.1.0","eslint-config-airbnb-base":"^13.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.17.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"6982ca46dcb6fda31585ccd044275dda7be82220","_id":"minter-js-sdk@0.18.0","_nodeVersion":"10.15.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-4eKR1yD4TN8mrwRhPVqT2Zz9JklhlGufTfS1/ocmzXaJv/1f5JHcKF7B112H46TdtxUCb7ePsAjmLV+ARNhG5w==","shasum":"cbe2c5de8d137dececb0281070a04f4e7daf2da3","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.18.0.tgz","fileCount":62,"unpackedSize":3647200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQZP4CRA9TVsSAnZWagAAQmAP/jHgc8yTGpPu9KqDY0Zi\nP4MEm2Qbdj6boZVrdKRNRxfaHyneyKt4Bf7QYsjUWNKcsKEDjXv+1nMQGNmk\nncuOhKKCvj+LArpd2CDFaB9x4VlK5sAAO2cjl3/0mJqVyaztGRAG95NBN9Bh\nCHRDSAU6ChrRQnQV/i42lQpOwaBGwyxVJTQWwb0gY2e0vH+RtnCv5NhwDd4n\nfvY6Tv3FT8MfDB/2MjlRUcSBK9M6E7jPiR9+O7szxtoK9EBVfQg+x5oqaMF3\nsEDGzMCas2BW+dtogY4z4auoqbunQZClMvi9er22mG+xIjZpb0Ryku8xfRsu\nHuCb1U7Ejot3tLg6xU2UG3A7veukW4mmM8yMWl8xHssK48MB6bcXSGahcHvJ\nvvKnzdDlqG1CVadeIUqTuKffRBMfLMDWvhvUtphyW7M/JMZ7eYGVlYWMfhDy\n1Bpfyvd47FwLKr0cOSdLItEORfDwYeAK+Wn+rrBQD4a9XhpA9Harkws+LSjr\nCsFjhZa06hyGcLzKI/O37dotzyjGrXSlgfnKhJ2TTzOixxBOUDNFk1F2w4Aq\nDbEbCYE1KX2lMKNvV6wWqMggkzsSHayUSa0v7T2JgYv+RdTUrrN2W6ino0Dh\n3uyO6MZqhk4CkW94KzCKaj4XujQFMD5QIDQ9rNfff42i1uchySe8H2/qCwau\nCigY\r\n=kVFn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBw7KScPTKv1PI0j+DDoo3DLMS7SD1s3Ni7IOl8rMrHqAiEA+qLcHS4hcKZT1r1MrFa0SXM/AzuunueKZSGvwjLAjOc="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.18.0_1564578807267_0.49125736864799285"},"_hasShrinkwrap":false},"0.18.1":{"name":"minter-js-sdk","version":"0.18.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-crmjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.0.0","minterjs-util":"0.10.1","minterjs-wallet":"^4.0.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.8.0","coveralls":"^3.0.5","eslint":"^6.1.0","eslint-config-airbnb-base":"^13.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.17.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"40a78040a11c604799afc6a6ea89d69f8e150204","_id":"minter-js-sdk@0.18.1","_nodeVersion":"10.15.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-901bE0um/ilJjvnkGHMmegCf23TVn/C1ZRSk5vgJqDPaNUbqLhGCQR4BaxYdN24Z+1PvVW2eWobb6aoB0fn2/A==","shasum":"9bbbbac927f807876c6f66ece05d5b50b3facaac","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.18.1.tgz","fileCount":62,"unpackedSize":3507831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQbS5CRA9TVsSAnZWagAA1tgQAIBjrzQPsMIWu3qmjWzO\n8yDADQ8xxWCBXdZO/lMRfMYmRufePH5IbHMctrfLtomk/OV3bEXPYAbIGSXY\nXRK0DWHMXJyuGICOuRzv/IwNnOnQHiYHQDm2i5nmQAPRnI5RjKz+y9HL53Vn\noETekA0Ppql7Fpr6KXKzYX3BR48i167TQ7I+7sqs0gCVgmZ7v+uFyHNP5PZL\nJKL4KHn0gWJJ8pO9R2N4FavbZFENSa6EFxIm/V0nrQrc6kD7jcfnbt3gz9/S\ns6FYdwTBwITN5zBMHBvKM2FwA1uKnJBV86ButkqobF1FATf5Vff+F/trLMqk\n3w4UWjoGohCpQT8pT/RWIeUF62nH7raFB2ObRWWigl43UQ94nE6bjvs15aPE\nZvtlbTLwRUQ5nyY8pn7cCHVx2B58vsvCye+b37slIzruQar9eyKn6ga37LxK\nTR4mi40vO35O48gp/3acsTBdCmZN0wAaIip+2cRxZ1NGqSkJVVGGUS3qke6R\nRORohcLq6zfwrOztb3nOgmkDD9ZP4lsloTBifWjWsKnLi53353hwStS7csvH\nT7qsNs48XDWOAIoRYNaGVM6G2tX5TN/O3DH+egL/I/Y6inRY+k4qoL0WiKyc\neJXV4MF+HSHYkmdHp7s8AKYk0H2ekjMHDVJSzrYwllMuEgOrl37b5vTIm88B\nOUTr\r\n=9eBA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6n0h3zcD5yHv+WNtg0tTEGFw3aLR1a79t9hhwgsgHngIhAKJuVg9npPzTcpwmkwt19Tv4n9b3xM5fsUD5sOLdGf92"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.18.1_1564587191988_0.454436284999038"},"_hasShrinkwrap":false},"0.19.0":{"name":"minter-js-sdk","version":"0.19.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.10.1","minterjs-wallet":"^4.0.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.8.0","coveralls":"^3.0.5","eslint":"^6.1.0","eslint-config-airbnb-base":"^13.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.17.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.1","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"942fe5dedbbf199b61897bc959bde857cd2fbd2d","_id":"minter-js-sdk@0.19.0","_nodeVersion":"10.15.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hzWy2i9i1XkgBdAhJ3JnUD2ctRO7d/21CbIkbY+MicjlpZxKl4v72xCN9bqJL/zh3WpcnawI0JnNs+C1Mcw+2A==","shasum":"4f635bb1f4d1b4ba7cc77e8bb927429adb168514","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.19.0.tgz","fileCount":64,"unpackedSize":3380814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQybCCRA9TVsSAnZWagAAwPwP/1sXUcBxzgY3HIffN6Lm\nUUCOHZV6DNKju8INA26rcAn5v5T8Wdz03K5PMI9fbsFnTI8PTKjEQsC269Vl\nQqS9Qq5pKdXTDWrYzdMNEx3ZG531Wt5DIvVyCY5fXQcMB4TfPEKvB59O4kWS\n+nboRw38ZCIDos1Zwmj1WbgLXZ87KJAbAevGDmH1hMX9TAIP7dcgcFpvw7ps\nICI7+TWlc86PvT7PMQeYHJF1+T3jVFUQRzDYAjTq9BLW7p2VtFnhqwuMgu5N\nRTfwBP82BtLp7o/+mUm8I+FjBUg/Gjk6iAcfCFjlacxvJYtpNWxvU2f7j3Du\n2xA7gGY73+VwZlzRNTqzUEZvgE76RR+jkULEYl+vv7Z8mu7iShDKejJ6hhEo\nL7b42ytFf5ybXrYS0+TNDDAJrsjxspHvdFHevs+FdVbyLlrzNzovGgdHRAjR\nNtr8XXYZDXoadNtlChr8pZecIM4rQBqfoZBmamajxjCYfbdKHBkDXMcq+Gb1\nce7TVn5lXY/CPfNiWr9Xn82EpzsL9VKcjT5qCndRvcbxmcRz/u0Wy8OZWVEW\n5j/Io38Iy3abYAMpA/LLiDg0ZhJz17DojYDfC0uOAwQzd0WZTUqHIx64Pp7R\njxHu0mCxlLKZ4c3U8X/KglUV19hH+0y9h41ZpDOZR08EoIg11uc3aUlE6Wf8\n/S+F\r\n=4OmC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCF6EswgWnaizm7aMY0BtXqI9HvyJ13up1I/RxxDJPiqAIgF1lNGFyNKhnjCc/sHdZJGJqH2Nq01SA6RNxiBdNgg6Y="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.19.0_1564681921821_0.8737993137451678"},"_hasShrinkwrap":false},"0.19.1":{"name":"minter-js-sdk","version":"0.19.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.11.0","minterjs-wallet":"^4.0.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.8.0","coveralls":"^3.0.6","eslint":"^6.1.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.8.0","pre-commit":"^1.2.2","rollup":"^1.19.4","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"dddc89c6af9b36c0189a544e1a09c8bf8e9bc320","_id":"minter-js-sdk@0.19.1","_nodeVersion":"10.15.1","_npmVersion":"6.10.3","dist":{"integrity":"sha512-bhPbtlZFqXRlcyVRKvNIr9WzzxyP6yVm8JDG92pv0ILPG+CF29WeSvnumOy2QN2oQtOglQJ6twEFKUAHl8AUpQ==","shasum":"26bd1779d1f2693d534e7317b7cb40eebd301c0c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.19.1.tgz","fileCount":64,"unpackedSize":3241321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVT8yCRA9TVsSAnZWagAAUKQQAJ9u0LJL2AjdqXe3GUNj\nRE9ny6sazF0v2YCKE+ljDgvsGRM38dhd70R/ImFT/WT40mLXOysTxEwZIDI3\nLUm8opupOS/4ZjhXuYpZdlpmIOujNsye0O3geyPcPDFu+ScNDVbfb7Qg2otk\nllEcSERwk/r8S/ehqQ+32xAp3rLNPmeH/iLu/pOSiVBGD9rvCm1zmriBQ4Oc\nJBfQW7nTBkysk/xXBoFwef1T1sEoTgpjqSHSBi63IIJc+ixzbU5/Rgb28J3Q\nezaeOvgMIBF2SRHM6MX1GFWzkpSgznt3Dvt1XOCh9IszmhfEacE77GXX9RYG\nJUyFJBd9VMGWb5ZlTFjbRR9lkyqfJ8nglNwr1V4IzgthCqUrFdmsHaUW8jTn\nrJESJqGtNJQtcZql7ttCkDovdR6649a2nLjzxvHbBDtgJxCLZc2w+eZhqvdh\nJ21pZezLI5vRMZVKCPgswX1pC8fr0rxQ215H3P3PrBwckv15TTqo4Ec13exE\nN7mnNYh+UpL4wmWhlbdYAUUgyvdT8jqex7q+kFAoD5z4wfHR98P47/SO05Ci\nxaL48t8Sr+JDZWlViOdBT5BDsDnC1SM313o8mBNtz3T9OkdV/kyZHcJTRExj\nZNHpqjKHIn4fprKMvTYrYmimMEzi7ZDJYcJfuCFuvLFyAUAXZ6BxpjaGuJSu\nL6NX\r\n=tmK4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO1CayTdGEluSKfxfjL7yaY+N/FX9S7E9t0a0+QcFlNQIgSIsu3wVPCMPrnSxNIXjA91jZTBoPiNClLEV0BcIDdnY="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.19.1_1565867825776_0.7781606469025073"},"_hasShrinkwrap":false},"0.20.0":{"name":"minter-js-sdk","version":"0.20.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.0","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.12.0","minterjs-wallet":"^4.0.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.9.0","coveralls":"^3.0.6","eslint":"^6.2.1","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.19.4","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"f0207953b88c15819c4900657eb91a9d50f192d3","_id":"minter-js-sdk@0.20.0","_nodeVersion":"10.15.1","_npmVersion":"6.10.3","dist":{"integrity":"sha512-JG2d5ipvpTfIQzbIrApWE9v+nBacFC/JID6heyBN6PVgARoBA1+/cHeibzZx76IuEo1ETCdICxcWaGw9Jbhanw==","shasum":"cf8556d16bf683985136adc43c0715b10edf2777","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.20.0.tgz","fileCount":64,"unpackedSize":3243806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXS2ZCRA9TVsSAnZWagAAoXgP/RDyAgjiMlRhTtoPwn8h\nboLXN75yRpIaqrLBUlk86kjwad674WaWOEWNzbMbT4xOfbBxsD8d1Jer/V0p\nLNwFPBgz0RjLmwEZTeW6RsMPAcegEwA+2EnJkD//PYmQFvOMAnBPFUKYQmSr\nOlCzv+u26imcb0msSWYwoeGYiPOKmPiJGWMFKNfzxb6Am7ZPo5UL98tYQiwQ\n43jAjuHztgEAVoz4Wht7GQPStHxguv+K6YjoyN5VVPB7PxH2Ft8AeOk8S8gx\nMJfSqKUC7UKNFlIQoNIAHFfLKZ1s0/fRK2SviCO4x41dNkUgmreRekcpRtAv\nIY7R0OuLcsIiGm2/t0j2et2uhnLUNWBaZ0FbUOK9JQpO/MMbaqqiOWxmYl+O\ncurdAkjZrMSAtmm0YIc63WfPsj21AdY71ToOLz2r2ZiKVnzR+2fawTG6vaWc\nip5PUiC+C6MekIgLJLnJeSnOupi1fvJmGZYYMYST0hvpHWS4VLbvh6SakVWr\nrajeK9iKRIpdfIOkU1uYCLQFX8oKkgf+hJX8k8Y1V1k9bCglJEi5v2rRY+QL\n5vcOwFIdogfJJHlxYab2avdkqpnT9URSUx4Ksu14FOPSnyWYjxx+Fuo27UOg\nJP42Y2H2oLCXymAP5VRDQT5ko4WbnjM6n0fjC56O7yNsxvFSKhy9n7LlDxiH\nTxSM\r\n=vk+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8ga3bMBt4x1x7P2lQE5oVmElCAiDszvuyg9fh5whfNwIhALvC9735wJNjTNhEMHUu1f9ws/mozOuN0u+W6somfkvY"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.20.0_1566387608471_0.02623939790141261"},"_hasShrinkwrap":false},"0.20.1":{"name":"minter-js-sdk","version":"0.20.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.1","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.12.0","minterjs-wallet":"^4.0.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","babel-jest":"^24.9.0","coveralls":"^3.0.6","eslint":"^6.3.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.20.3","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.1"},"gitHead":"bfd54aacd177ca9565f58621f3caa1d96a77ff1f","_id":"minter-js-sdk@0.20.1","_nodeVersion":"10.15.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-rKvsx40objnMNg/UOIyAwtwRn9LTxGMf0RnXSS/xECMruC2XSlw6JgaajWWUfj9/M6BfAVP182dNlFk2JqmCEA==","shasum":"915770b90ab46cfd2b1e70768419459d6067167a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.20.1.tgz","fileCount":64,"unpackedSize":3106691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcl7kCRA9TVsSAnZWagAADTcP/jDKgIi7okO0IpQzIpna\ndeCgHhC3hZilySNacyysk+pujW/ySSQ0DqJ9lFDrYlhkerdO/CXP/nyZpQLf\nunBYgKAuH0vBstef0ubbBMsKN1VHeLwnQyjuK1q8Haq/C45uLW02Y7rL0RdR\no3YDMCy00DilCzqYZlpuhx5vrP16ONxIL52taUVEgLuTM4SmQS2t6OPoqluG\nD5Dk2glG0NWmJwhjrdE7O0SeYys93IejqEEFiBYfm7gIE2DgJBm4zmS0MDYA\nX+Wvf1iyrLi3D/1dR2rOpQPfeHxawWr1M9xVJ6XA/0XJbVplf/OvXdqYSSyF\nZL62YHBSIbU4sz8rSyEFYjiiMrkmqUw4pstZv4EoFUPqrzbhmF5e2LXQdLHN\nsTWsyzOp0GMZU8iHFjpdnnO7QJM0kqOGxh5WSWL3Az+kOl+9EtHYTaGFoZuc\nFs1PoLag84qxG4lqpQYxonaqrx5GpcQmP8dHLZxKgLvXr17vMuoVOMV/UNuA\nrIjE3nZQNwd7pDFkMhYYeKExoD+0egscOVPkzgqj9XMH0gWsN2LgXhU0zqMw\n4Kf/owf86WBIn9Pd37LNFEm5g8ObXuRKndBiyDdmztaeR/5vlvg2z3X/O6cr\nkVLh8othjy1u0/Q9MyfpEcbJIHLnVYkNsK+oqNNxHoa3e8PnhJyj30/a82lq\n/BpC\r\n=mjBw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFDjAGixD+kLp7Fsrxc1iWWK/UGSHncXY5P5b7QXTwSSAiEA9s5jS6ejzSUPwVB1zhiHRXkG/8ywMck4zvGRAtVxpzg="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.20.1_1567776483230_0.2591759395718969"},"_hasShrinkwrap":false},"0.20.2":{"name":"minter-js-sdk","version":"0.20.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.1","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.13.0","minterjs-wallet":"^4.0.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.6.2","@babel/core":"^7.6.2","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/runtime":"^7.6.2","babel-jest":"^24.9.0","coveralls":"^3.0.6","eslint":"^6.5.1","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.22.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"gitHead":"0ace8036e2fb5aaa563a261956c8c5940047fd20","_id":"minter-js-sdk@0.20.2","_nodeVersion":"10.15.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+eYg6Dsd/nWRLHYXfJmxyOpNOLwgUb1fVmfzIbRjNs74Ji/afJkC7XAOL78qTmu0oKAqRNA+kgPl3/feP7E5Tw==","shasum":"79ae9091e5c3c987eeafe033ad55959e189ce523","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.20.2.tgz","fileCount":64,"unpackedSize":3108586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdk793CRA9TVsSAnZWagAAJS8P/3SjsZ8aRlD2qX54ydpd\n9t8P7uaX8LgDFTkXzMStZ4bsxJCdLDg4rznVoo9hM7B2VRHnEcmbI2is0l9o\nJ+9G9/BXXFRnqfXE6C/iWEGFpi6NJQoHryU/sybkI2096R2tZna/MioUYsFN\nULOUTGm780YlzoVU0xAeep7ZV2pC+STSefOkUKjxMfOSU1jWzw8zBjom/hYC\nIIFxmzQJswJ652BetbMGZD0stgVoTaQ6A362C9FzMtFsCOBRtXXs9kZhs7lg\nEd1uW6TGt9Du6uFn0gPxEg+typaDrlZAME7R3JkRrPnkZub6XUDu97M1tn9B\nDJtPU3NlMB6e5c4LwLN2CqgxvYhxxRjKhWtw245ftgK9VsRu2qU9qtXtn5c/\n9CHi5T5Tf8mIZOnq4g0lG8pH643CKBIhlUXFtTJzo86KlwhdXiN+LcHCkbAa\nYG8NA0bwPm+9YSwW4LdZpb1JI5buUHkOtkudOPURmal8Xm0MLUssNpxEmJT1\nICILl8C3RRAQZ0GPWVasuJ0Klhi5pVyI6jW5+R77MA69tDImoKBqJ9UWb8fI\n2QFny6HbwDOkzMYVU4qd/fbzSKjkzm9/rQxGfqhk0gyCSIYNGnsFG9vkb8Lz\nkKL5UFQ99ruidEodVqdHPIY2P67zuE5VoF2uAGWJbaG65c3IKiULdGP14kvO\n0mc/\r\n=K6p9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFexhLgC3eb6W+EpJNzwKyFATtIZor5PVeOpsnP5kBA3AiEAs5gTGRO4DUzseVVEH9HiKfYGqqCCyuVO86ZI3HBkoFQ="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.20.2_1569963894596_0.8024517077805324"},"_hasShrinkwrap":false},"0.20.3":{"name":"minter-js-sdk","version":"0.20.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.1","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.13.1","minterjs-wallet":"^4.0.2","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.0","@babel/core":"^7.7.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.7.1","@babel/runtime":"^7.7.1","babel-jest":"^24.9.0","coveralls":"^3.0.7","eslint":"^6.6.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.26.3","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"gitHead":"cf5363812d08907670aaba9409dc59db977815aa","_id":"minter-js-sdk@0.20.3","_nodeVersion":"10.17.0","_npmVersion":"6.13.0","dist":{"integrity":"sha512-eqjo5p7Cxry9QbcoFx14WRzwHxLddkTne0SopKP7auudCnYBzmwBJ49aGuu4P+OH7uNQ49An00ccYUgHF25yfg==","shasum":"4def358a7e13aec2a3f7b433edb8e4e537c87579","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.20.3.tgz","fileCount":64,"unpackedSize":3109281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwvF0CRA9TVsSAnZWagAAVAoQAIxqrtJ3xJf2skil0YnQ\n+GBzYIth0cRFbaA1HRKP4EoBdeY7ztGcHEZIxUfHGrrApBy4iAzbgJ7gFOkS\nHHrYuOnEV/QZQjRb1zn6UhQh1+k9f5oe6ItNOYkYTQZicZNwU5MDvc0QTP+u\njJtp3S42nd0hnI41fjgDHUwEDMv2CfvqcsA6l9JzS1hyweYHWOadMQawIr+u\nV4LxAQnzdxK6eT/deTjzwe+QqSw+DkU4YAeiu30X1XJAyneduO4dbOxxPlpL\ng9d8WInLrfd4o6AP1vKEF/mGggzOs4ZRNNrj7nOee+Nq580DQ2ELHfGHzyne\n9Pur5jwaya2ugmynGTIzF3P8SXt0umGpms1NjSlY+KNVv0Y0B9B93H7EaH67\nWouE+IpswTRlIS5K5mX2OfjmqiSMwZ0XCGnwslkh90ivq3lNJZrTyLjrTSQ8\nxENIorh6XOGrJjmLnINvpTnPmoHrYVI9oACsX3lCUZ80INb9r3KEHVvZ69tH\ntPkYNEPsoMELIAJvygbuogv60pP2ncNyiWgaA6l8fQ4Ub3kCFRbvwxuR54u8\n9WQMgKyQurKo7TjuVbXqMbGTabVGnqzdrlwwhFlfDSTOwBeVPtPKyyw7V7/0\nUC5OkTPZY1lVdVQeOZn9agq1bLaLBGWFxKPQtosm2XLbG3+0WHmPZwz96EH4\nSwbB\r\n=JbGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJKm2mrPMeFu9lI7JeGC43x3wuLDNl/5W1yYD4wmifbAIgJuc9E89I6Lm2FCnchjo5jzD92usjcTSSmfrCNN6e1hc="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.20.3_1573056883661_0.4578504473257605"},"_hasShrinkwrap":false},"0.21.0":{"name":"minter-js-sdk","version":"0.21.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","des.js":"github:shrpne/des.js#fix-circular-deps","elliptic":"^6.5.1","ethereumjs-util":"^6.1.0","ethjs-util":"^0.1.6","minterjs-tx":"^6.1.0","minterjs-util":"0.13.1","minterjs-wallet":"^4.0.2","parse-asn1":"github:shrpne/parse-asn1#update-asn1","safe-buffer":"^5.2.0","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.0","@babel/core":"^7.7.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.7.1","@babel/runtime":"^7.7.1","babel-jest":"^24.9.0","coveralls":"^3.0.7","eslint":"^6.6.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.26.3","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"gitHead":"cc4900f88b2fd6e06427a5b7e6a3a41cf4d76e63","_id":"minter-js-sdk@0.21.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.0","dist":{"integrity":"sha512-c9ARYQE4S8593xZPeMFhkRozEKMt46flm65N6V2QolJt+29VfI5ocaw0p5MRC+EEO8AeWmCyfJkqKf2VVlHVkg==","shasum":"e428d5435db31a3114c846a1d1dd7426aede8678","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.21.0.tgz","fileCount":66,"unpackedSize":3113727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdya3jCRA9TVsSAnZWagAAx4wQAJ3PigWusxwxUCmEk2Y+\nIyKCDN3lmDqZa8n7NUC5BfUpTTbtmaSmThCEU710jUL0vGAM9kG4bc+a132o\ndqiqxKfKcE5y/EZnAo8AGPdSoMqa9WRKLWy0HOIwzZWwhM2WuI54MR30yxA9\nZU6N5iSVDK6gO/6AIJk+1UB0ndOuZ2zWrNyKRvQUMIcGQfbZFcBcz8GMf4Ep\nyewnzWm/eZLDDjYDvkMwumiQfuN/zptT1pttbg/6sfv722nT7OIPxG59WNfU\n5FFT/Iuj9YTM9a8ZMmQVsJm1d3Pf40bNYr6UJCxnS/9Ex5JC9XI5EvWZs1Cd\nfEuUS62XyPnMtKZrfAr+fTkzbLsmOQcZG81f/CDTs1b5Yqh1TckOjmR8Xd/s\n8VIHd8h92ackoKa1vy11rOIX57aItTq5H9QJwU3+4lyxaLXj1PWjX+iQbxE5\na7MaGM7stQotqH6cMCGbdmocDA/9igTV9nEBhmoEZ0PYWbDn19aIMB4fJ5y0\nqlCY62AOKj3WCzb3fRlRucCMBAbl/RNa785vWB8xXWykaH0K8QqiMs6hdwGW\nGxi3q3gmNPuSw5eb+EtiOJ3+YHvGFor9dWb2pWTz2h8UDuQMgsDgZwlmV+CC\n34SAjXZ5y8pGV7D+uE21UCy+waqqY7NDZKYTpIbCYR8AA1TtDKhRvfo/CBG4\nsO5m\r\n=qO5r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdmooMUHiGJutuwFOpg95uph4RHjSj3n1k+Kj9JS/vxAiBjqseB6JGuGJSkld9T36kap/sp/BU8tOnsr8qpr8O7mA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.21.0_1573498339144_0.2380623149887513"},"_hasShrinkwrap":false},"0.22.0":{"name":"minter-js-sdk","version":"0.22.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.1","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.0.1","minterjs-util":"^0.14.1","minterjs-wallet":"^4.0.4","parse-asn1":"github:shrpne/parse-asn1#update-asn1","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.0","@babel/core":"^7.7.2","@babel/plugin-proposal-optional-chaining":"^7.6.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.7.1","@babel/runtime":"^7.7.2","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.7","eslint":"^6.6.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.27.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"gitHead":"b53b179c1709b4d68afc4b18c0d9be609d930aa0","_id":"minter-js-sdk@0.22.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.0","dist":{"integrity":"sha512-vI0KW9c5LIn3qsL2WKafc8gH50q1aivM5Q/L2R7GYS4XGZi7yPQvbAn2xo+W8YJF/f8beE1RnqVEiEZ09I71EA==","shasum":"d74c3fad60b580afcb377263f422f50c624251be","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.22.0.tgz","fileCount":66,"unpackedSize":2840967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzCvGCRA9TVsSAnZWagAAkb0P/j0q6yeuFMXRive5laS0\nCYNU2zNLZMEe+sTN0vf6Z/q2PDpFodIcoI/rTp2jsgbmWhY27FhGNv4KM64o\nmOUNKCy9r6rdxNmTw0M4MeAlIa+2s3ugLulUHaBTP7FZfmfEArjMYxubsM4R\n7DBrMLQ3u+f5ZFkTFVRl8pcIwLXijWoJdQeWpaLHn+YgmQawAI6gC4wliOZM\nu8lVDAykG0QntqHMUP5Yn8XX9bQsZveJ+Qj4Z8bPUZnbMcaeSUdEp1Uwf6yW\nKI6cQxGVpkbgLZVQfq9l1j7YpY3Xj85ta2uzR+d2BFIF9vtXL5rittP491rJ\nel8A+fuM/yOzxv6r5zidJdzZTmdTFZAp4SGM9Q0qGSZF2VpeXzbVrRhfTBDA\nTmgYxBzT/7BosZFDq+Uk22KGNT0g+vM5ziEKAFAAb2wgdFjhyKAo3z+i7+px\na9QU+g5PHvqCGVKasJcyU939V8vOkAQf0yoL0qKzMVG+QlAkwOreEDwwlLzh\njkjIKt1AY7/qRv1jCso+hqdy2dk2LsABeyiJ735pkfw3vVafowVupol8Oo0L\nEeF4k12bov2xmoZCzzAuQpmPDNDWwwjZOiy8fJw0/K+zE/HUjOrTRMDOImsX\n63C6pR0CjXT9aoScaZQKUzannWdsrgofYMl14KUuW3/sC1gSUgUOZuB07NA/\ndLV1\r\n=DBdR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGko4YkZV4VtfMtw7/Ty+GwDwwWzkCR8PaMHvAq8SASzAiEAkL+ZIbM0BhjTgA76XmQPqdaYmtVP24zqGSby1XFQ+WM="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.22.0_1573661638301_0.5743680163161002"},"_hasShrinkwrap":false},"0.0.0-texas.0":{"name":"minter-js-sdk","version":"0.0.0-texas.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"echo tests disabled","jest-disabled":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^5.0.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.0","minterjs-util":"^0.14.1","minterjs-wallet":"^4.0.4","parse-asn1":"github:shrpne/parse-asn1#update-asn1","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.4","@babel/core":"^7.7.4","@babel/plugin-proposal-optional-chaining":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.4","@babel/preset-env":"^7.7.4","@babel/runtime":"^7.7.4","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.8","eslint":"^6.7.1","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.27.5","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\n\n## Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n## Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n### Initialization\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimateCoinSell)\n- [estimateCoinBuy](#estimateCoinBuy)\n- [estimateTxCommission](#estimateTxCommission)\n- [issueCheck](#issueCheck)\n- [decodeCheck](#decodeCheck)\n\n\n#### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .issueCheck()\n\n[Minter Checks](https://minter-go-node.readthedocs.io/en/dev/checks.html) are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `passPhrase` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    passPhrase: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n#### .decodeCheck()\n\nDecode raw check\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n### Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n#### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n#### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinName: 'My Coin',\n    coinSymbol: 'MYCOIN',\n    initialAmount: 5000,\n    crr: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n#### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n#### Create Multisig\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n\n```\n\n\n## License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"d1aa0470d33cdc31931a5c0d67cddcfb63c12f3c","_id":"minter-js-sdk@0.0.0-texas.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-AkNTTx4I7kmp9gIIvhdGLldaSOS5Mgg3+c315wo3s6gfDNxjNx9J7hvnj2WdkDi4TP/BCN5LnCviTAxITxaizg==","shasum":"94059cbc92d3a08331b51fbe9a48904db377e6fe","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.0.0-texas.0.tgz","fileCount":66,"unpackedSize":3831154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3VyaCRA9TVsSAnZWagAAi3oP/jVYXwKxPiO4fEFuMRsh\nLqPPD/k3JkzNdfvnlswTtp+CABSvdUuaRuKBk6vm0zjxRCvjH18eZvlJKOTP\ntU12K7FWLrh30L4jwKgaS7xOlcyRSJAoW9qQHUN31RtYW4k/q5rQOX3BQMqb\n51f9wjCLaMnEaGJSFdo/SbESQV6Bp5PvhfobXQ/xVg6rTR6zyWjwDfYIrT2K\nj18SaHUQ3eCNlj/0WX2cFa/Su2rFV6PK/3fHMJ7Sb/J3tA3U+PNTCSx7/fVf\nkmoy7tOhhU8cYxblBbcWyqaS7TyOsBbNhCOQSzvAYG8YievJuXTPgfACPgY1\nJnzLLIQzdY7VQ4dFJgHhy6dwc9gm5HfSefzfdtmYTD68JfFWYZAH966UrG/o\nC67LyuLPMdqFwMRgy3tIrvHE7U9cFX8O4mw4HfKFb/EXO4l9LdhPlx1kXdMp\nEQPwTifpDfvMBapTRCvf5QlmWcXhoqdxPhGxtvIYaHETVv00R5pFX6OWJ8NL\n0DiqptQcNRHKiBOr1X67j+MUwQ+l4V9PTDywhv2bVokCgRv1Ack9f2Sth1fu\n0x0Hkw5V28TZrl2nzS4g3z4pOVluPCsgxlIEuecZea0JW3WDVjOZzgG8yhuf\n+TH5vBZw1jGWAw+8Ke0kMnMNVnsbfFFhIrygQHkPDOJ7/xLDzl79iknSyWTs\nrOVQ\r\n=IUJY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4k7oaQAmRD/V+HF83gb6jmG+I3QawRtWiUyuQ2ZJeOAiBeEYW+HniFVSRheI9m5cPc6M0ZC0hWLwsAnJVKpSKkBQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.0.0-texas.0_1574788249875_0.6978653850996739"},"_hasShrinkwrap":false},"0.23.0-texas.1":{"name":"minter-js-sdk","version":"0.23.0-texas.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^5.0.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.2","minterjs-util":"^0.14.1","minterjs-wallet":"^4.0.4","parse-asn1":"github:shrpne/parse-asn1#update-asn1","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.4","@babel/core":"^7.7.4","@babel/plugin-proposal-optional-chaining":"^7.7.4","@babel/plugin-transform-runtime":"^7.7.4","@babel/preset-env":"^7.7.4","@babel/runtime":"^7.7.4","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.7.2","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.18.2","jest":"^24.9.0","pre-commit":"^1.2.2","rollup":"^1.27.8","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\n\n## Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n## Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n### Initialization\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimateCoinSell)\n- [estimateCoinBuy](#estimateCoinBuy)\n- [estimateTxCommission](#estimateTxCommission)\n- [issueCheck](#issueCheck)\n- [decodeCheck](#decodeCheck)\n\n\n#### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n#### .issueCheck()\n\n[Minter Checks](https://minter-go-node.readthedocs.io/en/dev/checks.html) are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `passPhrase` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    passPhrase: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n#### .decodeCheck()\n\nDecode raw check\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n### Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n#### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n#### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinName: 'My Coin',\n    coinSymbol: 'MYCOIN',\n    initialAmount: 5000,\n    crr: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n#### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n#### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n#### Create Multisig\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n\n```\n\n\n## License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"28e10902c077607ec0f8bbde2d9a5e2a99a2d5f4","_id":"minter-js-sdk@0.23.0-texas.1","_nodeVersion":"10.17.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-izqSq6t2GWUCvrzN/RQ7/NKwOBtkK06+5s69CDQWwgaFZANkwy5zvmu79GbOetfuSZfX35WmVwQ5jdQTyUZIwA==","shasum":"040d6909b8c99b4571126a7e3a7e47439b9a310c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.23.0-texas.1.tgz","fileCount":66,"unpackedSize":3828903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5VfOCRA9TVsSAnZWagAAgS4P/jdJIVLAFnJuwevMlSDx\n3fOacquXcRPIPAUGcqI2j/GWgVASLoenkA4jlNOSQsYYMx/tRfSMCE7lcps1\nVU57EBvP9Vsfp9aWVHoUdAo7WN9filbhMt5lGgaBem41xMEKMVB/7lNMH4NW\nBO/DQ6Uh01jHaKEyZFPY4u4cO5nrmwzpwhrVG8rzCxqNKK2tVNlbl5Y0dBPI\nI/aivPQlBI/pFuNbiMIsNPHLi8loV7LvqSpik83xxt+UbrezoiaZvbyslwec\nYP2iacvxkRuixwEISKiun2A80ArM9AbDHNJ/5OgjAWG4CgexLB6UWC+z0Dzs\nkUYuiDjgZvsyXbiLb4MuZO6CJS37orP3p7GJuvR6I/ZzRwib+bG3yEUav7QW\nWkXB9sOnTUP0nMIbPQl75C3ipr0lNcFvCCdka9GyCvMQH+jje9P7LvpxyPOj\nMyLf5DK30Fu9n8cBHTgdroX/dIQBKjneH3pOSgyAOItkbaSAUcZC9k/AK9B/\nIYWZL6srA1F2kJ9HtgYnfy9+33oJhuPudPkdxIb8AS22LKSubBM7DB8Hr3du\nQ29BbSxcdecI0mYqk5WK6ksaFtAhcPudhwL7S/DjoWKjM924SqfStWLwakPG\n0BeIcEBGbWlEGklAg9etgw3OIZyTqD+3hA5l1CXyH+o83GBoZ2ryyDqkx8Mf\nHyWG\r\n=sB6i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB94T8mqt5MaU8OA0S2AZZbsAEEcf1DvLl8yWPmZfLQRAiB7SIWC1MbD6C0oO9kTGa8tzDlDHfBzTK4SK0rqUtK+6w=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.23.0-texas.1_1575311310446_0.670157110707478"},"_hasShrinkwrap":false},"0.23.0":{"name":"minter-js-sdk","version":"0.23.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.1.0","minterjs-util":"^0.14.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/runtime":"^7.7.6","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.7.2","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.9","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"gitHead":"e5a892f0c81a6a23c6fd95628add135d24694e80","_id":"minter-js-sdk@0.23.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-+jJMn9buZbH4L/Z2+Eo9cu+/8uSUVJLYs4MQSXNuydL4Tlr0ujU9u0EamaA3Ff4Dh2FCu/6UTdVRD0UlhKso9g==","shasum":"2772ceaddeddd0d16f961c6316eb6e9b292c7af4","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.23.0.tgz","fileCount":68,"unpackedSize":1295025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7+GqCRA9TVsSAnZWagAA6OMP+wYhoMljmOXl3PY9Uhrr\nFufgYWgJz2Y7t33cLBQqMfApRO4eTyAtusPuAzW5USOcbF9+GrmPWxYwKFOL\nmpCzylhLBGtFOBjwtMPHwD5f6oUtAhX33tAjqXY2lOBbC55gnGkSzMBgI69P\nwqCgoyU0O951BckiZFk3aItjuA67ZU3MG2bV3krQUHaPPJW6WzD7bV58DZ6S\nwqIZhh9jfK5seK31QI7eGXdv93ah2h04QaJrvCf6XOx2+LSgNhmyG4fH0P7w\nAqMBG9AhtRsb8/uerEHkLQudkyycCp5GQX8PQav1eho33lRc/zcdpqu3ruF0\nfZNdENWyn1lCv3U7xKHnyBTKngFlECKzYGdGN3BshovGmVxwxMIrqX0CNsCR\nN7tFenkI7F2bU3YTU1PLxj1F0aMHrgvJ0sQQpo8ozSpTGdt1yz8Q689Vz6CE\nKFuqoIHXGGFrKtBpTB+XIhDon3rHdVOe5+UIOdHKx1CqmjXCXqKrfZwlT3ZC\nrAmqVB0PXN2Qpfv9AHPGwFIkQgLjPHmtSCjwHm7y6pkAlzYX8yQ75sRM8NM1\n7aEeCSGW1ljqW7Nd7tjlIltnNK7lKeLTH5ceAvbfD+KcH/UBDn3mIeCXBRdw\nfv1ZHXpfwaAJCrK9oHkNZOcHmlMNx8wNhvvOzkqAKO2Sf8Azbkpjjs1LFxKc\nLhzY\r\n=EzvZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEqdUvfo+qIFpw5/b8vxEapizFvsg3CaFLPzjIgh7DJ9AiEAy57fRH2bpgY81EZ0zQ5krE0f7H7P1LMQyM7GIZU1jfs="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.23.0_1576001962163_0.310586057054675"},"_hasShrinkwrap":false},"0.24.0-texas.2":{"name":"minter-js-sdk","version":"0.24.0-texas.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^5.0.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.3","minterjs-util":"^0.14.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.7.1"},"devDependencies":{"@babel/cli":"^7.7.5","@babel/core":"^7.7.5","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.6","@babel/runtime":"^7.7.6","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.7.2","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.9","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#nstall)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinName: 'My Coin',\n    coinSymbol: 'MYCOIN',\n    initialAmount: 5000,\n    crr: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `passPhrase` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    passPhrase: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\n```js\nimport {prepareLink, SendTxParams} from 'minter-js-sdk';\n\nconst txParamsData = {\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(new SendTxParams(txParamsData));\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// txType: '0x01',\n// txData: <Buffer e9 8a 4d 4e 54 00 00 00 00 00 00 00 94 76 33 98 0c 00 01 39 dd 3b d2 4a 3f 54 e0 64 74 fa 94 1e 16 88 8a c7 23 04 89 e8 00 00>,\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"16ef3085c2d4affba04c41812a746971fdba2d02","_id":"minter-js-sdk@0.24.0-texas.2","_nodeVersion":"10.17.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-tok7C4YVaGdMHiiXUmyNLbktE5gFVTjjdU31+3+Bpx2Hia9S3+Pl0sdHnD6rPBZLPv+GykufsMbbzaF7Pnn/CQ==","shasum":"99ae990e895b5bfa85fca306c2d21ebad9fae50d","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.24.0-texas.2.tgz","fileCount":68,"unpackedSize":1985302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8R5oCRA9TVsSAnZWagAAN+oP/1RSDd1pFEmtqsPE3pJr\nWvRHjkSI4JrZQnN+ZODBR6UU3Mr1SIvUu6sDGoUWNEmzKl57c7Mhczarc2/f\nE2kMyQRqA7r9G6MInY9ENkOcFZjBwa9ZR5wjVSR386AtqonKfSMU9HVFLMje\nHORF0HHYNKK+oNfsRL4eUuYH6HFlQ8mtNri5yguMSkegeOMXZzhfGQ4tpHEj\nsnpv/6xxvYQJfxrUdbHnOzXEXQmCka1AdOzalV6lV3EnsTs8lS3gbJ+Dmgph\nIgoLSeBFXwzbON9OcCDlpWZau8PVFZ6oOMN64wakwFR/X0giE3B8+1AS69NY\nqJFsh4WTMQBxMTwYMp48uj0j55iADx0FPQug9gnpFkJNMYECJcwJX13VQ0c1\nZ0dpd8QEO/Q1b/2pFA39EziQQXz/SCNh2ITiT8taltHo9NRxp5cChag8xBKd\ngc7rznxYBxVP466SsvYFpje5wR6BgV1seW7ZKAqLdT2Z8IWNruPdLY05KbOz\n2nbRFEv7TmKc7HySeBxSfZrFAg8sDKxUt9Y5hZPrUXr4Wip/uH9alQLQR9dR\nNPpgPDhzVpdC2A78FfZNweaR+lXdXEy/Tz3uUOrPzG6vybEoR1TLUQgJoeAt\nxc2G7b3R7FgyK+vNEhBLBhk6vCQ4iwMXkN50iEYqkxRL2w+0m1L7oPxHqFC9\n2JbV\r\n=zRia\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvB62CwECuO4u7bfrSMm5Ftb+lccaGXtv7RfmIs7SpgAiA8VAz+t2xq+eWNFZaY2B4Y840eDnT4GmoX8Xtx44/5VQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.24.0-texas.2_1576083048003_0.5713090399063094"},"_hasShrinkwrap":false},"0.24.0":{"name":"minter-js-sdk","version":"0.24.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.1.2","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"gitHead":"cd9a7a62a6afb7caba08f0b2dad53ad083fde348","_id":"minter-js-sdk@0.24.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.3","dist":{"integrity":"sha512-eA8WUtNwx5jk+jcNopWaYEsSL3lBIs1JAMBNGJkjGXZdNp6zCd/PuSizW3DEuj83SpnOBdQeF83ZepufX9dKvw==","shasum":"75c1e73b4fdaebced89a93e22562aeafae22d184","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.24.0.tgz","fileCount":96,"unpackedSize":1232785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeATJ7CRA9TVsSAnZWagAA6pMP+gOF4mF0i/JmhCtgGlYB\nRdPduofOntiVQtPBopB5xe0dBJH9PfmryQ0QAq4c3gL6By8/i2kNr/iE6X/M\nNwJ/kZaiQ5Ts+pMLguWAIPMsCo/IzN9vAWBrLb2H1rfQmO+NtFGkZgBd49ys\n6L/T7s1yZbRcjd23GYX+6fZGg+jJPc8ALraJCVio3mXpHVB/LLmoMrdxqziE\nRgvbWmv85yrF6DRzSKegLIWgxiKf5PGmIkx/OlEoTiu8trWLxYEwm7dtjBdZ\nKV/FyHqOKlfNT9st7LnIyeExuUdxVUoy+IMJ3SZGGgWYjrJu2lcwznr/m1jY\nUI8yR1ta3o280s04WYcQackekIMhGyQLSbpZr48Bz1BNaPXY9SsoQA1utXxT\nHpTmGnismnxiJb7SPVq8uSgJ6kJs41/WJNEsY5AbmnDdI/iaKtK34KSO1fbL\n/F3CJWKf+TRvFb+zdtS6GQN8IdSvI5c5VkAfk9sTzwBC0CG8VsWJYmrhqwNa\nnBdv9Mir92yXjG5z4fbqFwQj9JF7Tb9cFp7MmgxVKrQwlBzlmGfHx20le1oq\nkswAV0sIz9tgOEETlOt4aobi15bYM5T5UgeOBcqemUXLY0q0plhKYEwd3QI+\nwQo8Jefm0Z0aXgjeKIMnZIdiAJ2pxgYTiW+wUTgZ8H7MtHYuAthuKyMnb4UR\nE6xw\r\n=EVcA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxhlnez9oViVom/8+KnihazbLGtUrfzXb/BLL1JnWx4QIhAObpYPvLCQnBQRkKCOhlPaM3tYf6B4bRobEvvqEnkQ2F"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.24.0_1577136763366_0.7734895667099437"},"_hasShrinkwrap":false},"0.24.0-texas.3":{"name":"minter-js-sdk","version":"0.24.0-texas.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.4","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    name: 'My Coin',\n    symbol: 'MYCOIN',\n    initialAmount: 5000,\n    constantReserveRatio: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `passPhrase` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    passPhrase: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\n```js\nimport {prepareLink, SendTxParams} from 'minter-js-sdk';\n\nconst txParamsData = {\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(new SendTxParams(txParamsData));\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// txType: '0x01',\n// txData: <Buffer e9 8a 4d 4e 54 00 00 00 00 00 00 00 94 76 33 98 0c 00 01 39 dd 3b d2 4a 3f 54 e0 64 74 fa 94 1e 16 88 8a c7 23 04 89 e8 00 00>,\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"c3ad05a975d49709b9b2ea4c71dfbe2121b4a9b2","_id":"minter-js-sdk@0.24.0-texas.3","_nodeVersion":"10.17.0","_npmVersion":"6.13.3","dist":{"integrity":"sha512-kpyOwud4LQKTaS8D2b0cy6opkhjatXM6SiTWP9lJR7pWXmrgWsS8+r4sEv71Grq0Vf9385FqkI6OkBM+uaNlag==","shasum":"21774f5f17807f553ce19045d46638dad0b7a0c3","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.24.0-texas.3.tgz","fileCount":96,"unpackedSize":2058770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAie8CRA9TVsSAnZWagAAwrAP/0VJ30o3eGG9P/2RfalI\n3V1m1XMq4P3jd0svGNhPmXd1WzBGvjtz9WPbVtN6xi4z88dnz59NcsBazqfr\npRfTJl1aZoATYIL2Qqn1n790RJyfOGzDM98X/hNIitMnRS4Uv51+Ao9o/MRR\nkYCgILIVttcuIeNEgFFidjZsfvWmqY8KvKTBkz27zyaDfBY4w/SoqdcTxSNe\n/9/9rKYglwnV8MX7x8JvkPjUev1EfH/fAKTw99NrrsMYCpxJM8u9mEnCoufw\nRYBdQR80+rA0O4TtgTWWi7x1GaNqMKVUH/0GNnzuY0/sulsDzKZdidXQHkXd\nr/2kh7l6+S52jA2UzgwDPxWIJsrzwTbAgXyERZK4+ztX+0XWlWU2M/UpFmek\nb22ahUZW47EqpqPKRZ0343zE7hsmplyhCQiKKknSwdIvyzVsuk51Nqj3g/AN\n/Xfr2kxiVMjGE47lzGj+7rTTEBdwm4evXc0bumZJsNmXmXmRWPfJK+73ThhC\nZOc23dyZIdCNgP6zcfFW+oXsYaTwqP8qQObyQhMmZ/g/HuVlY6zKGSX65S7L\nj/sOSbO+4icObhidomlMoCp30Zz7CxUZjU64DvdO7EokJ2ogz+Tcy5KJFhA2\ndh08NVQ9QQkwVptfUxxRk0Ec4oxfOklz9twwJrFbpkKTAfqgd3qTPyZBzDoG\nFkvY\r\n=sN1f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFOYhzcnB359J1ChKWunKcPgcDB9ujZjWhG40s72fO2AiBSnP8B/R3AhPwpI0oZYmM4t/6T0rGPNgezAbf7V0Lx1w=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.24.0-texas.3_1577199547625_0.5402409486053714"},"_hasShrinkwrap":false},"0.24.1":{"name":"minter-js-sdk","version":"0.24.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.1.2","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"gitHead":"c6ccb763a784c92a3e6a4e28750d1a3676225bd6","_id":"minter-js-sdk@0.24.1","_nodeVersion":"10.17.0","_npmVersion":"6.13.3","dist":{"integrity":"sha512-Z+bLvKb93AfBF2+b/B9H72glnA7fVxOmWX6aXZf2Iy1fx/CkWFoGO+d58qryx/dHX0B+rUmzS7FsLixHv+3zNg==","shasum":"e75978f5f4faf829604d8727c87f2791f05c9145","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.24.1.tgz","fileCount":96,"unpackedSize":1230164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAlqcCRA9TVsSAnZWagAABwQP/RZeacmP2KkqrR3AytQE\neNKTyqYez6n6hWD8MAiCGQhk3VudX9JIiMzXUEezVu6QkynF4SBP9jTYK3uu\nwrXhq0xLDmrRRvcEn0J4/7cGYHHcLoe459mYwfjVWZMmAX3ywm/lyrURmVN3\nMHNDBNhJady6ACSrZeW/tDLZ6l64+UvCxpuGnVxBJ+vCWaMvrHpmaKE4fOpO\nbALu3KVOiQhr5bPj+xBF8rThqWb5CIrfQZam7zRAG7ED5FjpQCNF3q4xP0kR\n8ytKWfes3ghXsMB8YMcv4A2b81LKffLChkREoRJm+Xevr5mQMBs4AanEJH1h\nF2zmklc/sHSMyH2Aj5na24zlCEs0TasIpS4afNzzdDaxm4huhQ+Jg4mS7b51\nt1Q9aQChoKebbfTzgEm60/Z61aR4OxT3n7lG77eMl2xUl4mZ3DWStinlOklq\nQZECCqpXe9VFZ8bcZtAh155403dl45VNmYf06k/bhxIsngqUtwTq0Igb9p5z\nBSrPidQJ0tkZLR1w7BQeFH1qvRT2cy6BLlhuq+GRAWxuneLYd9j7UPQvIQJg\nkklMtyh5tbQsGcC4ualM2xWQS6Ia/e5g1oQ08jZch+2eJvBpYqE4Qgcp6H04\n7vvoCEhqoIkEoEq9UchMiPk9Cj9xarazdnHaTn6VSYABMDa/kYSe5TFMXMZ8\nAteI\r\n=t4Ti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE5HgupJ/gPxYA8jMWs7gVOjITy4oqp0Ua55zX7Fa307AiEAkpHnLGmRuuneHslraTsjEgGDzdk0UqB+iG89y1lp1Ms="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.24.1_1577212571575_0.7763068513481655"},"_hasShrinkwrap":false},"0.25.0-texas.4":{"name":"minter-js-sdk","version":"0.25.0-texas.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.4","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    name: 'My Coin',\n    symbol: 'MYCOIN',\n    initialAmount: 5000,\n    constantReserveRatio: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `passPhrase` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    passPhrase: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\n```js\nimport {prepareLink, SendTxParams} from 'minter-js-sdk';\n\nconst txParamsData = {\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(new SendTxParams(txParamsData));\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// txType: '0x01',\n// txData: <Buffer e9 8a 4d 4e 54 00 00 00 00 00 00 00 94 76 33 98 0c 00 01 39 dd 3b d2 4a 3f 54 e0 64 74 fa 94 1e 16 88 8a c7 23 04 89 e8 00 00>,\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"2dbca3514ec2644ba7dd8518bca9e0101c9b8574","_id":"minter-js-sdk@0.25.0-texas.4","_nodeVersion":"10.17.0","_npmVersion":"6.13.3","dist":{"integrity":"sha512-AuSMARUXwpkbMDAI4mBzWMtPRGqoBosX0Os7WLVvgqWq6IyBrhfG9xCS1rHd8LKIYxkTTCskv9hG5Hgb54joMw==","shasum":"805efcc2f824ccfbc6bdd8c9025912b61363c748","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.25.0-texas.4.tgz","fileCount":96,"unpackedSize":2056149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAlylCRA9TVsSAnZWagAA9pYP/jQApbiNCUlDUlFss7ix\n9O8nwPYRhvvSKXaXNAzMbBIKfkHLwnGXXXeKNm4sECjq2ovcx/tBwaKuECvS\nrtz8Qw2Q639oF8V7BYtbFI51RYP+qKHhcLwI/hw93E9n7yiUZBNpUK5ooiZ5\nPwk9KpjAFyq7n7hhexAh1jpLKCSwhQV81rDHqrSIrtrKgJUIrdnOKn6M3a4G\ntg4fU9UUANYYI4pRm9QWUdCyAvTQkB3/Au4bosCzRnDP4T+gN40swaDQnj64\n/DcsUrWTc9VIjVlB6QiCwtpJRH7mdSXAGM6TuFaMh3kSfqFPi+d116W4d8OH\nnH4QZuLztnXWGe0bvJJDhICm8ReFrChh4WJYuD/xOiNGaslDl1cXXySD4b6S\nJk12qcGlMFhWRqco1eqv/5pXofSTnwBg5vAlSvIb+yNSN4hQtRiChSTVED7s\nkMweaDBuSxXKzPoXDjbaSRzXQmYgo6qwdgx1xyLJWNSV8bUcOuSoRnpPzYlM\nqlHdlSWxV/rEEzg/fFx75QSGEp8h8MlCKpXh2atgJOk8ZB+Q3X/ukIzPJQzn\nP4lcmAC+9l5wwb6Z6AT+SU1phGbHTAEeZQdNHQ9wkTJXi+osHKPqmZLSGvXi\nqzaxpdcki10ugLlQvNKy+ojWz+8Z2OG4MDPUtRBTdhQMR8p6g81eCj3Ppsyr\nYFl4\r\n=HK5Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKJh8oQ4dEHf3Ew0kE6ezVVHQBUgXWwHCkrD9cGUhMnAiEA4Xgiftyu7mV/6yVp34zlShe9s4gwwbaJC3C2GEUgzIo="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.25.0-texas.4_1577213092872_0.11641094129372576"},"_hasShrinkwrap":false},"0.25.0-texas.5":{"name":"minter-js-sdk","version":"0.25.0-texas.5","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.4","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    name: 'My Coin',\n    symbol: 'MYCOIN',\n    initialAmount: 5000,\n    constantReserveRatio: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\n```js\nimport {prepareLink, SendTxParams} from 'minter-js-sdk';\n\nconst txParamsData = {\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(new SendTxParams(txParamsData));\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// txType: '0x01',\n// txData: <Buffer e9 8a 4d 4e 54 00 00 00 00 00 00 00 94 76 33 98 0c 00 01 39 dd 3b d2 4a 3f 54 e0 64 74 fa 94 1e 16 88 8a c7 23 04 89 e8 00 00>,\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"eedc8778a7263ebbc34ce2fdbcac58ac404b4c4e","_id":"minter-js-sdk@0.25.0-texas.5","_nodeVersion":"10.17.0","_npmVersion":"6.13.3","dist":{"integrity":"sha512-7wCeKlM5pCMZ3wYIm6QbFosgsd1k+FLJfp+Jg1pAXl1TaiaR043IkRH4UHX17274QuipD4mlNMB0SDoXtL+21g==","shasum":"4c2f2f916ee78d19d660081c9ad61be78378e5d7","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.25.0-texas.5.tgz","fileCount":96,"unpackedSize":2056159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeA05oCRA9TVsSAnZWagAA2UUQAIBTBVchSK3ebk4Ec8yh\nsNr6ca2KdCsJiudOE7fQkAetIhG3Xh5YOHBfDC5AokXZe3nJX9iPMKmpiTUk\nZJgi6D4CwE8ptNDitFOcptcKtn6/sLk3isnpfqV8o7+Zqi0yBUwIAHbefmiz\ntR9QyGwoRORPBcc0VcMGkmxbI+aYRJ6AlIZpVqrWZ92PG12fQXUfH6EBPrtK\n/Sh+ZG+uR3Sjg6IE7MpIT9Fpy/tSXEkZgNigVP6LCk0HD7k+00owRGAC+WYW\nAHVhQUZKT455A/XzWi1m/CQC1efj4pSDZTvA4tgMKHNcD/HPrOeJdaBEVpLZ\nAhiAvo2EuPAZGsduZoiQwiUE7nUA3Oo795maaFriEuR5lJo12vWIeKpAzfX2\nYLYEWxnKnyF/tF0vyDSbxq7tLoFEPUZQmK4L2tCHn4le4Khtjh4Z1IuAKp0h\nOVBrpEKUKDPWsbcFIzPQ2DVCCXgKDmr7rzl3EUy1RM3/YyrtoAGeAyC32zuE\nr1HYrF3sodMVkUVXjLcK0kHz4zUApnGHp3k2UfrBIwvhFG1ToWjdiQ4xLJVZ\nchcmPlwXX5BtDzi5TGcGJWdkJXAlDQTo5Q2WOuU623EeN5fFud3PgXy7O2Ul\nU6itKL4iX2s4U9r7nEhzDEw9axKB0l9OK9BwgeS8Ug8im7QBZ51D3IVBwbvG\nnCHR\r\n=e1jn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKGMB/IwRyFlxWxoVVEPoqaejCp4B6chrvSOas2gj7ZwIhAN0IQpx3XvC3Emig2zGcqYV2CTwiyakIkolAotn8Sk8y"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.25.0-texas.5_1577274984204_0.9055713496297522"},"_hasShrinkwrap":false},"0.25.0":{"name":"minter-js-sdk","version":"0.25.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.0","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"gitHead":"e2da172760ab3672a6fa2f7823ed5178f9860565","_id":"minter-js-sdk@0.25.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-9HhKiEL2yE0NhFZtLrYH3WblJg1AmFkSva5xHi+KDrKPhAP3NAeyHWZ4vxdQWIJDIWLmSYoAeK3YITA886hW1w==","shasum":"9539a9a30453db21d6c9d247171532552fe77818","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.25.0.tgz","fileCount":98,"unpackedSize":1319746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBNNeCRA9TVsSAnZWagAA7SsP/iCUd8cmAjju97GTFRz5\nzg2b0D7lTUrB4tIS9aPTzKfeKudfPgMkwcqtEB97APv2bcnPivFFjhPCCUrU\nE4UBz9bTESrRkpkHeWAGkJcwxz1IUfN7FD3VouAmnb0HxHil4URQH2+p4Nx9\nAEJLSBPRpgLrXzro9m/C4DaLov8HTsW7Oji0MKwxOCT/l84VFt+fWLOVgetr\nsLJMnELIlPjKg4OJ2YoBn9np/JGHfvbj811XQaKfXJpnrKKSWW14r3z5YtIT\nRKE2tnBwP1DCodLqGbercCk8ByHrITVZ6f7YA9F/9Yt6J//TsiM30pzYCIvQ\nMF1Uy1UGQ7wAlBU510pr+2aWA7N5NuNKhtmcD/akaZaNSIDDpuq6/TuZpcif\nR+70D7586JzAE7AYoZAn7I8rcJHpT5SCxNtv+Kz30fzyaR4JH8gqubQ4R04C\nVcxxpTpKXbIw/KO8a4K5uWA5PmKvgxdNYY5C6zkT+I01A8FAOzGmC+HVhL0C\njbT7XmRDWGY1K+ol6cLdolatFZMaweO91vADUgE/gplDqIJXwdpRWKbFuTpB\nMQd6ILhc+Gj1m2LWmsKXdlXTa4h/NLohskBGvGsIifKmPwx/39tNECSiqxcH\nDOD+5axP1ImPevqHGsXu6EZLAT6Bn6tErQ40/KFkV9euAx400OBss8pbED8u\n1PI8\r\n=orSh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0fuRDfXNeIil0ob/vOBlow5KhKvM3cGpIGCujLxtkgAiEAlNzG88s666amQy29LfvS/Dlq/QdCQ3igKEUwpWDDuj4="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.25.0_1577374557513_0.9313088169941173"},"_hasShrinkwrap":false},"0.26.0-texas.6":{"name":"minter-js-sdk","version":"0.26.0-texas.6","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.0","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.5","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.7.7","@babel/core":"^7.7.7","@babel/plugin-proposal-optional-chaining":"^7.7.5","@babel/plugin-transform-runtime":"^7.7.6","@babel/preset-env":"^7.7.7","@babel/runtime":"^7.7.7","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.27.14","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.1.3"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst txParams = new SendTxParams({/* ... */});\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst txParams = new minterSDK.SendTxParams({/* ... */});\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, SendTxParams} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n});\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|Buffer} txType\n * @property {Buffer} txData\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params constructors\n\nGet params object from constructor and pass it to `postTx` method to post transaction to the blockchain\n\n### Send\n```js\nimport {SendTxParams} from \"minter-js-sdk\";\nconst txParams = new SendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {MultisendTxParams} from \"minter-js-sdk\";\nconst txParams = new MultisendTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    list: [\n        {\n            value: 10,\n            coin: 'MNT',\n            to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        },\n        {\n            value: 2,\n            coin: 'MNT',\n            to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n        }\n    ],\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nimport {SellTxParams} from \"minter-js-sdk\";\nconst txParams = new SellTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    sellAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {SellAllTxParams} from \"minter-js-sdk\";\nconst txParams = new SellAllTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {BuyTxParams} from \"minter-js-sdk\";\nconst txParams = new BuyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    coinFrom: 'MNT',\n    coinTo: 'BELTCOIN',\n    buyAmount: 10,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {CreateCoinTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateCoinTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    name: 'My Coin',\n    symbol: 'MYCOIN',\n    initialAmount: 5000,\n    constantReserveRatio: 10,\n    initialReserve: 10000,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {DeclareCandidacyTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    commission: 10,\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {EditCandidateTxParams} from \"minter-js-sdk\";\nconst txParams = new DeclareCandidacyTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {DelegateTxParams} from \"minter-js-sdk\";\nconst txParams = new DelegateTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {UnbondTxParams} from \"minter-js-sdk\";\nconst txParams = new UnbondTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    coinSymbol: 'MNT',\n    stake: 100,\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {SetCandidateOnTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOnTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {SetCandidateOffTxParams} from \"minter-js-sdk\";\nconst txParams = new SetCandidateOffTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    feeCoinSymbol: 'ASD',\n    message: 'custom message',\n});\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {RedeemCheckTxParams} from \"minter-js-sdk\";\nconst txParams = new RedeemCheckTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    check: 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee',\n    password: '123',\n    // `feeCoinSymbol` may be omitted, `gasCoin` from the check will be used. \n    // If `feeCoinSymbol` is specified, then it should be same as `gasCoin` from the check\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {CreateMultisigTxParams} from \"minter-js-sdk\";\nconst txParams = new CreateMultisigTxParams({\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n    weights: [40, 80],\n    threshold: 100,\n    feeCoinSymbol: 'MNT',\n});\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8a002843b9ac9ff8a4d4e5400000000000000888ac7230489e80000b841ed4e21035ad4d56901422c19e7fc867a63dcab709d6d0dcc0b6333cb7365d187519e1291bbc002189e7030dedfbbc4feb733da73f9409de4f01365dd3f5f4927011ca0507210c64b3aeb7c81a2db06204b935814c28482175dee756b1f05414d18e594a06173c7c8ee51ad76e9704a39ffc5c0ab11514d8b68efcbc8df1db194d9e296ee');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\n```js\nimport {prepareLink, SendTxParams} from 'minter-js-sdk';\n\nconst txParamsData = {\n    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    amount: 10,\n    coinSymbol: 'MNT',\n    feeCoinSymbol: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(new SendTxParams(txParamsData));\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// txType: '0x01',\n// txData: {\n//    address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"f506596f2b8b433c5c97d33bf6cac064448ae9da","_id":"minter-js-sdk@0.26.0-texas.6","_nodeVersion":"10.17.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-xmpDvLc44zWDcjRnR8salpuXtn9rD0+nEt0BJ0sykH9ZwWwMGBCAb5DvZzLbYDNamtpfrAC1FfFLtDGVLyOBjQ==","shasum":"913ba669d47c76560ccc8a90e5485e9a961b71cd","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.26.0-texas.6.tgz","fileCount":98,"unpackedSize":2008383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBNwbCRA9TVsSAnZWagAAxG0P+gM5Q8fpuR6uG98adZol\nOE/uE6Ja5yDgOpGDvJSUZONRzn8LNBHnr/LWAUWErNMoXf6rRabo22urEf1x\n+Xmjirk1qHZUFezqOu+PCa5kIGN3NvHowg8vQoyV9IjvVKintzzTrb3mHB4c\nhkqL0CU6tUptO7F9cSAFNLKLVCDie7F2gg8Uwq1UMQIhVSQUOF849yUS5pDe\napexh3sTMseyChtdxeenQOGsJpEF+pNgrcAbfBDYuC47XGvv0r3gCSqV7CBa\n1E3sLwLdcrY+9nWyv8CL/+XQjs0S9uD0sbIikACAVP03Gt4EpzjdfyV9Ug2c\n/Ta6ezEJVOqydk4qLqpDO8sE5+l64E05Ub/9rlXR45fQlY0AtMyeYWivv8Z9\n4sEx254qrf36wJHzCYdIlEETUDB2ITOm4IWIcIkmhFI+z+uE34QZRwKyAOfE\nwSKONhyWTUjd7692RsrlWxAf6T1CUt50Q135A0SkP8BZFt9RDSsnQAQx/OsO\nMu7aoLWwJQxjyc7QW5yHlPgENJmFNFwakpj0GCChJKZrH3dUxkVb4cy+Ramr\ntSUauUn0K6emWHTeuUB2P33uGQVUVE+fYlTZrqiEeK8EoR8B6yWwjb+zRbLc\ntsuPfwsFgCx6H2AAR5Yn44tgkdLMXh5HYxZ4WqyVvJ/1xIPUfOMFWni0/2lQ\nMzis\r\n=lbEd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdNcnzNV0V+O5URP+Wepw7CrwtHBI/+frGLiJ0R1z5ZgIgezGYKdS19Zcnc2bd/r6agq9m0RL5RuFyeuDl3GbnVEw="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.26.0-texas.6_1577376794699_0.3415456215679764"},"_hasShrinkwrap":false},"0.26.0":{"name":"minter-js-sdk","version":"0.26.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.1","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/runtime":"^7.8.3","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.29.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"74190ea2ce1df0f626c9735b7b8992b5e892c626","_id":"minter-js-sdk@0.26.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-gY6rbu95iYF5pFgvulb1LPrfO1zWQYwakZOtJhF8+cjLdbCISJ9Ye/eazlfSkez3gk8DEQgSKb8DkslLrTRLnw==","shasum":"12e314cb86577cc54872a311e8e4a10fc3600332","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.26.0.tgz","fileCount":116,"unpackedSize":1359125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHyW0CRA9TVsSAnZWagAAgmcP/0SJ6p2SbbD9q/xT/yvW\nq+4QvqwwQB44sxMg5NRSyNPYIVkOHV7SuOyJIcmXC9fVl6wjTr1GVBnt4O8r\noLqVc0NRFBGc0VVnyzK+J1aqfhVczIzUHdI2lJQQygOwMQQERFh1sagcvTuR\ny0d0PoCkf1a6x3FDPX/KhIgS79QD6FOiKIR4Yu8T3csXuGgXsKavjxzdzXuW\nFZnrLEbnd9M3hIiHixm+9+LqbpOYzlREumfo7rgNGhWTNwYU+QrJAovZjLG7\nYORyR5thG1/mdr9EqJm1oXVGH01QJX/dJEhiMulPkSF2Wbz5Pn6UjJ9VLK3f\ndX5h/uKc6+u3s3K55QqmNiWEeOAUGfWnlPJh2MXdMwB8sIqtrh7piRvYkRK/\nijwKurxszmIIBGuAsdgsnO9B+Iw2lS7OuwskSJ+qhzrFLhw2Cz9h98Ik1MBk\nZhaWyeSxQQcwNjokeuSgWQlMCQG9tOvm1momdTpFOrcf0MqY9wzB2q1SVQ3c\n9fMAzp09kgmZFTUHea9alM+EnymanNMDg6JlCOuxDkS76zQDll0p9LoOiurL\nC3vVmzQNdFQsjFP7q97f2LK4GXMzFOOw1ewn9dIXrkFFjLkuiqUVEyT7r9Cz\nCjOT04IgTbwj6rs8G2ePbsiDYfdruQPFmOdpJdo6e54cpPq/LctqaJCTYvE8\nRy6G\r\n=JzE6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBn2mR8da0y87zf/8iS3ikBhyHdj0GsTQTTRbWbHDGxOAiEA7nLAUcqEF4tQshxonFVLOEa+PNtuGHp/0F5Jml+y75E="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.26.0_1579099571600_0.3185876481344154"},"_hasShrinkwrap":false},"0.26.1":{"name":"minter-js-sdk","version":"0.26.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.1","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/runtime":"^7.8.3","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.29.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"fd16fb7865a39ba425bced69e42ede4575789ace","_id":"minter-js-sdk@0.26.1","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-Df91FATEf32pls+A+5Ecq8SCxfu9m87rKBIlH6Lxx/OI8LoMJyR00tbqGq1rybvl+GFMdR5p41B2zfhaMrQC7g==","shasum":"89422eb8aaa8becc366e9392b1f8cea90392b13c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.26.1.tgz","fileCount":116,"unpackedSize":1360629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJZ9uCRA9TVsSAnZWagAAHdwQAJ0Y2c1NMiqfSdoIDe0I\nECUlpWaXuBO34MU221HF5zUfn5MthCszmVnrJKLaF/sNjgsWP4+FCO9zI4CW\n7hk6UKD43LRQGjQhr5sMBkmVa9P6ELQuykXcr0ksZmgLxPRaGqpoAu+zpLmM\nGtzFPJkSPz3fGj0ATUVB92ND9f2skCxSIu2cYmWQu2d1SrMfLWqW7BD1BOL0\n4PrEV8Q0EV025mRmdpAZzFeXMYKd8M38ofushAH9KFd0PxmzxDZD870ON+UQ\nFle6sANgqyBesA+JabkLPBETZ4J3kGLVy6+yOpW8CVDXH9nYq26IttZEAIb6\ntmGqFh86qEch1LzM9DXETSjqNlSYinUwsEChTQO/K0ZJaRZZfpKxlun6Sr0q\nGppFaWAAI1AEMSRsuZrLB6rla9OYSUJ0u1VUL0zBhdccIX50zKWiMB0tvXk2\nat7WkDplqVfr7h4NSkjgmouzvKY4vli02ZqkHLM0jPrTjKH9C4Vo/qZqEo5I\n5zUa0r0h5P5vXqKbHoE+ZHRnp2vhtnQNid++c1UpH4jjjhmzTJes3UWbTjQf\nHuDNuGInn8mMf861Vx/q29HvO1pFDeXMJ4dHkUfGIW6J2w2GHT9plD38cWWq\nJ1f4/4nMD2gSbQQe6CwrdO171kDJ2RX+Xea+CltwXn7W2G0xe8WoINArHksg\nD97q\r\n=4cYG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq1FJvFn4DzyORKjDs2eqH70m7J8i9ey9FcVxS4TdXKgIgEV9vqZyxREUOGHRdaI18Lxd6yI1NEUGYJzv4CPkKunQ="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.26.1_1579523949413_0.09588656236472426"},"_hasShrinkwrap":false},"0.28.0-texas.7":{"name":"minter-js-sdk","version":"0.28.0-texas.7","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.6","minterjs-util":"^0.15.0","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/runtime":"^7.8.3","babel-eslint":"^10.0.3","babel-jest":"^24.9.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^24.9.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.29.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Prepare Signed Transaction](#prepare-signed-transaction)\n  - [Minter Check](minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n```\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"09a1b19b3d64518ca79451eab7d2de046276db97","_id":"minter-js-sdk@0.28.0-texas.7","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-jnNkhAsks0JZUv3DvmTDaQK3ZDYcO2awTHbH9Dhc351XEfDSHCoi/5jLlte0HfB2r+WtLAI8s+GN6gXSNDSSIQ==","shasum":"814dd79b3474d38daee2f0a1c7568a1f197c123d","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.28.0-texas.7.tgz","fileCount":116,"unpackedSize":2063606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJeS6CRA9TVsSAnZWagAA8+8P/0RCv8CvY4xyA6yyYgqL\nzXB5PNM5dMUtv1nZ3bvHozQ7LFltvUrIdpGYS1SLsBTYeGXXq2dgmmLLIayk\nVN54Yh8Q4El6BAopbw7E2VEAfCGCYcbE+sc2a7IjeSWR/fb1I6ny08zkAXkX\ndbPqeFbBOvV/+Tg1sRzTzuVnX2MRvb/UO+va0zplwpkodjHex2VZhMhzAKsa\nM8qTHfhcGIGFVUugy2+vgOS9TVIZHHBz1w/MI4HkW1DqhVKVkRRSMvEndgIZ\ncrm7asIWju1paEue2vdxae0cAqk3j1rBtdLaO9xpiz9C/9J7QZjULpCcgQss\nbQBd1nItY/8dLpJE5t2ozE8ITCylqmDavTUgzY6pjnreWq2axoKLxCtCo9xM\neNq52JMlTso6tNqI3Vp2M7QAGK/U2gBIOdKP+xhavVzYzUFDSxRI8CR0PBKn\nLhu3wQbGrWIjGhpYWBYGEClNQ0u96Vn9Wh46EuegHtEPFOdbHi1AMoKVU9Ay\nDp7ycLmR/SgnSfA9aG5+QCW4bnHIAHnKw6+sP1zNAOKC0kRzI+HRDTKSeVLP\nwrmW34l1qj9Ug2ub0+as0XcOtX1KZFT1dlisrPo5wIWuuRDZo06Gavuq7jA1\nTPat6gCLVViZTAY+/e+TxLkE64Kx+oOh2KS56eP5c5B2oUZIpXPbhs9MgUsu\nwmv0\r\n=3whI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiGzDXSVhNd3zolBac2TvHr2uz1tYgVzzGR/BpSIaANgIgYpA7RvpYniQf4OooViTNZ3N6PRifi3LVDkYrusrxoGE="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.28.0-texas.7_1579541689784_0.4804381381429128"},"_hasShrinkwrap":false},"0.27.2":{"name":"minter-js-sdk","version":"0.27.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.2","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/runtime":"^7.8.3","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.30.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"e237f2fb9ea7e198edababc4c24fcac23a096862","_id":"minter-js-sdk@0.27.2","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-egHOpbgE+DQK3qaEGTR3BX2MmV/4KS3kSNaRpVWdbkmsVfBJd1t1muRHF+fCpSRQoTJc0vZxtrGWK6RRaMITZw==","shasum":"7c8a370c7413acddf2abd726faf0c3c448983921","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.27.2.tgz","fileCount":116,"unpackedSize":1364424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMs0lCRA9TVsSAnZWagAAgsMP+weKPOB0jxf82Pxn0rai\njqUaWpN5OoZtUxS9Xd6y2NWg2ZBrwB3qJU2QGM21YAQeLk9uW0Cv+9OGUmtW\nUf4TBEWJg94QMEKBmMN11syIRAOFNpv+L0Z5vOtcfG1LASlcPgNT+/D0d9+4\nNEB86L5og8zgQ8Pd8Kme/nep4T8807Lt+MDUxFsIHcTFtkx1+xTlhegWzTn3\nAHL2QqBoLN7wLj0A7hixGZfc4/CGLLfzurPk+k4B13ugqCU8iOZbzheby06K\nwv+UAjngWSeqkzdK818ZxsgSMoaBRXAV6x1JCu6138E4tQ0/OPzPqB9nzB9z\n0y4oHXFA6gjUjN+SN18eK5bL31G8DGcNaz096jiQnP7c1WWudWkJA7YhTVlt\nYR8bcR5FqBiwq5Khr319l/QQ9Fz7i6r6+MFxYzXCNpNWIfdjhVNa930oAqt6\nfNNdnNwMrqOuORvV/ft5UVWvZuNuj5KjGTXOplS+lukRBNX8JFph94shh3DY\na+Z2NqWr1tfHPrqHhAvTaMv5eWk1JI1m992/7tSJvxI0UgfnUbYWVuIWTEFN\n1sIynz67EbLo6JtcnzwXOwy8tr9FnjRKmKpwaGUdc8oTVpfiM1kZ2g/sod2K\n3PP7bh/y87TmtV+nON1gFy/GV8hOLwZu1/OUT65zhY54dcTx/ytWxGPzbvzl\nLuK6\r\n=w7mb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICO5OCVVZGaWm0EEEB+Zp8o95xI/TWbKk3s+uwIDq5EIAiAHrfySPd4UvA6AZ4VfmB7FOs/3ZrSidAaPaZ3DwVmheA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.27.2_1580387621264_0.06021432493202861"},"_hasShrinkwrap":false},"0.27.3":{"name":"minter-js-sdk","version":"0.27.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.2","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.3","@babel/core":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.3","@babel/runtime":"^7.8.3","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.30.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"438e65addb8dda27eb2dc39f14e5b906dc3a7392","_id":"minter-js-sdk@0.27.3","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-5pxccZf2n682ywEqyCwgYamaLIBwq+JingKQBznMaMfoVvxXo7E0+lk3D2UX0x7VRFRZL1cKTiStRvdfxaDg1A==","shasum":"31a0f126d161cc0efba2e857373c38ba658e37d8","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.27.3.tgz","fileCount":116,"unpackedSize":1364501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMyM4CRA9TVsSAnZWagAAmqIP+gI96swuRfHzPuzej4IV\nhYF8uxrtf8C+k0MfXw55OkAc+kuWttIqJnpRk5IDsIFGMkpcKfjudu4n9Qnh\ng6BbUMjwrkpICXNDmGsELx33U/wP0Ud5TXAOSKdVbue8/pAuIyvBclscU0tj\ncIQbMVtyN3kPK70HkoHsMmXlf+hZd8Xckru42AgcIm6s3NvNVh8HyqqBYxas\nfBSazoGqEaYPxGy4KKANLDUAo6HUEygMZpTmyb6WdFIozIWjSr5mvqazzfJV\nkXYljNxQ6pZEA3DsBJsQcEjUMTOuZQj9Jba9e9narKsI9e9Vkxdd6+1qhc/N\n2NvDuATnSTNPRDQMFh/62sNMMcPmO+RaMTpW4jq8w4jTFOb7vfpGjXXuBrEU\nJID8JB3vpbJ8IzD0MOIrGgKHw2eoPx6Jf0/379JtBDkovMZFhrPJKQE//igL\nuPXfVLsAL6CoVXes8DSwEDCuW3MwD+v46kc865GJEvRoVufxL9tzFxPQ80Hn\n/fGD+k4YpaSxN4BkKjicPDk1Xx6FGgLTUd8iGn2DaudYeEIZPT6YzmSewahB\nFxeBmculgu+UbhyXUaxdJrrXC7REhvugbVbLwfzV5EvIVLidWgWbJCKmf1xf\nRRXmWX2n3geWuQXOPZkzgNgRVBFza99iMDuLvqE1LYLtXWRFETqNdefNqOeK\nNsTj\r\n=Ni1i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFulmRbXsRhjTDuDA08rsxuH1351xdtudbaK/CXjNNtlAiAkD7PCUI4XgeDwCvTmPuuBe/BHbGSKR+vkzBKPOdT9eQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.27.3_1580409656283_0.10797828173146473"},"_hasShrinkwrap":false},"0.27.4":{"name":"minter-js-sdk","version":"0.27.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.2","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"34682df5d53ba4d4a614b49bae91ef0e315e79c7","_id":"minter-js-sdk@0.27.4","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-YcWsfz/TtMsTE9MgtFS36Ml2utHpw23h8+WJx37q0PbRd5JVpJY7u0u6RbgDY+Wpej4G2t2Pvd50xBkRwB/xmw==","shasum":"df55d2a4dce228dd4e301d8525e2ba2e71130a12","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.27.4.tgz","fileCount":116,"unpackedSize":1364980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNDKaCRA9TVsSAnZWagAAvKwP/27dNPSaw5e3JjeKWYgY\nf4b3yM14USbINNuT4k+GpflBgCcXJnOWi68qmwLpU5C37K/Wks+33u+qOrtv\nuIUk5YGEExueZDfV6RDVpD3r7Jf0PyNDBlarpV89/w46Keirf3msstdmf/Bj\nmT9ZhxUlfq707Nal7q3yTWtzziQw/wKWkUZwUjX/54uVCczXFxifv/jCqlzV\nE9HOvdj9WtXll3YCKVUDJGEVN9LPhhgs4jrLozlZVNBtGB/TPWU8y+P0aJ4Q\nYkwDo4xixvxsUFX5b9SCdMy93CIPGEN1J2HEzpFYBZmv5qb2K8BJAz5wKpNE\nBhVGMAhTHAq8NrmhCC1ZGRD5XhIsLPnnAGu220WIwZI9tKEk3EG8xUYa93Nx\njGK1Y3AnAzt94QMN0VvN3WJidVJ8Ak0hLCAFWCP/VEVzrmJzJ9pGfFfBmnWg\nFrYg4WbDIwKqyPlbyeTdP7yr1LiDiwnyrA3eMXhSNZR/G96xxcz76iCAV8ah\nDeKYoJuIp9SrN2gjvHlIJT14/k6MxLRfAB0gYp5pBeSFhHAYC7knJG8HhmDi\n059c9+kmUhyDJiRXeXAPX9ngHq1JzQ3sIR+SNky3n+fa8YnDK7sD0c9IDC6L\nl+UU0X1OKoF1fW086gOfOwXRvzk0FBOIiAzufURgvfBsrkrK/Vh/16lW5BQU\n0+6S\r\n=Pd+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMkcrXjUSCqpI46HRXvLJhI3r2c20MPEqJ4zCAId0wiAiAYgA5NfFjsMiHJPDpLmEhCwGOHio9SZCDlWuk42ikNHQ=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.27.4_1580479129452_0.9441176433962997"},"_hasShrinkwrap":false},"0.28.0":{"name":"minter-js-sdk","version":"0.28.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.2","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"981a8e32b1611ff5c1b65ae638c4053f08d98f4a","_id":"minter-js-sdk@0.28.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-casg/UXZxvxmuL3WLtEbrT9ZdUNOAIoMJzgz5hg5OltMjHbfv+gTlCUkJ8l0nILOX9eOpvs6qbdGqbsKvQTa2A==","shasum":"09abb2ccd6a7bef09894b41aa207103334ad6174","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.28.0.tgz","fileCount":116,"unpackedSize":1366608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOIvzCRA9TVsSAnZWagAASYgP+wUxYV32lKSbPFGevXv9\nWdpuZiuqsnqhuagcsPGQrvqM0XstVk1ltdt1mJ7M0/R3SuqM2Tzxjrdcg7Df\nBw64ZO0RzVKhjy/MYXTNJvchIbqR655IdPGioWWDnUMpqJGusYi6iPz35TA+\nDe/q3saF/EuBAiyx4DjmXpfNzeDbFQThDyHQdum1QdLuLIx8cSussAF8eSX2\n/wSYPYMtlSLsy930xpFff4y6jVEiXil8oIfYa8s5id1WZ5s9rNydrGWjesfE\nbHwEd/u/H1UPMcrwqlb4FEiEhxuV822TQyJKX3qdAFa0hHaPXqtBqPi6+HXT\ntoWWQnif8rMaYaghk1KjucqoYH64ww2SbG81Fzt7mVV4VAbaawdeu7tc6XQE\nqF731cSaXwe0upTCGiy5X/QoaG3Sngb8O2MfNNx/o7ZIFlz4kcjsJb2plh98\nycIKgGuEH+cbNSrgbJZc8mi7Kt3VpqpeIlAGIK2kx4Mk2Xz4Y9Iuj4rcNdD+\n+aXSBvyFgI0KAsi6RKm1lYeUGMJFBxwKfgQ6aaAmsEQb44t35W19m5UeoGbP\n5h31E+V6n4r6QUAu/2blLu7P99COZIcRz1NBfDNC4f8Rfo6Qv3pjncekysqv\nYgvI7rAekNBzgnQIT1M2ODpGwPLzy5qBcclfW3um7bYigNSQLAOByhB9+vyr\nTUpX\r\n=WNCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCceBTatVpFGoGZ71ExxbDMR1h9u722J4KMgHjaB7z7PwIgURZZgS5en1lQ8x/VIAphUzuS+XSeSyVblHw081CfCyI="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.28.0_1580764147119_0.3290949016753011"},"_hasShrinkwrap":false},"0.29.0":{"name":"minter-js-sdk","version":"0.29.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^7.2.2","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.0","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"e872c3cabd16e886ac418b5be51c67ef07444bbf","_id":"minter-js-sdk@0.29.0","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-XIP9bZLsNzFcLewpMMCxqDkZrQOluvZsa3wkQpTBXaLxmaoVECSNsxWreFTaDmIR6C0e9iJb/c7hwmHl9/lzfA==","shasum":"45d599aacc2b7b0421915aef412ac1ec0d48a86e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.29.0.tgz","fileCount":116,"unpackedSize":1374767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSnJkCRA9TVsSAnZWagAAQeMP/i382sNb4E9GtIcm53dE\nGx2bWI38TyHAA7twRludoNBNdzO5YnfgmXKxRXPHqvmyz43kcCEQxs2MnPr8\nRgizfvZfH34wZk1V29vToaxNI1PV7WxJYZzDnxyamdxUsynkHNc4bWLjdxm+\nO8PlIAkJ2BnrY2DdM9KkGfAp9WSy5xDKgUQWSOH2l3v2kW1wgQnSvPWeviXm\n8M6op23SeDDLneAV/dreOf3iTOPOTglTa7hGEWFRRlHiKk//JDBBQYmSSbXn\n8XMHfiUL1j5GgQw6WpZJzmdqJD67x+kAp33EQPBOsKwbILr+nTvbGUMM4RsI\nb0DVvUvqGELQ3s9yNLWCmlepUYrK++QXs2RCNGZUkFHktZWRWbf6Fn0BAdct\n/sbukzJfpTSIvUpfj/r+MeShaCws5rzjIPK1ByLoJDxx/AWvcCB7ZnJAYNDO\nypdqlXhIpz8ykNGBaI63kyR989LogUBqmOub/kEJ6jO17SKErb9lJhfasq+H\nPoH1pNOyQE2+6M+ChTE6o7dyvAXfGiQZZn34C5PPEgnGoe5xBdUPONoRDaYw\nGMtbGJXnj1T8Fb3R4Y7jHD6NvAwOMpZ0CC9vZTBcbwsx4gf/PYAbvVgGFcLH\n7ZqgYojTZnDlYknipezzWp8SDLsZdvBizJ5tToCZaBhU4/RPfx0Ec/ITZMot\npQbr\r\n=YM8E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFllg2yNdDSYFnhSnzRw/OntMCuLw5musFG16EFS/sy5AiEAqGm9jvcLSY1+17j3wan505+zPSx/aOUI/k1wYBwc2BA="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.29.0_1581937251932_0.7141760619290782"},"_hasShrinkwrap":false},"0.30.0-texas.8":{"name":"minter-js-sdk","version":"0.30.0-texas.8","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.8","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"b0c9e5ddce428f1a7d8d16d638e7abb51a4ec6a7","_id":"minter-js-sdk@0.30.0-texas.8","_nodeVersion":"10.17.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-AFnDUHkELW1SOhD1rKDG6mM/wDLrmLAvTSmDk9D8+N5gE4aPhO7/arGSiCju2bl9Vp/wDBPKnARBAXPwih4z6g==","shasum":"e7549a84a93134eebe16bc8d58119fa1715ba405","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.8.tgz","fileCount":116,"unpackedSize":2106066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWVsICRA9TVsSAnZWagAAkMIP/A4s+3w3QBHjTaYSJZfo\nEwl5d6NP2aWOIvk6UcvXEBmAwt6AiOUhwAxx8uSr2KEVITE8kWLNIxd7sK18\n7Hoz4ktXl3ALlkxHvDj0i8wvwm+rNXc7g+t2XK6Ca9gJ+AEj8IzRvOlyLc4r\nOnamhShhMlWvZdBZQLksppsVhc6I3zkhCrzl/halLkAKhmFr+ZWBafj9e+D8\nlRfpqjNPY4fOqYFRv41BYrKvDzUx0CKftO95Vh+0d4HnGPNrrNHLspqUR6HY\nKZSz/6RCMtX3hkGNjLb8Jz2NEZrEpCygq7IbwZZ0UAMrdNdakOBqjY2EUBui\nxG+zUMcF8Lxkib2PJmLlMRrYhwL7Zz3BpMiFTpmOZsMym+6PZWr5+4wQdHHN\nM0TsTKfbTyLOogqIylBZGFfcDvjjVldStLosRMasxFboV6wSxBuUJk5DROJ7\nln6yG2dy5OEEMx8g70rXabjR/P7Vu9aGRJUQDGZ+RZUSL+WcF/rAYXej+Oj8\naP4bQ7I+6V16RZSSZTTDULjuqyDBlj0Etn28oBEpoPMF5xHSCY3sKQ0tk0N1\n7civQXu9es8/j+gTttic5Hyxc7sTmPDNbl2Z+hH8d/auJYElE0SVL20DTXoc\njUP9hkHFwL73btGUAB9Bh/8aXRHFzebmgbBnQFC+drHT2jh4GkY4ZHSt7nZU\nBsvi\r\n=3juO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNI27hxnJnZ49XE2/3iBxS9kZj7FcXATIRq/mRB2KERgIhAIvuQRHgd/GSitQKRIhm+xSWuWOV3DXwhFSCS99vMe08"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.8_1582914311760_0.27433555797959364"},"_hasShrinkwrap":false},"0.30.0-texas.9":{"name":"minter-js-sdk","version":"0.30.0-texas.9","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.9","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"bc2688dad4d1aa1c56ceb1af7477e020b5f79040","_id":"minter-js-sdk@0.30.0-texas.9","_nodeVersion":"10.17.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-0IJeNpI71EWXUW/zXOhkja0dE783mREQ9uoQgWKSu9y+p0Wnsj7+/gF8ETdNH/MOj5ldTrsC5+7Y6SupivaFdw==","shasum":"37ba610640c4c4fb9dece085e86a9472e3656cad","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.9.tgz","fileCount":116,"unpackedSize":2115000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXjwKCRA9TVsSAnZWagAAqTEQAJ39f1y3p9kankfxUU7H\no6J5TEazp+iYphLC3wfoZR8zTzTFiiyyd/55X+eVbGlt3vrA2d5e2EO4XxCB\nmmBaNkyRgg9D48+g1G8g6W3Prf6MCBLwlNU7m90MPAeLEeLS9hHB7eV38E11\nGWKtlchRTCdRqeNc36vDp/GeM+33gs/1PoakYRqCOtegW+WGmwNrI61SYW0/\nIsUXoFJ38Fmtkn6GPct6znSfXX8pmjsHUD1jvJjFI/x3pVtwe5dfdCGgfMiv\nUV/qBgJgW7GRGcZTzED7BQryUp7Pm+hZXnOgD8iBcSTZg8gjhgPDhZ/OkhbA\nQYndLp+aWXVhTMBPeEAJsbrWTw9BExSvi3+7SQk8/lYc35ZavdoOStcvY69s\nDH3Y2qUJ4U9R/cLlzVQzq1HjKNH0uxJjJnMYAU8VYDKBPAVpfLXpcYvwnzLw\nyEJvscfrYlXcxeeO91ZzxizGZOvMxgmpXzgSq53lChOFCLoEtkbUGpmuA4T7\nIRm4SQRPxmeFtloUJOWiO8x+QorkJ/hoD3a0au5jacA0vHAaARuy+9wUiDeh\nkYzAR2CIhPYuRU1ydPZSV04ibuo2Lq/lP+Z2j2QDDS1+WctNJChtbTow/cEu\nslkI6qEViUgmvrvtWjgn3AgIElfYx8e1g96mZiub5PmcOD3qPWqUoS+/UYIm\nrrsp\r\n=qwjB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfx5lGqXjsoSRDnhi2CQnsMIVi/oq7hsRc1TRFl89rCQIgCOULN1QKD72a6aVkYGAywGO7IhOZpWZmFtGjaXdniJo="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.9_1583234057993_0.8574231081811987"},"_hasShrinkwrap":false},"0.30.0-texas.10":{"name":"minter-js-sdk","version":"0.30.0-texas.10","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.9","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"0b9a075bd83ad1e6a4b905c9b4c95c59a0142088","_id":"minter-js-sdk@0.30.0-texas.10","_nodeVersion":"10.17.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-pwoK/0muOJ73+oI02QuTUDtoailxXzMEy6akqny9JY2hreeIo9+iXrmYZ6fs884oM/SztrSShDja/UcY1alhtw==","shasum":"9864feb1f2bfcd3fe733e82ce5187ce4062eb136","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.10.tgz","fileCount":116,"unpackedSize":2118042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXnHFCRA9TVsSAnZWagAAJhwP/Ao831fM7pO1GxeTjj9U\nKqWDPL4zp/2Sy8efmCB5txl94d+S75fcbBuYWIDxoqCJ9kcpHZTs669KrDI2\nb4xz7onxkfyIpr2mNUSHF86l/QIgmlv9G3eHFJC9X5ZlhsaF4WRF1EHcpVQy\nsE68kPh6HwoDfqtpty1bIrmxdk3YwzskgTaADftlKy81lubgnsB2RlT/3qCh\nGHJORLe2NEFJNG0FCVMtFxJVccUm2kfSRbrP6aqFnESiCU2j3WDg6njjGr0/\n5+b4UNjgRqD/Ek0cgUV0vJCXBvx6D/cDGTZH8TE9hSxC6izje3+aJ6NBO2b5\nTLelDsR8w52NPXZk9EB1qBUjails/H82ePbIcQUOhy2JUl6D6lob/3+jK0sV\nmfyNT7Fqb5HtKuj88WNjXth7EBCSScMvKyAVGKKomSsaELtGSoAndN78jogO\n+WRAznRt2TnS2N33AkbcwJ3864LlxVOOJqdMf3lB/8F15aKMcAKSa8IUYHBk\nuAcuMWJIgPBeawqxTy4apS1L7BRSEmgGyDAkZkD4kDZZrjBmdud2E4jqnjr4\nSRkj3xwbleTqibHWqBIuUyO9rmZqzYeiQEI+K9PzHI+UPEQzeVJwAJOHIOyX\njWqJYLxV8kBAwsUF3gylYoGbMDXSrRWMJ8al2Uz8cuFTKoZyxTeFtSsJxX54\nkEdo\r\n=OpN4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAs++YAmaAGGfT79u/TCv1Ap7uKvj5k6YOtRNf9OrTgwAiEAkLtV01eZwXMHOd06HSC1gtEHuyAsvdElKYDbcUDOp+8="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.10_1583247812713_0.00975716158218165"},"_hasShrinkwrap":false},"0.30.0-texas.11":{"name":"minter-js-sdk","version":"0.30.0-texas.11","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.12","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"9a47c631d1b55e27e498ddd0462245336eeafaaa","_id":"minter-js-sdk@0.30.0-texas.11","_nodeVersion":"10.17.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-k+/P/ufiuU4waAtrp8z9+xoy6+1xbKxRGeUP1xZgTFNAbZUCkB748PUkP/FXHDLiix+3XrAlY5r9yRklavY0hQ==","shasum":"4f5cf4af1802809676bf0dc6b56509b867cb1f33","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.11.tgz","fileCount":116,"unpackedSize":2124962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX52SCRA9TVsSAnZWagAAAPsP/33cltaqBoBWg4ryqzd+\nEc7FCKmJtSI0KQzXDDSy1h4YS01cjc9T6UuRI1oPiQUTeOU3QXW0KNf/lhIZ\nRAvX9Y0hr2TA7tjf76boojQKpBL1cnj9e9Ke0BfRCMenzDgHm6lq77mQYLVc\nr8wDg4GDfuheQHBn3wie1oFL2E8COH/PnGgu9kd9cNe3S5hQEnaVuRV3qnS8\ng9XO2YluWPG7x3xG3J93q9evO4FGSw+DPxnHkk9slEMJzIQj91lN6kQk7pgS\nG8ULCD/b2J5m7zLi1DHqKTgrXrhq/tMmJq/QOVlZxCfPn8pQgXX81bViIHWl\npTyrBzp+BGIsasZfaqSb9WHo9fetHK8ohDEIUpebqIV/7Uu5jNsXJo0N2WQ+\n9ORZjes/jfzao/8HT8yyipQ9C1ooTSke455xYWukQjj1gnAsxZECh+aAWziX\nLsz6QvWCWWiOlve8uy+78NehCZYpmAx5ShThXBkjelAJQTOrCS2G53DHxWHI\nMjJzxFRTUrXcCH7xE0aRP+xYo7o91Wb8/DpW9OV1IRg+7G/ylv5IV8XnxvFi\nJjH5pLQZVtcS03XXRWW0ef7WujCJoD3CBX5sRO3TdWHEbRwnCO1JSQDXirzi\n4P/Q9nGj34TFzcfy1nfWnu7UGdbCusRkSstDWegvgi0wZtjgsbv+ZGoieTqX\nhxY2\r\n=Ir9w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7571e5o8g5ZK05Ta2bsmqbZFKk418xF5XX4hSK/HTKAiEA+Gg1Fu90tYmr7z1ts1p/69JSCajc7inS/ukIEqGRx4E="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.11_1583324562164_0.2721222521731075"},"_hasShrinkwrap":false},"0.30.0-texas.12":{"name":"minter-js-sdk","version":"0.30.0-texas.12","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.12","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"5e51bb4639655f7b85491a979e6252f9bfb1adfe","_id":"minter-js-sdk@0.30.0-texas.12","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-9uHAqV9jLjH2xwncyLpY6Y7gP+qNLp/Bw5/qEBl3F+Dt3LkJ9KaCaa4+vIxQkyfrmmdGX9AZNpFM+zvzaTPgBQ==","shasum":"b4ee9ac2e1a7afd848890cd9064f6521ed4b6a8e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.12.tgz","fileCount":116,"unpackedSize":2131510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYQiwCRA9TVsSAnZWagAAMRsP/1YPFqMDE/Tgrqr/lMR7\nbHWywUxZX984NTSTNF6A4hK40KWfxtKbu3laVpCnNi3egsMWl8vNhpoD2G/z\ntjiQ1nhEB7k2uLWnyh1H6VZnBjczCgA/TjGsvOqQYzD0ZptyWjgcMAX0YYrF\ndhSKb7lESkCsiQ1PTEPQ8DbPJsJ9U/boq4M66+c56FpsqSBXC+b+lpzSAwbu\nV8H5pPPUHji+HkstBSQgVXcAULJ98VemVNXLC9te6819iPSzfhQP9ofDeFZB\nhxQ7mPRgj3Dt+4uboqK1IRCqKFBa4m7PHn0o+S4urNI5/DtGzs1zz0nLWwyX\n/KdPcWWxBdh6PiQBpIxGqWLHdmEC9Msg9M0Jf+p4J4dYLs9wV3HxuqY/Itw+\nj+XtJfj/ach8fermYBTF4OoE145iTzSvxA8/j+xkCje59QDgnuAw1EiQpUEK\nIjoKpmnkXpShLYJQbBowS1Jj4WCf24lBDIBzS5Iz02BQRzOEkzgOH6XHLx9H\ndVwXeb+KSLrlwtBmWT0GUvW+9onnGc5IaWL1/5hcUPV8iwhu+M5pzZoV+ocY\nALD7NHxvs9tFOXAnP9o7/qOsful/0CWD8vSO4/CJ0OUMO4TouRwgjraHgjtW\nnr2sjUdsCkoRpkev+ML+P7ClJry2w2Gy+ts18WbJedZzNcrNtsQDw8K3uIZa\nQMb8\r\n=syPY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9VIIfPaXz2nrWeNFzYvubiCJzR82uyNqbx0Rwt/FIzAIgNBUwn9Y4fZZR4wD0OdCbwwziHHxEGzFMDdNboSGgHA8="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.12_1583417520030_0.35665309216300956"},"_hasShrinkwrap":false},"0.30.0-texas.13":{"name":"minter-js-sdk","version":"0.30.0-texas.13","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0-beta.12","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"7a5444b789a4014437d53e2338a6d842935c687b","readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params-constructors)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Signed Transaction](#prepare-signed-transaction)\n    - [DecodeTransaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    message: 'custom message',\n};\n\nminter.postTx(txParams)\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.log;\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [issueCheck](#issuecheck)\n- [decodeCheck](#decodecheck)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {string|Buffer} privateKey\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [message]\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @return {Promise<string>}\n*/\nminter.postTx(txParams, {gasRetryLimit: 2})\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction hash.\n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<string>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((txHash) => {\n        console.log(txHash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission({\n        transaction: 'f8920101028a4d4e540000000000000001aae98a4d4e...'\n    })\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell\n```js\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams);\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n        password: 'pass',\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da',\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams);\n```\n\n\n## Transaction\n### Prepare Signed Transaction\nUsed under the hood of PostTx, accepts `txParams` object as argument\n```js\nimport {prepareSignedTx} from 'minter-js-sdk';\nconst tx = prepareSignedTx(txParams);\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareSignedTx({...txParams, nonce});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx?d=f84801aae98a4d4e5400000000000000947633980c000139dd3bd24a3f54e06474fa941e16888ac7230489e800008e637573746f6d206d65737361676580808a41534400000000000000');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","_id":"minter-js-sdk@0.30.0-texas.13","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-LmxpAIp7U/Yg9uT0K5q6e/NjLdUJrDuRPydBL6Dl3F6DymTghQ7PhbFkDLC85S0A8jU8yWWKnEIjcEtGp6L+cg==","shasum":"3a153d2c5f50f338207c4b6082a03a80bec5d66b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0-texas.13.tgz","fileCount":116,"unpackedSize":2131394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYQt7CRA9TVsSAnZWagAA2/sQAJl9dFVIWhvy7qgr5rfG\nxVIapOlEogyUuWdYM9gFnhw5ykM8zX49H6MsHy2C7FcGRV1Vdw9fenHiRUAm\n545l6AtxhujRlI+iFWBh7XE0wr5lEMseuVfHfteXbBXiYyFC442crBZMK6Ky\n/cN5CfejgH0+IsEJdxsGKeZTn3g0BDRkiSrsMmy8wGzyCagVFtx/WNcLRXGH\nMF/LCW8cQsSQaA7voGoUWakdIANEkM2tq3IAWNDvTING2yXzeHfW/QXhRxGU\nkCuvfDZfpkPH3cXb4nPcEC0mPNdXlRvs10Amij7WBjzNVsyXD9jCNeMdXIeA\n3gD8m7H1aGRLkk2AMAnGcjWPwqvhxWU/8dKHd0c99LmSGxQUoCUix0H0Maw8\nAdHIDPTp3KMPqwXvSDflGvkJBTsFo32v3cJo0/0TMUfnndIvnBH4Ii/t95Ct\nLpRuq2A5V7b+BjSZ0CUnpwUPUVqbScnOkX/zrNjQXB4islTtnGx+cID0B9HT\n2l/MIiJqYvVn6c8uKXi/5M5LFId/UOFkvTfN//NC/tlqGdI6anBtQHKlqrZx\n6Sm6oe5UKQKfCtw31ywCcmhAIGjToCAjvOpqWv9tcswU7xmJZXmUYyUz85RA\nfe0rRBufJHCvNGe/EIuGDlhsQGaXDPx/eKSor9Yhb5gyUGIE3Esho2yuTDc8\nEZVs\r\n=YXpK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlGghXa0Xfv/GVM+h7nuk86a5st2iGn4tPhiUGOj+7qAIgNFZo7xfADxJtq5mSKrKuVqAjqZWQeXsx50ChTP5XTis="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0-texas.13_1583418235385_0.08148441780282134"},"_hasShrinkwrap":false},"0.30.0":{"name":"minter-js-sdk","version":"0.30.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"1ee27c9e24d0dc9290939094bef9d4d6167a9cd0","_id":"minter-js-sdk@0.30.0","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-zdhfW2cIAVsLak03FQQtpDK/OsONMp6Wgw+FXRVbSadGBe81NTFmMMX66F0YwA9bMXSKStXez/vC4kxG6srCNQ==","shasum":"d47158a7d2b9561319fb410bd8200dc8ebdbaa48","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.0.tgz","fileCount":116,"unpackedSize":2132783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeYfGqCRA9TVsSAnZWagAAIO8QAItj+VecWbtvhdhn3izE\n8q493f6OcqofdsA7zYJ/wGUBDyvJbVTChRGfxw2JSMXJgmKw1EYwoA41Qny6\nOtUD3i8TLDxwl9xBhmaZX4noNu7iyb++n7mm/zcDd6UVM1U1cqQVSsC74W/7\nBz/nkA/zleWczH0MGVuQJEo2zhmiQHh4AWUxq0Kp0dTT//rvyRYa4P3jQzhg\nPkF18WzJcCjYeRPd2foRh2I158K1lFh7qjXJMKVZt2HW2SOwWVrrUylokAWl\n0nemV9UcShnlGoRJcwnCh+FkD4xMnzGG/g6TeZIqtqHCYhIfceCHk2LJcm1B\nIAb1qLN0Xhe/9bqgP5u2A+isxRQt2iG4np6wYHJPBublHijf+bi0gUwX0lnt\n2ypbeB+eJarJnXOLsQnRs8SEJxKjxxufKPuBj2Viy237sY+BLkTz8hTwWEgf\nCeBOEeZTRf+wt8888ROe3v6/xkwSmBVSVtsBoVny7BDgCXMcim5TvPY6KEun\ntQl3m1DPDgtQAV2idyw++jXQgFKGLpBZtKP4A49WCVuRgdtcUrao4LKidvMK\nCRfBDrOTyWhD8q7KPvuCs8wqhrPbjY7wHGfCZutIeFUd/FnA9qjX9N4yhuSI\njlhWFBWv0jlBoc6Y3Ap79xJrxTvyfKeqEhQJARmJAFWAuDyCmgsIr9psbrKm\nSBwa\r\n=41kP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHDgyodd6+TgTNuChfslNEys+nr9QQTOQUtFq9e2DU6QIhANU8EE/4vv3U8eH2OxXP9Qmobi5nYWVR+0wi5F1Bvg4f"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.0_1583477161667_0.052680018766808834"},"_hasShrinkwrap":false},"0.30.1":{"name":"minter-js-sdk","version":"0.30.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/runtime":"^7.8.4","babel-eslint":"^10.0.3","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.2.0"},"gitHead":"9b28c4c5e59c14064155a98831e554c7ad632bde","_id":"minter-js-sdk@0.30.1","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-ceoThq+vsC6d983sbklifmGdYf0D4jefil2F9z+mrSRjUn1aolZ1eBZrO5VvN9RRqjorPDqDMRV2PLpG2UE8vQ==","shasum":"3bf43fe4dfcd89148fafcae0ecae6fc22ac29596","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.1.tgz","fileCount":116,"unpackedSize":2135892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ7XjCRA9TVsSAnZWagAAWgYP/A4gllhMlxAzfed0ROC8\nKRCtIaxTzz1peIn+wTTrjeFyezp/QXd5NBVq9BQ4Vs7zzzXlQQurC3CrPHij\nDu6xV6mTa9tak3I6/FK3G2vFCnVgHLV/fmMglvka8IfxQ0Y7It1sZ2W2DWXe\n05klrBNQN9STG5eOYR0QvlEX9Ak531SYlKe8FGzUYCPOzVTGV2MDWzrlbMp1\nFLymgc13i5/dzNbKaPU0oA6vPNPzrAz9D5hRIUqYIlVOwqq/FsyYg6bQMDQi\nFeYWgwJtyNwkBH/FBj9tWQ7BUIU0X12CAksibrC56Jvh3gI2dkYsJ9w0s3wG\nh3TNZMgVEwc0h72CGxQoeYsv7gkQQhHZpiqj2VKXLuHa886XhGyO9OxxQZav\nNE0bp+CFHIcrYLjgjeJtKc0/ekeiA4LtGNvTlFjqAIiry4b2IXj2e4G3rsha\nFDWclvoUxdHuICIqKI3g44Prw5XEw7gx0dgMCHnvdupq/l1NLgAXgUFqRsA1\naVQ8g65tV2dfoQ5oXyhDUMZL5cqfrs8AphFvdVTzYPbeR497xqmGWhvPRjbN\nY2nxmYI63jRV4cHUidMoGt9vaJEbvp7rGNCbITardull+Y/Qaw0C/JO+mXL4\n3s6XUxaVNa/P7LtuZi9982/N2fiIS3Ezgnt/ywtArPI0DrYUeVajyIkSda3n\n1IUV\r\n=xWpM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDyycJKWmo37P/gFM7nxA7D7/K1iNi9QUmA/Py85O82lAiB5G/whBeCm+ZOdD9lkzLxYF7Fzn3IjxZBfhgZb2ieugA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.1_1583855074344_0.9290646286333188"},"_hasShrinkwrap":false},"0.30.2":{"name":"minter-js-sdk","version":"0.30.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.7","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/runtime":"^7.8.7","babel-eslint":"^10.1.0","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^2.0.5","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.3.0"},"gitHead":"c99292b0a01d97d6512ea8a759922ee7aaf1b41c","_id":"minter-js-sdk@0.30.2","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-ZZgMH649BtdNw76oYU8nGnxvQZXiBMH2prnE01Skc15Xa1ai0jgv/eQUgrzFlunoiqAoW6T15ZJHCBP5o49JwA==","shasum":"065f4eaab0d8fd531abb1553cb00fbde8b009b5a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.2.tgz","fileCount":116,"unpackedSize":2136202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJealleCRA9TVsSAnZWagAAXDcQAKMdOnRLojKhpW25ZE6G\npUkT1O2og3Ts/0Cn+Wbm4aeN4GVA36TJ6vIbeG5vd5qtV11tEft0Md6yjqLw\nWmnI4PHbwlgu+BU/KtfBFOK32bH6saF8LV2lcBPAmZZP/++bEdTqRQdawGcA\nBOzElyS71+VNlP4F3GTwcBJcCDj1zFaiN97oKdGGDuG3Pao0o/xpBFXVaUoT\nVTlXbFLrt97R4VFe35y5P7XahdIQPzu8LPnMEQcgHNFjugbUctx8elZhlkUx\nRl5D6we2V1QscCQXFOepJoeYUZHnSI9k+PYFz9bZNwDB2gXEzXbwYkZPVC9y\nXbkspxQt54DoWD8pFKW+rd4zvocOmoy59nq81CbMJVnjaYSo/PJNIseGrjMN\nhBBqkDKqkUTHXPLBriUHfzTAKlnfqZiJvLaSpxFS4Vr8elha99IROGispn7e\nb/wNlHDvqx/ZO5IcRN//jkXOjhhE+TKw0XoGgWec1HNyJP5YcfmScC/XJgs8\nWvAJmjgbYB/MPZFBcCEp2Qiv1XqDgxja/hNTbUVZDoxarSaZ3wVbDxQfehy/\nIk/0Ekf8DTiaRzHnQ7F4LruLdydai1BbHns2B6SfxhcHVKncC6cVU++zf0nM\naopH23IqkhUiPXSwoqTTv7yAAkQDiNwbmsIRc7EIquYy90qzTJHBHFTFMvrT\n3/Xk\r\n=Hohp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEChXd7XmLoT9B6p9kMdQoF5Lc7vbkaZtIl6BRN2NFh/AiAvkLtJbiGRxz2fFpedtP8L2czdjNj6450hOQxWioeylA=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.2_1584027998116_0.4036074524691027"},"_hasShrinkwrap":false},"0.30.3":{"name":"minter-js-sdk","version":"0.30.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.7","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.7","@babel/runtime":"^7.8.7","babel-eslint":"^10.1.0","babel-jest":"^25.1.0","coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^2.0.5","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.3.0"},"gitHead":"db71c8853236debddcc8185dd8782163c0e093e3","_id":"minter-js-sdk@0.30.3","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-qifm361XRO9WcZPpaPVpIk+g5DxweObSvLa6Ni2ubyr1BjRUq+l6yVabkvICwXm0TVp/Annmz7vkIrLdIN167A==","shasum":"1a6579253bb628375cc24fd4429edb26bb97c90f","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.30.3.tgz","fileCount":116,"unpackedSize":2137744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea2y4CRA9TVsSAnZWagAAdm0QAJWuB4D/dUMvDANbfoQ0\nvSETnqc1GosNO6xU/+spkBgfD0M1xMCF2gzQcrNT24A3J7uQteAeQi9er4I/\nJnwzZ0Gh7CjxERQXpDxgsRFTmOCP6UiK+4tUbyAfqMnPJi994PFUzQZr0lhj\nG1nwaZo97Wx6/gwvP4MOredg9SvoqHrnLUSBAX7Oj0Sw+ED2WFRotsOVnaT9\nuP12WB/NjF023fz5/9VNz8O3NSZclCpx9Wp5Xth/QFuTmegC+t2hLQxV6cDn\nHOZymjHLvc32WEWhdIm/uxDAg6nU8b4luWkESLlpN0lVx9gRQFcQuEtNwmQc\nI70R4y9Ggm42PaOMGMFV3cwrHdTM6gbyWLxcLRH6zwfPLY3rG3l3CTcUll74\n4I0KWbBwOc/pMSZNy3YHrpIvnxh9OQOrIKpXYCS9NS0KnyoI7ycabJUc7NmZ\n8mBLdAlg9DriM7hHNSe2/H26kzaAAtOuwjaNwcGcEUlOrjFIZHiLsl7WB+Ox\nxyt4k4Q1LiLNBXM1aHXDyN5u4c7anmovSxGWXoPY8sq6ZOEFSniygBUTH649\ntd5vPGdnMAR2MgEMXShA9qQr9OXo2BuvgTtXCNSniHmbE79zj/wpRaf7BlJO\n6SH3CC6JAbEZqyi7FElluASlvujgoGfL2ffrtmZci/sSuCo4K8NphKgxUx1T\nI+6X\r\n=mbwu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGtwmzaFd5lCEOOcYSpikAZ3my7xpvW42ihdsOOg10pAiEAv1PkhiJ5O4mHZNXmK4MUICtZPpq3mHCzkMIvCN/x64Y="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.30.3_1584098486949_0.5096203881108388"},"_hasShrinkwrap":false},"0.31.0":{"name":"minter-js-sdk","version":"0.31.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.1","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.4","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.9.0","@babel/plugin-transform-runtime":"^7.9.0","@babel/preset-env":"^7.9.0","@babel/runtime":"^7.9.2","babel-eslint":"^10.1.0","babel-jest":"^25.1.0","coveralls":"^3.0.11","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.1","jest":"^25.1.0","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^2.1.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^5.3.0"},"gitHead":"56836ea8a6367b42b744729ed9b45c150a038334","_id":"minter-js-sdk@0.31.0","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-57ey6tsYp0RZ1QEI2izcSyXjAQ4i0D90xTfrBJ2Ko4+5CGQ1/L2q8O0MhEHrm4kOu+HHeWjHAEGDSizyf4LjQA==","shasum":"44e1bd79e60665fd377f634d30df1a83f47e5d29","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.31.0.tgz","fileCount":116,"unpackedSize":2143586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeemD7CRA9TVsSAnZWagAABG0P/RkNbjb1raO0XegPySka\nchZZw7NWt8MhAyYooz09+7vHFAIAjF4bLBga77hU30eRPPETiZ4nSmcF1RRN\nyvjr5AEzBoZOXZiS/qKgKDLIhkYS1IPcBjIi+krkp7x97wFBJRI0nf8YzpGQ\nhKFuXYoKq94fE0qApGbt5dv4bXJeAPLlGyKSafeTScBHmoDGsevLwpnj1v6w\nz0Smgcax9Bb8jyldfSaRl3fJKn4iJOFgAdHJI7gzvXoMoD9xCVH8IYjpmCuq\nkdBnvSHQmM09tLsj7wrReazekC9K+VFBrli6M0CP5nwrlwaXfyH3EgM9qFIp\ndxUtOLUQzOJOuasrpFaNK7l/TLz56o9JTW668RBMhbKBUXb4ursWcPbFiMhU\nKOPZ5NrEyEeOo7n44XT1lUySS0ei8+L0iiFGmNQ7SNpO90n7iJEyOOhAuuiI\noopr16elGuihBf6irCZV51r5+6CtBrs9ahQl4VXcp6BxuXgEl6eg3CWsl6O7\nPD8ijBY9hOqk2jF2XXeTZu+1LMNIOx7TsNZfEo8hdXqLOA4XTfOsUjXpKyav\nPIpENqsbMj3cu0kCzDul/IGNivokTYdQGQDiL41MkfOEu6VFJW6K+roYYmRO\nKTtivXOd71JSmEj+RtPV+5YjOo9gbPT856MmvfRrbREA31TmSF3LeuL0JBlh\neOCr\r\n=oyW9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYiNkuXywZaiSu+DIt2HnzqSkko0pMwHEd578hHwDMXAiAUCCebMe+bleC8uYwNwz8wR9b09cKMQ9jdm04kN6RwQw=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.31.0_1585078523207_0.15898799483851445"},"_hasShrinkwrap":false},"0.32.0":{"name":"minter-js-sdk","version":"0.32.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.0.0","minterjs-util":"^0.15.2","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.5","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.10.1","@babel/core":"^7.10.2","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/runtime":"^7.10.2","babel-eslint":"^10.1.0","babel-jest":"^26.0.1","coveralls":"^3.1.0","eslint":"^7.1.0","eslint-config-airbnb-base":"^14.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.2","jest":"^26.0.1","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^2.11.2","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^6.1.0"},"gitHead":"1876c432bd0eb468d6954885ee5db4260795b37d","_id":"minter-js-sdk@0.32.0","_nodeVersion":"12.16.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Jhm3P9EyNV18JHZIYobcjeo16vWibgDEx6SbwrsCEi+pw5MuNGUS5oJBPCKwqWqYPLTPGAVAg6gZxfycBWA2dA==","shasum":"d3c961f57794456044017f3572409112b584ac5a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.32.0.tgz","fileCount":116,"unpackedSize":1887612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0uZ1CRA9TVsSAnZWagAA8OQP/3/YPBdjuEoxJveNsWTH\nMnkDOiFlhbaQkOs4FdJTH5czsji7+YIuNb7W87PZ+FkeuTCIhceVXQO24K5O\n2whj25YUWLEZNZceHZf45b/CBYBOlbwHzQVWubvngARE/LphvvnKPZIDLYcQ\nPr5O/VuSYlLQVHZDsz/HPZGZdrJ3VpZ2ELaSvSOI6jQu0iwno1+fOXtVBQOU\nq+UxW3ckfww2im7N0tnpT2IoEDl388nohPcxBr3zEWhiP0VrSi5o6E76RGpy\nroceQAYVrYj5+aYwP2DfJ3wru2VViPRVSL2a2RL4zigiKwWfRPnj2XhtDzU6\nVQDRsTtTOvBM/7Oip0wbK6ghSLU8tB3FIaW6vIwS6uMdY7fhSDrcMvrXXG7C\n6azgGtaXQTUzeDGGANkLe1+ynX4lKiv8jYG5F//w11i4RPH4edrKktLxAtGx\n+eDUk0bUmNQzFS5GqOeR40VRmPKEVlwATko+kYI7Wk17rlBZdqONsQgX0zs0\nRE4YRZShqUEToZ0V6MnHqOQfcGZS+ie4RPn0F1qRgvR+LD8ZiXxVSOgkMdkH\n9SYkmeaLp5xE14pZElvNP5GOR6UwFYyRnLr2g3EHdHYp+MoU4UMBH0/PsI7s\nuIR3sdI7KjEqRSjLXQkM+1ZZVVUGJjtD5B+jE3i+L03UKBJkK45rUyCrDgm6\n2/S+\r\n=152j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHkntd9JDt3b4SBVATFbTsUUrV/FHfW3zWVB0arDRn3AIgfnbEa0oZFljIHl2LuiG8AJ8n9MoLwndaZXVuZ4LsqOY="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.32.0_1590879860272_0.33295670137438194"},"_hasShrinkwrap":false},"0.32.1":{"name":"minter-js-sdk","version":"0.32.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^4.11.8","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","elliptic":"^6.5.2","ethereumjs-util":"^6.2.0","ethjs-util":"^0.1.6","minterjs-tx":"^8.1.0","minterjs-util":"^0.16.2","parse-asn1":"github:shrpne/parse-asn1#update-asn1","rlp":"^2.2.5","secp256k1":"^3.8.0"},"devDependencies":{"@babel/cli":"^7.10.1","@babel/core":"^7.10.2","@babel/plugin-transform-runtime":"^7.10.1","@babel/preset-env":"^7.10.2","@babel/runtime":"^7.10.2","babel-eslint":"^10.1.0","babel-jest":"^26.0.1","coveralls":"^3.1.0","eslint":"^7.1.0","eslint-config-airbnb-base":"^14.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.20.2","jest":"^26.0.1","minterjs-wallet":"^4.0.4","pre-commit":"^1.2.2","rollup":"^2.12.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-json":"^4.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^6.1.0"},"gitHead":"21f8d8865f9756c856f45785d1c767d02f6b4e56","_id":"minter-js-sdk@0.32.1","_nodeVersion":"12.16.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-nJnJso96BbKV0P9CgPrbHgWBIh1TmOO6iwnA8kr3yjMXGBZqHcy+ZzkcJ6nyj5Hd02KjbIm+q4LKnzeCLjy84w==","shasum":"83a8cbbc10f2b1a01d10e2b65ed611001a7f4c41","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.32.1.tgz","fileCount":116,"unpackedSize":2161497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0+mJCRA9TVsSAnZWagAASdkP/As3ayV5o1lKH9Fvne2P\nZqT2N1h6ke0n84Pfc0QBuRvV8LsDdCFJfdpfy9GCU7Aq+e+uiop4jlQo5e34\nEXede+7I6fMTg0TwZCTXfd/KgujGh6U3Ke5h/q/QfSaQ+A2/gJFdi0aVyFxb\nYgRFKxtbhrCOUIQIfQnzOJGD5HtClH8Um857UwEtbujT9qkZPPNwa/gJWtJ0\noK8ovbzFKV7nHD1W8PHeJqUb+s3+IPNngUBOfFUQVw1cvwxbLrL0jOUvM3Oa\nM/llmRxBWJ93/dd5e1z34OCJLS3LFTKGuIP3UyC+S8zXQJtuyAmcz/hVw0r0\nS6YkaOxw7J/ddamDISnggV9pnFMMRWntyQSK5xJMJYmXS9qqZlRlkF9/O2xI\nQ/fBA7QNuXBBiH/rgsSTaP6A26HFb+E0Prit6BB/ycqNscpfQGaxpzTSXzJq\ndZx3DIuG1rGcClNOdGUOUPrjCLGGVIqWMZii6LkF/XSxH1IaTi3LufgY6UBB\nPA8dcY59X9NA8sphnXHjI4lWmcXDDTCbjviIGHn6QFFJGvgTFUs4MZKUEZNO\naKUg5Vu/GyNh6ryPXMN/ba/HsmnfhI/G3cPZLolIB618Ij9/3ObCu6YHHTTR\nVb2Tm8nQjVw3licAY+4oN9km1oqyU/FzkVFc/d6H+Nz/wsA/BeFjmc6KLgaZ\nscRh\r\n=CmAo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMUXoKUZ9WLJVVJ+nn249ZjUwoMrie0hWxxdXVqqfbAAIhAMbbBgtc6qrwnYRB04s/ztRP3nfJDPHTkXPobobGnlab"}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.32.1_1590946184838_0.10098019941066982"},"_hasShrinkwrap":false},"0.33.0":{"name":"minter-js-sdk","version":"0.33.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.19.2","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.2","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.4","ethjs-util":"^0.1.6","minterjs-tx":"^8.2.1","minterjs-util":"^0.17.0","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^8.4.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.0","jest":"^26.3.0","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.23.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.0"},"gitHead":"47c801ae63a8094d5f520428e5d1c0c0b5707e46","_id":"minter-js-sdk@0.33.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.7","dist":{"integrity":"sha512-PyCfgSAo12zMEKYaErCfBTgIsuwRFMy7bW8qT/ElISjz0BR0OXqwfLyfCxHmSt0lQLthFE8mWO1sidzck47ogg==","shasum":"b1386aa4a680afd4b513b54ea77b7a8aafb4927b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.33.0.tgz","fileCount":116,"unpackedSize":2002499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM+cvCRA9TVsSAnZWagAApcMQAJYF+2KjoGK+tW2uqcPJ\nzYpRw7gb6kb3/Tpx5OdvyDl/yJ/yRsxAVH+H2shIZ3yXLaiMYRLqhhdua4BP\neG8/xCV5KGOBFpkp9S77+iYsPJq6G1p7zZTjitFPjPrLBpZrzSUPUqKMbcoT\n5sQhpv8O3H888qm2k86WR4045MxwFrZmcWyJO27497H/JWcg9YCZmsgqBcJk\nYFCduN4U8aS1Si1Kw7yY0X6HHNP+GK4FzUfI5RJVcxTc8anW+9rNGTQDyUEQ\nSLpiblP1B14vuzsmU2p7VM7Ys/v1NsOuYDjqDVmvxma4F3qEJYpREqcUeDMc\nSO5cth/NBhOtKKyl27MFKxts/2pmG7I+DGUT/bbA7FLcagwWYP5lYrU6C8rV\nJfoBZqOLNNl0z0v1lf9xGj5sewJM5bXQ6XZDdxFAWZHkvuSp7EXSH1335ago\n5tuKl19CXJB83cOWKkncwZiNghkPNdTjrJASJfZHzoLci5wft3FJ6uNY1gRx\neLJ8CV6+hOazsv/yt/uwh0Fs7xC991CTFMOHrAzlcbTv7Ejuh+yOhF9//rxu\nFkZs67IEfyMEbbswIOHbFvrxjhjD9377dwEFWmJGHsP2LMeWiZh1BduFzVKD\nU3SCXD972koRq0JkbTpdU6Mlgvsl1/ZwetGWjJyrExMklDfh+2KjjzV+RaTE\nevPT\r\n=6jQk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzUTeaFs3ZoNfHl3EBf4VfByuhcG+7TjWyZnggfOqJ1AiBpFFmhMyQxOzgxBa/KrPpeB1JyHK+DI/wczjHUwJGygw=="}]},"maintainers":[{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.33.0_1597237038775_0.2647275165741627"},"_hasShrinkwrap":false},"0.34.0-alpha.2":{"name":"minter-js-sdk","version":"0.34.0-alpha.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.4","ethjs-util":"^0.1.6","minterjs-tx":"^9.0.0-alpha.5","minterjs-util":"^0.18.0-alpha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.8.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.26.11","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with sent transaction hash.\n\n*Please note: always check that sent transaction has no errors (tx in block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [privateKey]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction data (from gate) or transaction hash (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .ensureNonce()\n\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {ByteArray} [privateKey]\n * @param {string} [address]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n    gasCoin: 'MNT',\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"ca8a672d758b8b2dca439be9bb586f70b81e302c","_id":"minter-js-sdk@0.34.0-alpha.2","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-JFeEVLBCQpPk5SMvpmBBi+ehUmyyfMx/UEgp20RpG64INvIRtu0JXs+4Cw+eAh+aviUXPCrc5TO0c3C5IfuDFA==","shasum":"49914250f0326fdc08ed569820ac5107dfdc3bde","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.0-alpha.2.tgz","fileCount":116,"unpackedSize":1982525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYkLACRA9TVsSAnZWagAAKUUP/0F+vvCS3zNY83r0qdU/\nV5Dm6S5zgfczt2PUbPfPH8430dKRmIJlvrK5hDsVoE17GG/RMx47bw1wMPq/\nH14lrifPAIvkgMvDe06dRF3lgj8p7NuMfPUXLmYHc063dcrsdnI0N59J+LqH\n0aQ/QJk8SjKg0treJJeSp7od5sMQzneXrRRvEAKC2glb+/CpbZ3QkU/tyylX\nFpbvl+/84HLaDM+3XlwDM2GVWNDwajsVmSEGyP2/Mm4MuSytkSonq3EzZ4z3\n8L4fTGT+K6Av3vVxqTFohg1SWwbFkpeS1gV6vPwPY7+nS6RMUMFay14odsqr\n8nuzcVqITm1Qfv4dxzqbcN1sNG4VqvBwGmX2UDd4u0B4EoztzhF3UV4CvlqJ\nmTH1XJIxw8AOzNzDx243RyOfZsbdzueF1v0oBUKvJdLnX/k7v8Xz8e1+gSSt\n4A08WXxVSo9YsKi4Rv96gk9056UPWe6LXA6wZ7Jdt4O33JBV+kMZObek4XyY\niYtuOcT20grVXiI6VdBK5KLsjvPlJbH/b4zqUaPRCQ+A65WPoNX18YChhWwk\ngjq9LBg5El+SqoTb320lhRG6DcDIXDeo0+s3/yH34qre8bRGM9+E0AvVVsT/\nbzivh+SBlzkMXpPjQHwDTcluiQRG8rwsYYEScAFHMV5eK95yuJmoYUwsQNkL\nrCD1\r\n=8B/2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDxOkQFJdANecv9E5WYPx8IAAj4lubxK8U+01l10gNHAiAPENuWlB/acnXLH3ZOtywzQCNO5CNRSFuAV0xHEwapgw=="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.0-alpha.2_1600275136170_0.5645271012660351"},"_hasShrinkwrap":false},"0.34.0-alpha.3":{"name":"minter-js-sdk","version":"0.34.0-alpha.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.0-alpha.5","minterjs-util":"^0.18.0-alpha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.8.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.26.11","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with sent transaction hash.\n\n*Please note: always check that sent transaction has no errors (tx in block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [privateKey]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction data (from gate) or transaction hash (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .ensureNonce()\n\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {ByteArray} [privateKey]\n * @param {string} [address]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n    gasCoin: 'MNT',\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"8fcb255e8308e24e9b3b42c6e4fd9d16f7363e3c","_id":"minter-js-sdk@0.34.0-alpha.3","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-7/yp3RoR+G0dzpaA6ZkR3ZSBIsoeARYiJO0GGL3vaQYQp7ajgKUTBJF9BeQ0nEx+qtLcQ6SK6+YuBt52qmxZOw==","shasum":"b636cd8956e97e07682393dd27eaa24a4c5f0240","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.0-alpha.3.tgz","fileCount":118,"unpackedSize":2042075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZKoMCRA9TVsSAnZWagAAi/IP/3roijjoSsXivd9mCcUv\nlS2YoZlcUwKTAZCnIVBDoHIVKIvDXur7EUyUxSTf5W9TZiGLs/nXIBrykELi\nsau5Pk6OWeoTk+sYcdZzE6kFJTqCcrlDMTGJSMtuSBNMloujiqC1K0YQbOcE\nvkXQm8e4CHoOi5KEnBaXja0i6WXefP529RR6YTCedB5Z4FnKYBdOx3P1A/kW\n44lrpQCXGDWqWVIftT6HCXxY/T5tTD5Z9wQoTOkkSUpcxU6VtaPDmODaP46c\nJJBjr7G1JDOq8Hvw1mS5BcwNQECWzJVx6rp1NuIjp136cwjBZmrrDkXPtKk7\nRq94Z4ZadjEDyD33XT+rSICKRqzVSVcGU6qF2oN2Myi7QRpobsCSUZE08gnS\nHuBeonCAVJJE/xKp0UwXlAsv7IIVEuTcqzBV81kYF/Of+mXONEOGubcc145Q\nNoVQiwZ3fseMwQsoTOKK2zED6g4+n6RgNJ8A9rlfs7yMX8d2faPBNlpO13gI\ny24aZ/piVL/Dv5MZqO/erVN2TLzG8Ug0qLyq0k6L0gnoei+DV95JbDdWeYfD\nKzWqXNArfSpCm0sOtL6l3qmLd2qoybChWmZqcHfQ57RaXiALTzYnQ8PuSXUw\nMRPLatQdf7MeEc/mb5UJ4W8JZwAk2yDhS2u8BBvaNj4o4vwfxYTj6np6ZWLE\nYoNw\r\n=7cza\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs9DsdMCmTl84v4aPTq69XTxw6TGirYWhWUvCpB81jHAIgWdWBAImH3HAaR+MilUsQKfgFQ7f3S3No/rhGZBv6W0c="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.0-alpha.3_1600432651552_0.3346393374781489"},"_hasShrinkwrap":false},"0.34.0-alpha.4":{"name":"minter-js-sdk","version":"0.34.0-alpha.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.0-alpha.5","minterjs-util":"^0.18.0-alpha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.8.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.26.11","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.testnet.minter.network/api/v1/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://minter-node-1.testnet.minter.network/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://docs.minter.network/#tag/Node-API)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with sent transaction hash.\n\n*Please note: always check that sent transaction has no errors (tx in block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {number} [gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [privateKey]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with sent transaction data (from gate) or transaction hash (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('f8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .ensureNonce()\n\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {ByteArray} [privateKey]\n * @param {string} [address]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .getMinGasPrice()\n\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinSell()\n\nEstimate how much coins you will get for selling some other coins.\n\n```js\nminter.estimateCoinSell({\n    coinToSell: 'MNT',\n    valueToSell: '10',\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateCoinBuy()\n\nEstimate how much coins you will pay for buying some other coins.\n\n```js\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: '10',\n    coinToSell: 'MNT',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n### .estimateTxCommission()\n\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    })\n    .catch((error) => {\n        // ...\n    })\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 'MNT',\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 'MNT',\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToSell: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    chainId: 1,\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 'MNT',\n        coinToBuy: 'BELTCOIN',\n        valueToBuy: 10,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 'MNT',\n        stake: 100,\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n    gasCoin: 'MNT',\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#section/Multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    chainId: 1,\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n    gasCoin: 'MNT',\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',    \n    },\n    gasCoin: 'ASD',\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: 'BANANATEST',\n//      type: '0x02',\n//      data: { \n//          coinToSell: 'BANANATEST',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: 'MNT',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 'MNT',\n    value: 10,\n    gasCoin: 'MNT',\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: 'MNT',\n//   value: '10',\n//   gasCoin: 'MNT',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'MNT',\n    },\n    gasCoin: 'ASD',\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 'ASD',\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: 'MNT',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: 'MNT',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"a413e626bbf29aa652bdfc182009b149b1976b9d","_id":"minter-js-sdk@0.34.0-alpha.4","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-V2r/xS2i9Oyoidl681UTZkYsfWq+dqwhopIKwvB5LJqbiwb5TcGTWiescDdDTRrTZASLBlcJA19dqcKdpV94Yg==","shasum":"321cf5dd41ec076909e396dcee2c5d8324319490","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.0-alpha.4.tgz","fileCount":118,"unpackedSize":2047133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZO0hCRA9TVsSAnZWagAAickP/2Td3zNc42HPlCdEaa/R\n+xmCl2P/+5NlcuzoVIvG4i9ibHo+Df6EljI2s8fa+4ZkhyV5M375OrPPZTN5\nxD3PYmflvh7xZb3qcqya8tVkbAYdbv49Zcd161uhRXizYZACJQQfX+Usbx+r\nzOSSB93mrX5b0gUj2b638CTJwTI9nJeYXFiZQqYc+jlM1X0vSBWoCJIWgRT4\nY8FAtrQEkLU17jjS+N/sS1l4nINpu7JQgCQMSzIL+HXcjglqZC66Bnm2YCw4\nv7C3afA83KU0b/UPI3r1tiu8KUJzOPe80gH8FXgKVqhazKR11nWgtQiqpWZV\nVlOj6KFz4r1PlQ1sNHuk2RnPV1h1hFse/2TGDIdBG7L7/gvOhTEtDUuEHAiV\n1p9ZFpzV3d30KlnKpR7Wu4C1JB30W6o0PHd9XX8uXwR3LDe1zABMheX/YnKq\n0jD0fS4plASqNnBObvGFqD6RwWqLhzxYTb5kfZD/UHbrv8JEvliYedEDYyZ2\nSQZIbLoLLTQifICfjyYCVS5SQ73KsBAmrdw8PbEX9fLQe1+mmhvSK+ggmZKa\na0FbqbHt9QquhsBeqzvUxmRr0xOfAWciLOHxGD1iOSfabSf9UsRlovsciGjI\nqHYrzHevud2a+Q581vSpGi2vLxx7YwnIBOhgubQpxP8eq5Er/tXBV8Bli240\nvMHK\r\n=IZUR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUdB2U50Pb8GAJJMbq+4npAfnEO/I4AaphbvkkC2cJ2AiAsSEh3Fa6/ivhDTt23xBV3qUi0LaqNTJdN91MdJb8Z9Q=="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.0-alpha.4_1600449825144_0.3587382949786748"},"_hasShrinkwrap":false},"0.34.0":{"name":"minter-js-sdk","version":"0.34.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.0-alpha.5","minterjs-util":"^0.18.0-alpha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.8.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.26.11","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"bea5a19229a3b48fb519c7421fc6b2de272ca3a8","_id":"minter-js-sdk@0.34.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-y8jztcH5yEPCnlKVKZAGw3WdD5hkLiG5Rvrl+UFjuS0LWyF5J1htWbwxJSDpXSu9UaphTlNzbD9P0xNe7boZCw==","shasum":"0b7ec00f02c871a9c81c1215d4d98fc44d985a93","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.0.tgz","fileCount":117,"unpackedSize":2053519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaf6mCRA9TVsSAnZWagAASaoP/i0ITr+vVoEA1BDRiqlz\nMr6Fa3LJBtHqj2zyrnxTu+ekN0JBXoYnv8lbcwL4W1GLtMziLQeKPxNqzkfV\nQF/IKyaxlR+fu/CzNgJvEa0fV41Ch2yLFYFU/wlJrbdvxAWA92GU55avjdpy\nEUwzLovW3Att+/SkJARUMsUr9TyTREOm0CbikB9K7sKNRv060VjXm0TDPOwx\nkIPgwsjhxKm3p0ZmfOle3nkSXOLZhsMKEqFyFYz5kDcWou+7r2G2MNfTLHe3\nMzcA5v9x0bQ9MGdWR9kp62L2+V51abckSBl3+Iy/rGKAgXtMDo5DvTHtNbFv\nqu9O4cZBy5mXJpU1FeExjAfDLkKulhQHGariQuXmmZxi/LphqNK1dlF7ZTZN\n48cobsWk96UlS5JtWQlR8DSNlO8NF3tnork8oF5vUWIQCRXwF2uhJKr4aWGB\nt3xoCqns9uuM+JIxR+NOR1kxVp7KR2GnOs0o0+fed6sTZO70sbo/h0xNMRbS\nDTYGEQE8lDg2pGabzFHgH4Og2SQbPeClxzx0zVNvyuA6ddTemuDleiWewCv8\nz04JSGNJyE1kAqFJEAL6lYJBECSksexIPMOH/k/O4cLL/OxIMPtbuxzwYSlv\npfH611djVVu6BWbq05vT5mGpqhtlhDwIvrKI4KyU3ps5Ry5Xjbx+13Si+bEp\nXWLB\r\n=JAn/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDn/n2ogEcRAkv5ZQH158ZyzPMbvKk9gTV93dyOHe6MswIhALSO3f7gpUeuaXFyHW9r8rCR534KCffd6YeSk8pZ0VdL"}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.0_1600781990209_0.40287890855081043"},"_hasShrinkwrap":false},"0.34.1":{"name":"minter-js-sdk","version":"0.34.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.9.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.0.2","eslint-plugin-import":"^2.22.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.28.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"d58a5a962c4a698ddd3124218f9614d09388fb92","_id":"minter-js-sdk@0.34.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-8MQC3aEPJU/IEQ9ikFMYP+ptTTvYQnHNIF7uDIN1AV9sY8RMnRxONSnGEznHjbHGZFbW8HRgISs3185hf1yILA==","shasum":"5999d0d0e318b359329e7b70d94041e22fc9bb50","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.1.tgz","fileCount":117,"unpackedSize":2050870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa4bgCRA9TVsSAnZWagAAaqEP/RL0bF1BRPGNZHhao2aa\ns9eZEL7bdEHE7uNw6yV2KWFI2NcB3LvMB8awt2tIsanwq8UzFHYDBu98v/vW\n+PoIAmgfqQVpTQpjO30JyrOFqTe5bVHvoJm6MEF1WCFnO0IB56i5H2WlQB5f\nEHOsYJHQ7PK2H5Z1f+EOywbBENdCQ/bXro8wtJhkjYj0beuGu15fcp+ZpLvN\nGio03oIJeWdSYWVO3XqT3JWUQAu8xSyHFr4yzSBw7fAWYDorpIwhOMWo/CRz\nWCONG/y038Kfd7HAW4N4kUu5p6n9CQQVx0E3gVGs81q3cnpDxhKmS6OYiFZ7\nUmiRxcw1ljXjfLb4dykn9B5PEVP21Tv8vZ6DoU0RbILMwOUrIus7Oarf4Dm9\nCYiCoNoFSYildhkUdEfIdbwl+KdV0pf1Urh2vUnMJG+N1g4sCOqHzco+2TPN\nwQgIGY7LlI8eM+ooBNLsMS7rgYzwG+kM4T2fA2G28lLdxb4Y1ew7+cpu/rQl\n/QJX+bmYFajGucq9ydYBCLdW5f97wOSnWUodjlnmyCP1VqkgFpqhyl6C30Pk\n738ksfRcYnMMiQlSQElaHCBvzr95UVkSxeLDA453ZkxwWX706ebbzXUphhm3\nf9rBi7bCYR/XXFi+B8VbCHCr38LJi0fsqNDYvDrfpWnCDDx6p2bgs0pDVzgn\nsveB\r\n=GPmO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOwNy7oGy8Sf5XMY4IFZuUDlv67rXL1vqfnCvXkTEERAiEAsmCqywWrGs5s+ro83dIy5vBucl1PQg9Oy9vR6lEM6Hk="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.1_1600882399916_0.8457519244502294"},"_hasShrinkwrap":false},"0.34.2":{"name":"minter-js-sdk","version":"0.34.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.9.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.0.2","eslint-plugin-import":"^2.22.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.28.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"94af228bbf37cf8d7a7a9f7b9473a18344dca49d","_id":"minter-js-sdk@0.34.2","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-akOw9f8uiBr222QjlRJ+ZYtxwnwzHV2ex95ql0onQXyif4q7cPDA9mthz/6WZU69k0kbuuLQLRq+xIe9TErbyQ==","shasum":"43567e01896cf8bd51e65cdbfcd693abab0478d6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.2.tgz","fileCount":117,"unpackedSize":2051158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa8i5CRA9TVsSAnZWagAA71cQAJbBzJnj580Sms/t0q79\na/PSLqKOHmxrNE8rPHAdGqo7bjSJQV32cI3UPXiomjoMt9bXn56jiOvFX/du\nBva+s31DX6RwCKq5hHSIyMLyReD89MgatukweccmdW+eWduhAtcExRATHFM+\npdkjklS2EQPJMRHjuEU6kiSYLQqYOxQDJaM3o0TRShZMoHXSKPz4ghCjZV6a\nXAxVFJFHwk9kg+oOF6sRRV1yazP7jyDAePnxqVgsoe76b5BXF0PausfKzqHw\nGuN4XtHBsyHjWKs4kl7Vm8b7Vekayr2m/u31q6h0NVCkHk5r2atbHNOzZdLh\nYIgivYsCyA9Z5Cs6+gVtkiREj1qqGugCv6RcG3byesmuvBHkjqMyYRu0l45i\n/bKaFJCYizox3XAi90R/9TekN6qr0uKx++GwKUl4iFRzqIj3DTE8cBPmMKZf\nmWmJ33SX855LPPTTuuyA5dbxwwC07xD1IBBfwstAAmrusdc5841dHwtt0KlX\nDnvJAyKSE7NSyt+FtkZwhipLjz8x2AV7ui5AMeLmCgQMIyX6jnMtVRxNpENV\nYPK3zw1yL+La5B5kr8zeFQ+J01njGGZr1JhdwLVsDCOgumHhgWFIJCDdNRqM\nRUGwx5/S7AgIx/+4JNkNu70OsUOaPlccCoTTR7KQQgi4/umyMNCckFk9hcVH\nlUUm\r\n=hLFJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjHv2vf2gmFEvREfZXNdwWq8gpq1cV9/Kf4Dadd8tYLAiBeVc34biXbF2ntEkPMeBekWCLXhA/wKVASg0a4ndzz+A=="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.2_1600899256928_0.9986836617246515"},"_hasShrinkwrap":false},"0.34.3":{"name":"minter-js-sdk","version":"0.34.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.9.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.0.2","eslint-plugin-import":"^2.22.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.28.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"d6358fe31d73349ea640ac6cde00947ea7529c7c","_id":"minter-js-sdk@0.34.3","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-YtgjVR1E282WfwtjvYlV8wWJXz/skvCEmt8aF/3Yhu9tVkZnj7qAeqNUovPwAM/yEBPVnM12EanDlPEbSNkbUQ==","shasum":"362f3b0217f0fdec4691057e6771b02775472960","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.34.3.tgz","fileCount":117,"unpackedSize":2051158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbKLZCRA9TVsSAnZWagAAPVcP/0xcjc2aPz2xo9MhfSwi\n5e9NaExKva1npC5Q1oyFSehpIfS0IPfmgCogWpKkLlmvePDY8oyk3Zu4f1Hu\nGOIb6AuYBExQmxW495aJu8nnP1AfhUOfYMZoiLKgCZioDFP83F7AldQ+Mnia\nUWusi4xPAIzPnxe64jnJJQQe+gArUTpAFNuYJ8r1ZWcdxPwhjvIMbPD0vhc4\njxUb0eEKqzc6K1FV+SJkjehJ6DMHHaSHg/7rsTkJTYLzuea8FTrIVztlNeUw\ng8p+wWcE3PTxvDWtL1Jxz+OucPKcjanTSSq/pDikIXCCCVJn39fR7KP+Db9j\nwEJZeI4cIM8rdoVF4/2vTxVhRlXd4vMhd4ajlfAX2oQpX75AnNvcx97jqRbc\nfiTeGxc46mVZxo1FetoPEHodx2eZEBE/s/rM8vES3Z2KtPeTJzwmBmFld1Ju\ngG1kvriQ+lztyVDdFwjHZdXID54IU66hR8e9d7TZTipBhLMBSTwMSOcNGCnT\nB+mnxUs+rA/yM+u/uRVsxCqeQjAQX9WvPHtqy7wrbEv/M/44zT5vBZAVP3/D\n10hZzGce3c3c1qNxlWuhjlIaL3Ni2GMDt8OtuxLXdMHv/0rYGFVjUeTRJ9qh\nzqjdOsvZwVALJd+KE9Y0fL3uuqMWE38o1GR74kaUK//8B32AuSOiEHbycCR+\n2I5e\r\n=Vvkq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZY03woVAS05q1fE/3aTNO0rXQNCQVqkCrZ9/EoUHaaAIgaSETi9zbuLY9bZiy0jarzHN+1Z6Qj1mK0z0oYoLApGk="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.34.3_1600955097167_0.4882447446723863"},"_hasShrinkwrap":false},"0.35.0":{"name":"minter-js-sdk","version":"0.35.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^5.2.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.3.0","coveralls":"^3.1.0","eslint":"^7.9.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.0.2","eslint-plugin-import":"^2.22.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.4.2","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.28.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"0c3aeb5f4c8b67b5631ac53caa7cf6e91c4a84f0","_id":"minter-js-sdk@0.35.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-D1pZka6lDXA0eN01OLXyV/+s9u5TpMTXsDwKGS84BrRAi700MjIVqAipucWaVCbcTG6nI/22fmZfELyJnswvnA==","shasum":"756bda7cc9f64b6b967c766381e6950a39becf5e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.0.tgz","fileCount":118,"unpackedSize":2057471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb17JCRA9TVsSAnZWagAASjUP/2eTcGAToqqgoDI03+uq\nf3MHbKbnMZpM16BC4EssmtQhoCIAWp5H/423fFDj7yn9BfeCt2SKERtqD2f9\n7gInoojMUGTW9JeedJfBzAiZAukS/7Xn6e5r8mzTQfuWy7kxCRFpAteEyLMY\npoI/0C6BlPRUf4xwDIFhWYCFySBNcVk4dRvrbdtwk5oSra0RGgwKJAT7BoyO\n14kB5LiVG7wOuHpU30GThZYc8IyYGHOwxq2+utBQMwzAgDZzte1KtLpCym3v\ndpaiWawoXaY1Fr9U86sU9DSxFY6l7l6bXYfI8MWo+XSbBij/F5Mf25cowL2K\n5vjA+zFMr32sqiJSWIqIDP01XvaXbK9hfBtY8UWr2bT7CK0lFIZ19A9b7J0a\nECGztyXACkjeRbzPfn+DSlPrzHP6aFaGQUDP272zuMasj+0/KdF6+c3a1gSP\nZJtHvM0Ix7VTbyuhh4MJPx5if3lPzB6k5wVw2xlyKtKcKrC3N1ZqskIcGkGU\nj+Uy/J2lf/HfdKquG4ffsL4rBQSRjh3vbQHf1NvqWad0AUhjHjmNqfHoOQ+7\nrVfzqHuwH9M9PW2pRLbVfeMGGE63Ca5sMm8sRtLm5SUN+jvSY1XrbfiVg3DJ\nsh/Nh77nS5DLzsLfDJ1TIl64DLnZF5hj7gPBK2ufdacS9wKyZSukp4HsJzDt\nc/R+\r\n=LvZY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYrUYfNLYshmyY8QUZfez1J2MlqSj3NxwDZr+7hy5CcAiEAtiWbkqdTWsWMzn74RlSmoB3ttxW53NBttsdED4Iy/Uw="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.0_1601134281340_0.0469903362232853"},"_hasShrinkwrap":false},"0.35.1":{"name":"minter-js-sdk","version":"0.35.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^6.0.1","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.6","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.11.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.30.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"9009f0e7ea2c24de4b343758aa195e87e931b398","_id":"minter-js-sdk@0.35.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-3wQVhWPnuKkoHrdxdKXMSmYrCTpwDyb5/fc4MTlgkg1ByBgY4wSd5/kNc/bTr2xTFGA+8tZMgfaVC8/ohiJyew==","shasum":"a8047af3ec76f2fd27cbfd1c04cb38ca53ba5efe","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.1.tgz","fileCount":120,"unpackedSize":2074181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhhVpCRA9TVsSAnZWagAAMT4P/jEeUbjSgOdeA4VxsnQj\nUNyseufQw2e/htQ6PtzNgWOoQB910GZepRcau+VDC1/YCTYDcW5W/TDtHvQI\n/A0RQKOmhNR9qlxyRtlPZ66MxQ/xvj9vlzLRLKPi45zvvUirlHLuWIAFBHOj\nL7CdKvVnlg7OxAcZKI6+aZp8jZ/dShGCEpOYkLYeMsuErmwGgakJCnxmvjVI\n0HlhHm23Sbca/4lqI+z72132WGZEbXjzu9BK/4xxEN3mvD1w3prY5z0MSjOV\n4Zfo6G8Sdpz3UyO23E0cV3gPqW26KPtMIiCd5JyHtA9FEtTXHSQVOMhHzAmr\ncNrlS173V45TEeGgNYWmYdl2FZ2wlVABmMCfAShR8lhCCh3bO85D9+DpnuIn\nmAkMPx1LGS71q46YvhsCy9jN5k8/hIIv8fRfDHQjW93iW8LQ1a6n5Ki809hy\nzbguJpmgsOKyVGpAgzJgq9CDREDbcggj61os24JvIv8kyVVFk+wElBfavwYg\nfx1RttwxRAex7GnCZyf7mxOGx7b+arsPQhlfD+gE075pacyjUPoKtrEqQLK3\n9PRGdMWNZn0YZBCaHsO/B/ofo08o+yzZpvSQHmwsJEgDCykyGYJ+qD1fvhj9\ng4DloGe0xHqQcqYgdwx68WLLqZubKiFG8Rva8NoMYxEEot7r9fChsxtOXLGP\n8OdY\r\n=rM7B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBS8VzqukqmN0mysZJTfrOc6tGs2sHfywBx08JYT6enAiBXSWW+uJZCYPIFypzSG931nfYc4w8ASKgmTWbfd55L0w=="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.1_1602622824847_0.4070878165741545"},"_hasShrinkwrap":false},"0.35.2":{"name":"minter-js-sdk","version":"0.35.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"babel src/ -d dist/cjs/ --config-file ./build/babel-cjs.config.js --no-babelrc","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^6.0.1","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.6","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.11.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-jest":"^24.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.30.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-terser":"^7.0.2"},"gitHead":"696f98f9cd9e3d3d435daeb965143c0d977feabd","_id":"minter-js-sdk@0.35.2","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Xd6zNS2ucBiurWL9LDlyvuHcLlgp/HatrlwaSbENwKTUaV3MzDHDzzAnrk+KzBbCBg9XH0fITCLUtB09nMXc/w==","shasum":"46980994aade79db7cfe85383af0a78bfec2f393","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.2.tgz","fileCount":120,"unpackedSize":2084678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhxdhCRA9TVsSAnZWagAAhuMP/1p7mqPEky90PsWB7YQk\n3t8MFSrf17MlaKgu2HmK2pxOg3Ga6NHOulKqnHeg6eWT/FsXVyceh0tDRB3e\nSvqSR7Sz4anBEJJkCGSEPwVdcSda4mPRBNifnb1Ln23MhHfPB0wd/1E3ANLp\nck7XdHhdCKciHiVk2RJVfpes47Td7Cu5zmJX5XFEt9LHHEsQc2hK3HG2+Z8M\n2MXeOCxzdAbtSd5j98nqvylmbEkH6pZZl7nchWCJHOJgKtcRKq4DWBTZqSjw\nimu23dLEHXzZ9sBmK3tFX+nsNw3bt6AmRsvQ0QzOgG561xW4f4TagavD7y9R\nWu1N3hFzaXJsNsCBtny0j/0uM5BcBFsOL4nuS08ri2pRF0BGgdiSpdlJGfYb\n8E1we2fEYv1SgZfFboI4WdbLKOzRrPD9+8C/HrjHDnLHyzzYd8HeWFwvLr33\njDq3itgZ7AU5fjMPdL0UJS84PUJNC6Zryq7vXmbH+w+TBIsdiJUZPQJ+CcdP\np1CXVibsOPn3GFbY4sV/BjGS2ngWn25u4sYxfqOaGMajork3FJHQwUP/PyKO\nFHllykgYSrkrwpFHKsVIwvvmFQsK+NLw1scPXuSSran3Uq+AiC1nZOCMN0KX\n14XuVpt4wiGnYUKYV6279gSg12aavfs+YZETLj8unX5Tg7ohM+e9E+JQ9LWY\nYUlE\r\n=mSOv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgNkHJgvuflp00E1XS3t8fjukalH2SYBq4WmqyMuZejQIgbRvRkq4mwPtE78aLkbW8QoJYypCpAPp3pn+4sgPlZP4="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.2_1602688864559_0.6247450854036485"},"_hasShrinkwrap":false},"0.35.3":{"name":"minter-js-sdk","version":"0.35.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^6.0.1","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.6","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/runtime":"^7.11.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.11.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^22.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.30.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"44cdf8063bc88ba078e97055d3fa019012d01f22","_id":"minter-js-sdk@0.35.3","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-0KKEtatvV1gdLo7/ZFoyyFi+RVTRhrTE1p49EaLSY3IilVIrtxrSIRalnzm6SK/MVMk7XvoQMcAutBQY8J2vuA==","shasum":"1045f74e6f88c9586f793e8a21f6ff6eb39674ea","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.3.tgz","fileCount":160,"unpackedSize":2048068,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjH0rCRA9TVsSAnZWagAAamMP/ji8evogEsjsh+gYnqSE\npEv8Yp6RYnig1vqzkdEEAiT8TBCqAuWhbE/jaJc9rrq+/i7JfA5mednIQPxa\nJQU5/pIO9PiXWZpPdCHC/xBLE/nFbQ7lPpX8XHOBFeZUeFQQIefiTjOSHvZv\nIifTAaPwPgPW7YkJcQZNt6eUEp5CQyeHUn8j+cRjXM/60QB3jioCXPZT27NI\nNeb5AUjTVXI+gh6jDcmaECqxZz+w4FyYzt94aFd+e1O0LcmiCL8sfv/y01zK\nsRK1CLGRqA+F7d52svRq2Iqevl8rcHBo580QUSG4sAvKGEpseWiFQ28IXb/M\nZF6QFWVpyy/Vw1d+lVD/trbLRt5H/giF4qxGJPqrDar/BkzKiSm0DD3FP1Cs\nNk9CYIseqObmdQ03Ckb6kR06HVnPuEEVjBsB2akXf3b5tE8gUOry2qzV3qZK\ns46FQCHu1V91YqDWnAai35V0PYRmnLmbkyrWm2uBEuMwM5Oft1eAKZO9uKV1\nK8mk37dxksOIzPls4Jm1kn6/Z5jjFcbbZvJjnNpgEqb+/b7fm5WR2MZVt/bs\n8/CO/tbDLxkFc5I57BfPA7r5koSgndyonoK1MTNCCmrZioEB3oksUY8SvUZJ\nSWD1qTnYSMXvlaR70akOsB6eM+aH5Mesc/M1qzDl90R9Clz1Og9lVdbIn8IU\nkgwa\r\n=S+VR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfi6BpQa1FKwRFHu0d+uRJmesB3fsHKht+jzGod+tNuwIhALYH1/ub4kYnYinGXwNIt6MZB2ebqCH8o1jKJQ9f17j1"}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.3_1603042602452_0.6145337707073406"},"_hasShrinkwrap":false},"0.35.4":{"name":"minter-js-sdk","version":"0.35.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.1","axios":"^0.20.0","base64-js":"^1.3.1","big.js":"^6.0.1","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.6","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^9.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.11.0","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.32.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"32907a32b37863b9028a3ff6863647cc27f9a7ed","_id":"minter-js-sdk@0.35.4","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-acMhRxejumAs+vAcFDbF2Gk22+Q9jHVlZtjjjqE29e2MfD74RCkfgbxMBc+d63XGvQwa8uPl/FHsT0jV6t3GRw==","shasum":"f14451064bd056cee8b54cf4597b2349775810c5","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.4.tgz","fileCount":160,"unpackedSize":2047771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjLLOCRA9TVsSAnZWagAAqb0P/R8OsvDWFgUi6ocHOFEW\nCSjFPMmdxoKEACersHnW6h3ExyZiXJmtav3rnhN4sx/GTEnw5buWpsNhRw4s\n4UGJQidyyCVsZcTDPpBSeWHLkZHr/skEqCkJSETzTo7ZEptExpUHEgpgOZhD\nL/r6Zfn4/EegW2gNvMq0tpdifonLJIaCvqMgAOVkZKbVXLMBmNasyc1joJpi\n5cPlPrVb6zW7iTm606SHImIXB8Xgj8CQBdQX9gePWLd75XKP7DMqjkHEhDVP\nhAZSbIBNm7co2DI1Mvvaqe8rZoGyVAeU7fE/NdW7WxP2xZ3oSVZKYJTn8WXx\nCM9316vdd3svBwTIWu+2PhG3gAc818kCeiFTlSO7+VXIf56xsDcRSaJnQxDI\n3P3yi6AbSat5Vg39WLMT0cr3zhuumAcxIZZvY76H2yz4GAJoDjwkg+IyCeNQ\nJSK5yrzX8xarCXL95PANEOQqRu3ZQL0xx+1RuwomjHhjMejpv5s+XEkLIk+N\nYkAVrusXVd0VV7sexwwXCVavxwj6YKg4rl84adUNm1+mDG93L/xKNO+mhuvF\nN7Dcx8tqODjj+OHNtfEB6g5z/XFQpFkS8oKWFaAAV4IMvsrVbnSXlTwdAxLd\nqXkVHGC4KCnrBmuEB7aRP/+23egQz+XxOOEBOCPt4u0ml3kSaCdhWWP/Em7R\nsTfJ\r\n=/nfg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHB9BSscLssljQJG2SpUIdnYyJU5gsTeLmzoLDP26LffAiEAltI+eS60Q4MZ/16NZIEz+dZ01mtY7e7lxUwpV9aeyUc="}]},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.4_1603056333483_0.7573984485214393"},"_hasShrinkwrap":false},"0.35.5":{"name":"minter-js-sdk","version":"0.35.5","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"eed146e18c6df7ae59176e6b6d4d83e6b286ca05","_id":"minter-js-sdk@0.35.5","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-xE7Wd/iYhx4aHtaTFCzrCN+d43iFA/8TLkbTzxu9fL5RMWS7CuICEQJXUO2keYNC6/mYPfcQppnA2qogR5o0yQ==","shasum":"c74b2e5378446e646a3b7baab60879df1ddd1bb3","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.5.tgz","fileCount":160,"unpackedSize":2048134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpCgECRA9TVsSAnZWagAAplwP/2c/cY4gOVgZOj7VYxle\nMJfOc+37ozV64l0gVdBXoBmRQTa9t8xAZZhGHYZ08SVWgIkITbOOXuGK/lyh\nNBy5xSTzSpwOdaxoW9rm1+HpiLfgo8b9tTVtb1CtiEynMMNspZ+YCxg6z0q6\nrnirq+zSxAwx1qTUUJqiyQnmZ88VR59Cn24lyAgi5yuNeL96ZDnKNxnBsz6l\nwg4PXTWOM38/wwN74y0uquYp5VRt9nkLDkCxuE4xUA9Gof3MmlRoDIrw50Fe\nPKKwkTt8Ao9s9MSupJxntYtFPyrDymdbYkBcDo6C1uEaes7k6a3d7A2SlW30\ngwyEOZSg2JEafn7kisyCFMvtqLITsGnkqZBeWM6S4NOszjlYppWHfXgJGJkZ\nKbNFDCqNZ6T2oK0jrGsLZUqmaeR4hDmaKbVEbQ5aORYVa7hNLM1ISfaqeVJP\nyiwXMNKc/KoPJdURN3UNgtE4jHDF9MjeqF3CI0NCch/Gu+miuuKYLn1fV5ES\nI0WX629rtXQg+SAcc2bbc/IVvOiAf/H7YX0vg39hmV8nwPgg5R+1ewBr7LRV\nK0TiLAtvhNMgATyovBJQYVfSyyCG7TGsksmBn1q42Ujb0ISpr16yWsoOC90K\n/lzds6Q3khQLIGa4kCuJa97uGhNFxO0W+8vKGAI+O+9HdRQA2sfspNaKHlfP\nrvDy\r\n=9DSQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/7fneV9scbEKSGEZmMaeDj/VHYLOtrCzgAKhufNgDOAiEAqogbt2P3rODkj8XJ9/2ZkPh6gFIM5UwhX1q+QHmViQs="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.5_1604593667004_0.753754283063097"},"_hasShrinkwrap":false},"0.35.6":{"name":"minter-js-sdk","version":"0.35.6","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^9.0.1","minterjs-util":"^0.18.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"8a078154c7686e83a8acb189a0607a79c7443fed","_id":"minter-js-sdk@0.35.6","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"integrity":"sha512-w3oZLwldM8Us/buAEiiySnHhWN1+4cVN8o/+rFkcNsyyEngWRQCCetmmg8kqJAjPpFPXmGEFIn4uJPseei2qJw==","shasum":"5310e8b345e6a681f7671152c2c7835a85eb82d8","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.35.6.tgz","fileCount":160,"unpackedSize":2046428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrvb2CRA9TVsSAnZWagAAaxAP/3vRhqffCI7mOoD0Ni1i\n9rYRBDIdFHNa348KVklu1hSC81iOGS0Dv9v+6MFVGyskqK9ypghOUgWuxvCi\n3ajzWQPH70oJq3KXC/o3F0NbFFvUyT4MTE62tl+XBRdes/4BAYsP3OTbec5U\n1bMjQwNTItDgObQ+XLTDIOjFP8LSZQjL07WgszTLyHO/Y7usHcOJX2smpVDU\nH0+JrjgN4GymVa+0XZX/fWVQ4xstyrhMuOp2RY850UbAz6vYniEQPqYhCi4N\n6Odhs7xf9eZhaus8Tth0l7fP/CTQM0SPyZBPgdFNjPNH9SFj+MGCqj3oiZUR\n++KOcrUdmfh7/ESvJodNcQEyT6uiogMJhbGQRQEF7IZ0PwuCXpC6xxP6x5LB\n+H+UuFGll/KiRylAoar23+ubM1EM0NG4fZsGaJ6RUJwUM9WDpFVc5dWUZqf/\ndsFQjK3TdT94YfXnhvCl8RjVlH/bH49aGAge9OWZnrxBjemx6qL2b+K0hFVs\nVu9xRee0qw/wwDHqzSqpHBBSoxgOanmFo9ieGOtzZ7LuT8uI7U30q1yxOI4A\nbzJYbV1TXRN+AysFaxdvKCjIkqiXtbenUXx0jSMUnnhrQErGMLxKlzCaXVpr\n2XxlN90JTV9PimO3wlPz/kMQG5nhEVojY6IF1HB8D6tHkiQ/+xtkgDR+U6yj\nBIr5\r\n=jA/e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXTdQdxUXFl8PXQKntGB0vDoJsamw9703h8AoHWTBvGgIgb72HcxOm+nq201hRvNCNy9Wwf2lCUohVnJnbyAXwWNA="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.35.6_1605302006149_0.03200878594131007"},"_hasShrinkwrap":false},"0.36.0-alpha.0":{"name":"minter-js-sdk","version":"0.36.0-alpha.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.0","minterjs-util":"^0.19.2-aplha.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Recreate Coin](#recreate-coin)\n    - [Edit Coin Owner](#edit-coin-owner)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Edit Candidate Public key](#edit-candidate-public-key)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Set Halt Block](#set-halt-block)\n    - [Price Vote](#price-vote)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n    - [Edit Multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // BIP id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // BIP id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // BIP id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToSell: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Coin Owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Halt Block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price Vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit Multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id    \n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // BIP id\n    value: 10,\n    gasCoin: 0, // BIP id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"17d6dca2260845ea86538fffd7a949b758b3977b","_id":"minter-js-sdk@0.36.0-alpha.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-LcHeL0DmnSN3iDUWF18U7otbyM2pqeAUTIOSD2XhFY52IcC3j9/Uj8hNKpU9qL1f1yxAQYPhhrix6AFwn69DhA==","shasum":"eaf5995ef86ff94f354b8780be4b3a93024debca","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.36.0-alpha.0.tgz","fileCount":170,"unpackedSize":2071470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf159nCRA9TVsSAnZWagAAOAYP/2Do5KXeVCa5qaJDpfuP\n+xyaHLHEyS/672F3NLrEGfjBMzl1KqfrKfb5XhW1HFfUOePetTvQyln8ocFE\nxYkrzSLkORuNzBdV0TgmOCJQNjzVWo7FnbpCV/J55pXaNiI6a00fM5dhEXL9\nLjtMs3/KtAshdjj3slgTxwicEAFFnavlJP0UTZ6RrIjqTmL3xhpXzW4Lq1UY\nbN33lLOMJ+KKhXNrB0vqU5uZTCvYbNGJyL41Me5iuBqYw4IkiX+zAIMExJVm\nfnHYJGhfkuBjVfnd1PZbPlk0GKLrigzF3ZR+HHqPGepQwmvaZN50kkzA+4Xd\ntrL/5G5VFLJy05hiGg3rNPtLU//oHliIGvW0onU1v7BAbLl5JJXKRj4YAc2b\nRcENG4OHwqyYOUn/mKY6fEEWNuiil5omYwrirpIJvFOLRieDieH7bV81mSye\nsluE9d3AQpYJsqaP3l7P+fpR0K5S8cHtXEfnxyrOWwfPqUectmnL3wHVc375\nMfrWIsI5ZpoSNQGezASsC8IisZsVJ+Xyo6DRNm+oNSJMwAnYsZdchTuKQDOC\nYCZLVIQHaWnmYFLVU5+wva/R1ddsgmwX5fTrk1M61H9O/hngQkltQEkvPnQp\nbjYZLwsopzLSfnKVFNAO+1P+dZgWzdxKbZVtiXs8deIboN6TvdqGZiEsPJB5\nMmMx\r\n=+EQs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGY+HWpjZ3KRsXvKmO6RscGGEBiv8e4ozmSoMdNILJ8+AiBMc+ghyWGIxwEybinjo7apz/1VrV5WCgwTPuLsmWfnvA=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.36.0-alpha.0_1607966566506_0.4334511706309143"},"_hasShrinkwrap":false},"0.36.0-alpha.1":{"name":"minter-js-sdk","version":"0.36.0-alpha.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.0","minterjs-util":"^0.19.2-aplha.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Recreate Coin](#recreate-coin)\n    - [Edit Coin Owner](#edit-coin-owner)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Edit Candidate Public key](#edit-candidate-public-key)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Set Halt Block](#set-halt-block)\n    - [Price Vote](#price-vote)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n    - [Edit Multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // BIP id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // BIP id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // BIP id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToSell: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Coin Owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Halt Block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price Vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit Multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id    \n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // BIP id\n    value: 10,\n    gasCoin: 0, // BIP id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"ef24a05ee23da502c525605fac6600e91fdfb2a5","_id":"minter-js-sdk@0.36.0-alpha.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Btay8s8uosb1pkVwJZRZdysGKuVY4MfQo0d+knUx/h3yVG2MKvhCobwXaXKogMJ50OsD76BmnwUND3Gr5FLvDA==","shasum":"21989b5b423b10108b19bf376eaae6dd01af309a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.36.0-alpha.1.tgz","fileCount":170,"unpackedSize":2073686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf19ARCRA9TVsSAnZWagAADbkQAJtKMob85OrU9b3ecIe2\nmen5qrbI7Pbtwtt3kbVVWqPf/St1Kg0dihYUIP6n1CZDgmbGA8ERtMRtN12n\n8XpModzc3/5zHt6f+G0OFobJvQ+D3KAkR9eEnYpJ7kTLO0e8r64Vpq8/g9/n\nn0q7i5Rx2OZnT6XbxXm3Zy/awXbHoMxWuk5GLEx1TCc5yHhsBxlNQqG5vH5x\n03CydJZ3NV87+FaYGZIDeATT2HStgwlacFS0Xue7VR84Z040o6pJLy+SnKlv\njp0baGjKQTvYfXcTJ1bRCEnxVRcVxCj+j5jS5jc4jSFbGZ7vqrR29QdTDQpH\n5Lmi6XKM4BGjQAS23+VJa8nJVZBWOdRp3+KFk0r1W+XNIq7u/LONw8bqHjcV\n0cYdE92L6pUooK0GRfffh4Tm5qJ0gUg3DM+yI2JaH9Y6xLUaNZ4/nGeVG2yn\nuw9JLDOTwICABEk0vS7RcTsNXxdq6tEt5sNFRnkhsafvknuv8Xqf+53Mnb6j\nxVXWfZrOQeKMrhrlwVUHz374p4W9+tgXQU4W/YOLd9V+EkCoQ/glB24npjw6\nHZMgdF1bCpE6QspGPr/ng4/oGABsL6isMwZQRLsuSQMiYpJpZi3vnQh6dwwG\nxlDgQ7KvIttnFTNSn3FdOMCagQ59oOjxn3KPSa6M+IVwin3BdlB9Sp0/hq+5\nNB2w\r\n=k3Lw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhpgre+BLehGOve/V3FLBib1tMgpsc1zbZmsA+nFS4VwIgTXHVK7XX6HEpFJ4muAFGqhkx5sDLYGSnOOBl2mx3m6M="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.36.0-alpha.1_1607979024723_0.6876907245532049"},"_hasShrinkwrap":false},"0.36.0-alpha.2":{"name":"minter-js-sdk","version":"0.36.0-alpha.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.0","minterjs-util":"^0.19.2-aplha.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Recreate Coin](#recreate-coin)\n    - [Edit Coin Owner](#edit-coin-owner)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Edit Candidate Public key](#edit-candidate-public-key)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Set Halt Block](#set-halt-block)\n    - [Price Vote](#price-vote)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n    - [Edit Multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // BIP id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // BIP id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // BIP id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToSell: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Coin Owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Halt Block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price Vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit Multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id    \n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // BIP id\n    value: 10,\n    gasCoin: 0, // BIP id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"f7a278c3d58177f3d0477f2279ece4b1b0399c02","_id":"minter-js-sdk@0.36.0-alpha.2","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-NElvodaR2o1rV796jU0eN8IKwaBcxcLiKKtbkAGM/nqOtg30VIsMJNN9fl1ZAvc1Us0oarYStmWk3IrXBt6alQ==","shasum":"2b2fead4aea67c771c3d327497cae62f2064ca13","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.36.0-alpha.2.tgz","fileCount":170,"unpackedSize":2074585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf22ggCRA9TVsSAnZWagAAXVsP/2JlupVYaIjHSGd2eKiI\nGhUSv7NaC6nDcsNowldLMcABDUkMkExPGA76a+Jxy8rT8X/HRxaapuVNdig5\nu98nRZey8S76RnAzoUyzsMSo+KhEqQLiV6SO++6Qtat5IaffFZ2o6D9v12nr\nXDrgbsX8ppXG/lSItGF+V5C3onh7luMWsAtCL6A9PcS9xYgKP0YRi7tnD7NP\nFGP72jMZ1GG+8QfDyptpepjs284iY1+BefROdCOSjR2MBC3jN81Xb2Wywn9F\n+tIye2o+n7uqeY8TERgLr3Jy3/6GUlY1gQoZVzyHZ81BgrDT5cYbmy+i5BAG\ngNmIpaqN96Xzhimkmjp5nIPJ8hvTefEieTPpOUqzG+OdZlGoWsvoXglmFCuI\nbAdu5rMzyEnoGj33LGDcww7NQyHO5rf1OAB3XZ7Ixg3fTK07R+78svcLCRuG\nkWwMSW+Q8h5dW0AmIsaO3nl9XBTh5ulqmU79reG7XFZHMfE6QsrcWn7fKvxM\nPa8KYWtHCbgHJGVj2XJkT75ci6LQNcnkkK6zoh7Li8BeUPlVqrNxweg7JOSP\nHNObjcqN6biNh7mB3M1DAdQWB3ppymII2tPMT3m7QlcrvpKE+v78ZAMmpmeh\nOtoWY4gbxTwPmdeCA/yAMg3lhfmhZZA3VyuNvUBIctFMZWobEUqOi32/6fO7\nztKP\r\n=GrVX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj1b5T8TEqaOKumtfVwn52OaJy5N71c5VdapwHnHulrAIgayaaz/3q1qGqqB8gTR2oHHjr9BIR8P5qemCHs7+K9E0="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.36.0-alpha.2_1608214559902_0.31965172911525164"},"_hasShrinkwrap":false},"0.36.0":{"name":"minter-js-sdk","version":"0.36.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^9.0.1","minterjs-util":"^0.19.0","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^24.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"e9fdfc2b95e9bf5ee6370218a78de2e29eb9ddb1","_id":"minter-js-sdk@0.36.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-ypOl0OpZzI54UiZGbYMFL5a2Vsz5Q0GoCAKIKM4e0N5rsb4l6aGrA1Uvg/MQrTARBn0SVN09sIOZZXtVSZVEIA==","shasum":"4e8c755ce8053ef3a19a1993043e1f5672f341e1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.36.0.tgz","fileCount":160,"unpackedSize":2048719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4gl9CRA9TVsSAnZWagAAhAEP/0QewPeZXVns0gu/8+Sa\nppz8ctrx3h+B//J7Bda/v08gKGDTP9gfZfKn6njVaO9BoFslpECLFVuRm42X\nsyb8pIQP3CsWfZDEkzuIa7HOPBa2jXa8KKSYe3uPz95zlqXanM1gov936Vh3\nbmwLq4bvhKOfE4ogjpwdaDYtA1+esyPQFE1fWJQEyxyrjghWTrsEhCA3vzF6\n3mVXbMi7MydWQtU9xMKA5kJqS0yLNbSFwZRJYmwJs0emfYFEwc2TRAGPppFO\n9jj1mrWVIK+sfo6N9KZdOcXgWHFOvwFSrMLAmxJK6EecJ97VlHo+Nbozo1su\nxDn5FYXbiAP0wE7fjT/G7OHHI94KCbTn0bktcH4Fm2UR4TDp9QmhcOKitllw\nj27q7rx1pfoEZXUKIAymtuTDi7J+I73/+q9KvskUv2msJOmBGwYGqqF608V9\n9MgOY/7sPLErmUW1nGMO9Jdm5/NDjmNsi4vf6/TRspDGdS/FdAFtZDJguzOw\nOYgpPsFtNAnoQkzXbTtyIwDxxntgr19HXMPU8309AvxUxZAhOZ/AyPFPnN9B\nu2N9En5EUeIxRRo3P1SLUVS5+aaWPyX/HIiAS9MBvp9XAxsAPYSVZ3UxGEJD\nfRhtc8kQrEfZOCRCWbkCeZiMA0UcBajqCjckP5IRk7+8G9SAT6Rtu+LRdXhH\noXz9\r\n=hAIq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaVcdGQuBi2/H9NgZMabfHvLZd0Arrb3Lc0UBAOdY49wIgBmD4ewaCzXXDSisjlZzxpViCYNOkLl0eKksxYecTCTQ="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.36.0_1608649084927_0.4152133453476068"},"_hasShrinkwrap":false},"0.37.0":{"name":"minter-js-sdk","version":"0.37.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^9.0.1","minterjs-util":"^0.20.0","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"8fea316e6f150b66b0398263e529c8629ca77772","_id":"minter-js-sdk@0.37.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Txbgn+8m3jg5HdZoxl9DfjUXL3BIAElUN6vKunGO6gEdKc/eacfNxNtHoEr/P69ZL+f4wpTzjaKM/ssMHN33Lg==","shasum":"6c2d3f240cc1627efe2c2f09a8f89909723566c7","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.37.0.tgz","fileCount":153,"unpackedSize":2046147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7O4tCRA9TVsSAnZWagAAmwUQAJN1bCff09C9Xu+WSkH/\nH2VklW2D45OZtosxRZfuwdsdaniwo2mIAIPq9jNZbRF0kJFLI93K92bDVxqe\nsNqDcFWr00wYnZ0rM1oha3LcF7q1hs+k/9rrLgvHWqnGte8UxeEPCuouKkpC\nwX35zxhOkuughnjfcUbxr15uqn98bqubkeTmUgxvPDFCBrXaLHp6jLVLM2Lo\nVt7FSxSaX/QjFWld4/xDNWoPMpQak/VCSuE71V2q99OyXidEYwfJoz3QGG5U\nDa0bEfOLM5ztaz89UCNwvB92tR/M9SMVI+2IMemUkDpaHHUfMd3An7QkJe7o\nhIQsys8jPQEQvKBAmuC7RVjP64vQCcrJv1dIgjvl0pTxDhW5+lDGvnhDCU2U\n9AHW9CmKrEuihwphTcFQPf+KRSH0nL0ycQ/i1s4TLO7ekpPyMlLOC7IiI5Gu\nvAqmvE1uog11keWRokswxyW8u0XE9G1kZIqfi24Z0sgl9+h0cS6TUIDkop9r\n7kJ5L+goq04wfsn8cm7KstJ6MB2c8K9GAI1jO47f54QBzrYWUKflPNbZixKl\nModpwq40QPUaw2c07n70psbvtURTE0YyGDyiNYoyvph31lruh5PXQt/vMB1S\nVG4ML4lq432dlXWGXXKJg7ZUWcYS4KkDfKBW/OA2Jul1cNi9WqnuXNHXmZ59\ntN7L\r\n=yEpt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5R5BWlRA95L9NsqgXOTkKHXU0bhB2Pi2mKUZ7YVHWewIhAMK6OLAX1zWc5L0C61nqRDeml4P4T9BWD85FUw6RPy1D"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.37.0_1609362989183_0.5968685017371893"},"_hasShrinkwrap":false},"0.38.0-alpha.3":{"name":"minter-js-sdk","version":"0.38.0-alpha.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.1","minterjs-util":"^0.21.0-aplha.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Recreate Coin](#recreate-coin)\n    - [Edit Coin Owner](#edit-coin-owner)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Edit Candidate Public key](#edit-candidate-public-key)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Set Halt Block](#set-halt-block)\n    - [Price Vote](#price-vote)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n    - [Edit Multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // BIP id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // BIP id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // BIP id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToSell: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Coin Owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Halt Block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price Vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit Multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id    \n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // BIP id\n    value: 10,\n    gasCoin: 0, // BIP id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"d9a2a9a7f57220f4d7b72ceaf1135c561872c7e5","_id":"minter-js-sdk@0.38.0-alpha.3","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ASDj8+l8HXzLl9bLHWFLRMiMo7Z/jeugrBtbs/rV0SY8EHgDItdPFJ3tFDgCuW3J1JLdH96xhheQkJd5LrERdA==","shasum":"aaf9cbc4b75a3918f3e7cc173fa238d382396ea5","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.3.tgz","fileCount":182,"unpackedSize":2125715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAKzaCRA9TVsSAnZWagAAaioP/2RfKRQOgewpxeQ3ow38\nZWNeAYt9WTudmh+iqZ2h/7UvOpQdaSpagbKAcdJDW/KRCnRAxHjI8HjSemKt\nXfhO4X9AU/Us9YR1sZVHDKfB3MqMvC4GiC1YLMPi+SgokJIjyKZKkHB2KV7S\ntbByP/hWa1xbjq0T4rn2Gskrn2cY4c3UDV+9pJEazniIg8MeohC+QIQXNaHY\n99fgir/QvyqusEhcScHcLWp4TdhVv6elM/xtdXyqFAtuL3f69lGdI2u3Drze\nLMy/KPsGpYIFlBu3pWwqS9SG7vo3tJ6QvXhICvYc2mgYpc7MHrgTNPfiKb3q\nmq6fh0J6mf7nHcpKYx46BnB56kHMcCiTRorvadENWQHkF3rgm3/xxBHFRoyo\n7H6xG9LCyyN4t7HEC92TXPQhJ3cfWpuwoPdgbMwk7Q2HGK2Kv9qNjGB+qeUz\n/SPCJ0YkO4v4XDHQ+H6zuHeH6qPQJEBRPb/rre6o2hCHbxkEiOOVpCRXYVhk\nySSkvQzxR6pN1RPRQJDFj0OA2a/AOCF8WFX9/bVrv75xq2BqKU3tnqgDEJhS\nNP3GHSazbyfSzmBLIHypJ0piGDQb1J/BbEiIBAhWJ7ip2ND9th8PkF/NvNEl\nafw53YHxH73pgbFxArjeQVPvixt6WahOmu1m/AMcmInaTI5dcBQX27dL/rfY\nobeE\r\n=QnLF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNcgLFESZiEQ5Y3HB75WOWjX3Z3rMb063yfqeckbFwXQIhANjsDL8ORkIAx4o0mPJEF5BraotlgjPYd9iZoSQ8xnJL"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.3_1610656986246_0.7786457006447627"},"_hasShrinkwrap":false},"0.38.0-alpha.4":{"name":"minter-js-sdk","version":"0.38.0-alpha.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.1","minterjs-util":"^0.21.0-aplha.2","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell All](#sell-all)\n    - [Buy](#buy)\n    - [Create Coin](#create-coin)\n    - [Recreate Coin](#recreate-coin)\n    - [Edit Coin Owner](#edit-coin-owner)\n    - [Declare Candidacy](#declare-candidacy)\n    - [Edit Candidate](#edit-candidate)\n    - [Edit Candidate Public key](#edit-candidate-public-key)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Set Candidate On](#set-candidate-on)\n    - [Set Candidate Off](#set-candidate-off)\n    - [Set Halt Block](#set-halt-block)\n    - [Price Vote](#price-vote)\n    - [Redeem Check](#redeem-check)\n    - [Create Multisig](#create-multisig)\n    - [Edit Multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare Transaction](#prepare-transaction)\n    - [Prepare Single Signed Transaction](#prepare-single-signed-transaction)\n    - [Make Signature](#make-signature)\n    - [Multi Signatures](#multi-signatures)\n    - [Decode Transaction](#decode-transaction)\n  - [Minter Check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter Link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter Wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0, // BIP id\n    valueToSell: 10,\n    coinIdToBuy: 123, // custom coin id\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // BIP id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // BIP id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // BIP id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToSell: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell All\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // BIP id\n        coinToBuy: 123, // custom coin id\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate Coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Coin Owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10,\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // BIP id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate On\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Candidate Off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set Halt Block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price Vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem Check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create Multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit Multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id    \n    },\n    gasCoin: 0, // BIP id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // BIP id\n    value: 10,\n    gasCoin: 0, // BIP id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // BIP id\n    },\n    gasCoin: 0, // BIP id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"fa2517d1a181917ae6f368b95f67c59e259695cb","_id":"minter-js-sdk@0.38.0-alpha.4","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-tNK+bmekWJEhP9hTBnGIqQBZKIDysVcxxXhwk+U185FLRs2hrHs15lTD/hSAaGnvsLVtLr0oC9GRzRuStWVxIw==","shasum":"dc54c4558e734633794a1d25741f76fa802f6684","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.4.tgz","fileCount":182,"unpackedSize":2127707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBcHjCRA9TVsSAnZWagAARdIP/3SC2YqoAIhYdB//6rLs\n9RE1nlabvjWueprAyiFPpOCOmJH4TnZ74Z4Ac3on6PfHhO4pEqmFV/J0RoWE\n50tiwZwh32cxCrK7suHBtXISrSsTHOEC1IzoWk5SCAylDypwDZ1Te8FwO3HY\n0QHvb2bCxh0A/lIu9hFse5erPBAWniOQvEH8eUwPEhiekB9T9WyNV+ZTWJXT\ncOYcTMVy0Qi7azTRLG7rUAnAbd8x4FmaJ/4UP7rHkSPm6MkK6j/oQhH57QLu\n//L1fbDZYZkHfGmdVzuNFgrZYT+qoqdtIiStVpjpb/E0eCPkWkvCDNeK7bTq\nJCebMwxYAnO02Oll1CNNz3xB/Tm5AXBK/dceI8J/pBL5vLsjpBFmts4DvfL5\nHTWBm9kTcn18/+K+TDCa0XgrjikgcRiytjrYX8wMsWUJvubGvlTxq8S0E/N8\nVANk1RaL5xMbIIqSPMreT6mZxhiFQ+MW6k+qbleArO2Ud4FWtrl2S+Xfz5Jq\nnA+SQ/K2Y3Bhiz2WdeyIpHSnk14Q00QBAiK82gm0LCgdW7N5rtLQWF01u4Pw\n/ytflBauZ77N4Bb2EyEfJ5RVg2c6u1Itn1plX/CardwcDNerckwMwZbPsYBK\nOevdweegQpxoqSeaXqgTKtF1un0qYO5wG2aMYupVJ5UNc0NQXajN8z4KcEfw\nnMv1\r\n=sVGK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnxgZmFEjfeWGNNu1qW9mg2G1uKqtFZlEyPJ/z8amihAIgCwzmDGROp77MckkYUMp/r7PIm7I5nMDEjCrdyUP4Y/E="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.4_1610990051072_0.43074331083174355"},"_hasShrinkwrap":false},"0.38.0-alpha.5":{"name":"minter-js-sdk","version":"0.38.0-alpha.5","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.2","minterjs-util":"^0.21.0-aplha.3","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"8bef1e3275e8b7c463fc1b829138f973cf67bc59","_id":"minter-js-sdk@0.38.0-alpha.5","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-j4iLR8uBNsfleQv2vYTrO7daxulH7ATAK7rUeU7DnidxdncjP5PDkTPQjPrZKF9m21KJNNd+twYHx9lQPKNA4w==","shasum":"894faddedcc2cbba6cbef4bf044c36ab0beeb35d","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.5.tgz","fileCount":182,"unpackedSize":2131465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCvXTCRA9TVsSAnZWagAA5wIP+wTzcQJu1lywQ/bNGwDd\nR5iwzW42CMjri9yh1iKILmzk1TNmqPuI38zM8sUjFVArApJm2oyzRTG80Y6B\nIEFnRqz4WZqomu2S9wBrEvNuPGW3KpbrifmGJWKBWLKDXqLaRyrQbFqeoENJ\n3W1I4x/VS8Ao0PqLEB6tgNPGcpVfUjWkMYdmXMOhv7IoIfwaB94Yn6GCqKBO\nPvEY8zI5hwReYLKWpOxgS00dHW/0/NoZhnpvG96imLwbupOVgs9QSXJDUEfy\nqYMxweIOcIW3v4wBGG+n0UtsmbY6flGHa3OLhFgLXnJLJdZXpsh0IM0S99gj\nh1HZPvvvDhqbVhzrRfNx6apXU1fYJmZESCNG4CupAsBtnZigyL5gMQY6pubL\nMNhlbOgzajN06eHa/ss/amP9hwmoDKExuNFn7yuH7Fj8VsL9jZGsyivruYHL\n1PRhAHWHV8wvwQM1YFhDDuR1vSgB/j+duiyQYqZMo+79ap8TmMkI/FZ8wCu4\nMJ7QWUBQyTHcFHg/WXjYFyAoAymXvTNjO62SEGUzSAQ4ByjmTbrUxKl2EFf0\n9SBjp9Lt+nC8Uw+uYbsaQzz3yzqI6Q2FnRezYQLfAgcBoU4ayy7Btjfl7CHK\nEYwoZ2czZDLGb6NwQQo9YURug2D4eQKZljFL4PoACIpdH9vLO57+tMqxmkah\nonxV\r\n=H2FG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEVQGmz3+Q6z3R9CcooDhCV+stIR+meLhHySyRKeQLvAiAMuUB10qV6sAD/RvIzrgpXZmtrzg6iZRD9kl1KBKySWA=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.5_1611331027416_0.06870540512134693"},"_hasShrinkwrap":false},"0.38.0-alpha.6":{"name":"minter-js-sdk","version":"0.38.0-alpha.6","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"d0e9ce62adcb96da57bf5e67192c949f34cb7e40","_id":"minter-js-sdk@0.38.0-alpha.6","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-VQdM9dbSQ183LQqGf77twtvyOMMtaKSaMli8Uu2KxC9l3c7kg5d6o0lFdvoyJUEz2uoOVEej26wynlXTT/0KRA==","shasum":"551f927bbd4cd8ada3b83a623206343443f46660","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.6.tgz","fileCount":188,"unpackedSize":2217490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFDdICRA9TVsSAnZWagAA+YAP/A08jkEv0vuuuabrLOWN\nybmIzSYPmz2NSJD5lhCSkCyPFsocc9AspK9WymjMPSRsX/m387mcato9wwFJ\njeWPgOuBjOH/nRpxE9X2LoT1VjzThKv3twnU8jLJJTIwPY7bBMMJTE75Oa4w\ngnKzPkB7HqooevD8F4h/N68P7Yb9Nbj1Wzpj+OcHhSNo9MZH4fJYNh+h/9y6\nwJvZzlAXL+I4ydKhvdVLBOSAW/b2MOy3Rhy9Jdk/SWNtxtbpQ8EUSSBKAunk\nRDiRCTuZLKUaWeo3jLXZgnGjoMcsv3eb6p8lPNreHklYJ4aDdD/XWkxCWOFW\ndJlzyNH0R8jZMR8YJ5JhdURfY06QF1Iqr1otYRj2RkxwhfwcDlp4gyhOlaxf\nX3Yxg9pX1GzJFGkb7GQepJdfIOP5zT3NzCkTjwS06nHWNgqAGJOJFMvLSuve\na8yaAoQAuAeJC3w22ld5nVhEkSrecu/Qvs/MOwZavnjA6lN+aJPfRIvaXZ9j\nEFh5fD/hMaZtiLpgcleeOougoXAr7wAM5YxGtiOg6XkvWYAzZF4zZq58XXw8\nlTdopOSlgiwoDXHkhEgWTNvai1D921sVrFOc2pyO8bIQYfNGnmSMrlrPki0H\nOr2YowmLyERxhInpiGrPg3TTgRI6zKw3zqx0pmQ2abdVZPEbPLhUOe/Vtaig\n0HlU\r\n=+0um\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKoXg/szoZjOgIvc+Sy6g4SzWiThtV0BVwgYpeWY57EAiBWV/yswxs4T9FN7UlxlVTlB6EtSuNzFVw2BmAxUhw9VA=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.6_1611937607804_0.05914832563796124"},"_hasShrinkwrap":false},"0.38.0-alpha.7":{"name":"minter-js-sdk","version":"0.38.0-alpha.7","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"10c22f79663324062927e6a7527cb59b310fe1d4","_id":"minter-js-sdk@0.38.0-alpha.7","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-BpSEOQ9Pus94azjRRqeOm0DbJhrfLNeHcpnLzr5B/s4HCI3zSnfDfIDESyJMCHB1zudbk1UEDbG8QhbG7RdgQA==","shasum":"f5a021206399e2da4b280c1d08ded2b3e5ddacc4","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.7.tgz","fileCount":190,"unpackedSize":2239104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFGv6CRA9TVsSAnZWagAAJTIP+weIMuYMqTuHSwU8uTa9\nqZm1yhmXSKu7+7yk5lnN8xn04CpReEedRih7IqP4h97Ycbc5BVlQC9+dnK85\nWjUcW7s7fDHLGerXWzGBTElAUnnzAVt4nlG0o3ww+JfdvWZ9xEGH1Iw55/bH\nrdy3XIvnwCzSBmrwK1a+gN9Dj1F8QbSjxoyCbG4IoKy64EKn2dfB/mE4BptT\n47Wk0t24uT446/5IzHs7FEuOw51CCeMI657xEXOKsWO2YTPlQ4TDRiEXkoaz\nTfgvdVSboUlJhgSudfq0/nX+3frqk6zsBB3Ld8mFIVoHdrUHPiOD1FzYzQNO\nIilNOWs+FLj3EvXIRxIvRIaO9T7GNug6dAtbnSRvyHs7gezf3f6NQDrtCiw1\nvvg0vse6Xgag5RWAGgO7Wo708/5u43pyF34yZjsPGMQQezHubihbwg+O5PPO\nwOGRz3VAIo01s1VbbQgLcmYvZ7I49lM5GC+jW1ZyxE0Atq9/1qlHf8JEOqYH\nVg4NQfVFZkUzVEHBaEczK98w44GA2KyNpn3/tCEgNgRk1dmdy6GiuKRZGjPP\nv6slTo6ZUaCqVb35zyirPPTAtxgGx+jZPHPyKSc2+BurJ+IrVtfyGpLZjcQk\n9gXB4+8Wb0pXe9akY/WzsVJIL8k9VyLk2DF3r5U7jcoJB0UHdtQeE4FZQJRI\nA+qp\r\n=VxO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRJNAfzcTb5ct2Qbraq86tJ3FD6LL5utXg2CQk8FGlrAIgBQCIt7acTXqmoJTTC2SbiLdtIAacbbssYw+UtG6Do9Y="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.7_1611951097493_0.44440904934345493"},"_hasShrinkwrap":false},"0.38.0-alpha.8":{"name":"minter-js-sdk","version":"0.38.0-alpha.8","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"dc99cd68c53a983bdca9929c1e4da37eaf3d208e","_id":"minter-js-sdk@0.38.0-alpha.8","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-KA+xTailGP06aEoJOWFvoJt7ZkiJVeH7tpEkF1qdmqKmmEWXxUoevl7Bb2IxDza2FEHGi4/O0D3CDLl4Q9XoSA==","shasum":"470d1cacdcdabf3586dbf07c968c24d525171396","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.8.tgz","fileCount":190,"unpackedSize":2239410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGBxACRA9TVsSAnZWagAAax0P/A3U76pZlj3fFq7/ckGG\nljHqyd5+JGUNJu8sxU/rYaEeU09iGzg2BONST0w1fI79hIlyVcRxZZb6Qfgp\nAj5LuBaLQJZUC+QY31iIoR155ujohUy8+SqV599fIGtjDHMISCqE4EY7kOva\nACSgVrbriHEjnW6xe6D3ZKs8zdpbeS5Ks47PgT/24JF533rsLByOQbkW3pbV\nUf8dQu6REIAi1EIEorOQBGULCy8kiY5H5BF8pmeAOXTaNj9L4hmwZXItltmp\nIab5n+BL1vH/CQUGqlJVysPb/zltrb/Z05aMwe7sAIEY3QI0dpksqKrfWllm\nZ675K9zkxfJH8Ig0iDyfTU0ntqz0NyZHlIt2h56Ec14YhG1Ji+KHeLIy4tIh\n8eHITj0f4CSDT7YBbz7KbnG3QXC75C/3asAk1tRQpuKGJOYSu2y5Sjg2mg7T\nnEEOtUtFIIE2kQ7bN38h2D7Z/0+HKhq+4ZFuw3o4/CejiHZOx2kIb2l84S3U\ne4hyEN0U0LeP0JpYvjzsRwxnBxk3+83N3EFU2Omrg+tz1cmUagWBHJOea/6B\nuQ/jrJiXGA4OEF+eU5M3CgR2+QQS2f7DYrd8HKqTkpGQvjd8laoSOAQTaIvw\nKMJ+OXGN4ACK5UeXUbYXTTrAvjG9QxY0Fj//Q99CbCrW5vmdPOUaWYgr7h7D\n3q7i\r\n=Ss7c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHht/WiyAfonaUOHx9yElfwpx2bJ4UDA2geYnZq1QmEwIhAMiWmJrOlYg04Y5XAQYDc0mf6r7u5U6OL7OH5JiFpFCX"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.8_1612192832185_0.5612203324198151"},"_hasShrinkwrap":false},"0.38.0-alpha.9":{"name":"minter-js-sdk","version":"0.38.0-alpha.9","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"5a11b556b39b99bd8387c5b469c8ffd1688f67b8","_id":"minter-js-sdk@0.38.0-alpha.9","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-OTEj8/BJbR8CBuMeQEFYqqaKuYrO+xDFnfOf8Xppx17QzrYsK5gl68xA04PT5pXseTe4ZQIo8ajP+P1hbzaCXw==","shasum":"eb5e767e544aceaeb09e9b4f85035d74bc762c4f","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.9.tgz","fileCount":190,"unpackedSize":2240913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGCmwCRA9TVsSAnZWagAAuwoP/1EKD7QimGUCuwUpXFdn\nd739IoUdG5o/Y9Vo/LYGl5KCyA2PD406PtLtV4HbAN1ljWiBKPm2jViCr4RS\nOnV8NYVcLJFb3H+piKK+qDomTSCxZ9GYHCr7SpEXZM2dx4+kHCxln69JN7lh\ndavTAd/sUd5WE8/MLrpEX9vIq7YbvvhPfiBHG4UVBKARWARbc0EYC6BNJBXR\neZZI05rr1yb1AdgQ4Gn6S40c+qrU1butp3bOMR2HyABwkPHI3RNtTNlPOYgj\nWrQ7j0gMxd8koUthGlspa4hrVqVC+35ZRCeAvi5mt5RXeMbHGarBV+LHRXvm\nSkzj2WO7bNO86aF8cccmHbI1CSR4ZgRScNZWP+NI1ZwF2hk0+5QQjMwTP9WS\nqywwisnKixSBQdzfEBATCCPaXYUwkX0Bt2KSZcgJmF+N/c062JHvwyppJEkP\nASCmKrgSFMYIhw0aPgaXrBq9F384+e0FsegVLeApOSxUQFXlVKFclvWqTAdG\nwVCvhkLREAr4l/L8gT1Hox4kmfFGjb7+WEbqJzrGX6YzIfuBjQiEFjpTck2m\nTaWYiuN3LeJ3nlfnpHTVta9YxspwVtXhENuH60ZG3oyAUH9wj+JydLgqaD/Z\nvbPfWOpD5BGiD6zR2uGNq1yKGuwXALRIJ4P8FTyKsEq7RAwaa6rrylPdKpwZ\nW3it\r\n=5F/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzud7pePJbhjV8ZfYr6HQ+10Y1k8cmXySXtAvePkhpzAiAxMpexnWth7/k8SlWoy6m4bW5DXdG54MBDd12B1OJt8Q=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.9_1612196271606_0.649339265019556"},"_hasShrinkwrap":false},"0.38.0-alpha.10":{"name":"minter-js-sdk","version":"0.38.0-alpha.10","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"45ee7d96480e297b32961325a0a51645706f9414","_id":"minter-js-sdk@0.38.0-alpha.10","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-aJaCvVSdCL6RvsgcFWNzHh4VeGfzg3WWsLalqxfbnCYjhAGwlYDOwGXA4uXVTgr6OVYwZRZ/SH4LiHge8lYXjA==","shasum":"e91904e9757b2b941f78be2104097592f54568b9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.10.tgz","fileCount":190,"unpackedSize":2245743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHAVFCRA9TVsSAnZWagAAWaAP/RnOXVOo7CPf11WMltqA\npucJUltLRp8mHKsGjkY5KB+5XsE7yiiOx2iWHwgcsi707sohcL4iooZr7R1U\ntC5u8UZfgv35FPVy9WhjjNN2Yw7+aOAE6DzoBDrxc7j5fFnoe1u/eMlrD2iM\n8RpuZtajfDehUy9MOdB/cqqQN+5m+4qk/PhldqxHLrJ7nLK9XOyryKp3GxFd\nX+vzdU/l7C3dyNpTrrrXhbdwvLX0t3/YHcOnNRK9GJaUdiCyvDvh78hp5LjT\nNsVgbqlPUkzCL5HIfF5GUoFtekRDaWbCBrDmMhoANZSBp2lIM29VJg5/+6+1\nbUCgsDCu4DhzBlcnm8xniJMl8mNk6JJaB38jLJ4IoFlt30BSv1CahjU+rGJ7\ng5avV2S58wHLwKCGpxtVGSZiaZ34H6ONa3/52KZNeyC+RzScgKns8t04S6yz\nxB5nd6qq7gXitiuAqjsEtAzWPa0dGIonKzQ7l3slbdae+WfkJym8XcZ7bjBk\n1QEg0eF0JM3zVcxTqNRr8Fbu4tQSKycrskRcoSARDcbx5+BaNtWrBFWBJkfb\n26ORVWlKbnGTSX98WQw86s60hM0aMlotEAgaPYOepOEoo2QsuaNB6FYoyAH6\neeVwahljaaj3Dc0V5OJirllMK78/VulZ/c6kNnAKGIrnNuprdzNQy+kGt1PW\n1Hy7\r\n=Fsjp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0gcf5ehK4KzzFW+hVFXy8vV8FbdsthjZ6yZXkWmbUzAiEA/9FyYbajC+CTLbVAZw9+7b5Q1lSMwRDKRBbBA0To7P0="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.10_1612449092636_0.7845029237108967"},"_hasShrinkwrap":false},"0.38.0-alpha.11":{"name":"minter-js-sdk","version":"0.38.0-alpha.11","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"4a1e2c097bb776206b3016c1a2d9083c328c8793","_id":"minter-js-sdk@0.38.0-alpha.11","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ITwOEFi9vIeJYMlA35l+3hR1RUL8tkeYC8dQ/cJAW4WW6pt/KRDFjDl2sI+Sq5RUaRmSmdTKRtbmC4nXWXf1Pw==","shasum":"a921ef7f6fcf4ef42535b241b56d8047a1c6f9b1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.11.tgz","fileCount":190,"unpackedSize":2246677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHEtDCRA9TVsSAnZWagAAj0oP/0TYeZWIfpPMoxjGRlgr\n7rEk2p8gaNFnxomzXd3jw/8qOZ2WhLGcWdSvLppEEo+SZA7DnN/MfpbV+yuj\nOwh5PqMVx8XNVT+Ayf45GlyBgxR3ZPDxmLzZt1m/C1ATQHxMjX/yWBDUHm2z\noS1crajws1p+Y3I7q0lOK4LdhhqwH8qbpJJuMqI/kcV8fFm5c54xBR0hGD8L\nOYtsFOPFHiV7RL1i5eEvyAopo9+IMi2Qgvbr9eCflIXsG3ZLbbWyIuNByH1V\ngmq7dC+ec62Y00PPX1Hy1TtPwV9WkIfwWxBenrvzXQZ4d2nJ4U5s9V2vbbqK\nFe/P378hO/PWf87Gx2YemvlPZ6CQUqRHnI3nRLwV9vOEqXSSblHuvGDo5H4H\nZC10KCmipuIgnXuHIg25ge45Qup0pHyR9zb/hrhntNgGlan93jSG3pG1pgDu\njDPGhpzgnjrYcScrnkJn+K+p+9rtEHImmldVEwQAZlPTGtOc8jO97kEtVS+S\n17TpMkFdXDj3AqYl4TXJTd8SJcNBwVgQ8D16exv6kyviu5Uls4mHne/UGPqt\nGqI72uA8EcfCljvsMo1xuyMXPhnscdwA9j9KF1ZvAqo+S5ly3yDtHmBp9LDb\npoTnASHb3TLSAsjwOdI69rjNqOs+0Kq4ZciIGRZ0Z+zWdAlyUgr4cEbpnPbo\nbfNt\r\n=6cfF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8qxWtzQIQ1fRJaaAWMSjNi3aqFGz/+Sv+bKqN10US5AiAw7fEPN/k1wbh4MiYnxItjbayM+h+7Bokwx/EYM/GGdg=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.11_1612467010845_0.6435849730931735"},"_hasShrinkwrap":false},"0.38.0-alpha.12":{"name":"minter-js-sdk","version":"0.38.0-alpha.12","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"86b1e2c9f197f3891767ba70f2325165416648e5","_id":"minter-js-sdk@0.38.0-alpha.12","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-+3agb8D5ZboqRi9GA54S65gKs5shzVIO4yu/vt7k3gvanJ+5pTTBVlJy/2NjxMUIFe2BCdbZUAxKDDBWFYeZHw==","shasum":"3db535ef40ea3784bf9908c7c96349dda5957ce8","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.12.tgz","fileCount":190,"unpackedSize":2246749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHFOjCRA9TVsSAnZWagAAIKEP/1TjOvg6HPVE6m34wGJl\nVnbT1JyGuv3akBpWmNSlIASlvUAIg9Uoosaa/DLZQiIVtKepAnnJPRFQfBu8\nlkr0wnBKK/yp+Y3JABFw7hfs1QuePqnxZYNEtGBsR2gCOACOINAluueCTZcL\nfeg4nbqQqI2ecHFTPCyfOOZ60iNDC8/2R1iwpHyG6WqmCKPwBKvVXpT8X17s\nnxJ3c0MGUJNicudmEc5/6xy5HSW/+o9H9/iFtLuUmp+nSr4vNxGtnfJB6usk\nGxjvvxdlRu4/ZU2BG4WjJn+OX7/DganAXBUxQONEdIdEZSnGdToIp5LnttNv\nYpIDapp9dwV5eynEpMkCGw31sCxTCAxrdQBNHrmLC5r0KRB355tENbjg9TQC\nUJeef4I82U195mcrOqfH8LNooF/TQQW49ujoWYpGGZi2sxNAm9YZCjaapNq8\nJ9S7nG5hyOJl3DK9TgJ8aATn2zOoCXV3wT5aVa37w59b1Dozw/QQKDpZAwK4\nxcMNg4e7FUurd2L2LyUm7lAYbtGq/8hnj1Uk032BKzXNTOgtkD7b8riIQiTq\nJ+cUl/Oy6UkDBXW3PX6RNDfLjkQiNRDB849ayABe6eIFUNJ+ipd1OQh7Cm0+\nB1v3PqV5i+1qSoyfze95suU87DKv16WOyfWHnrfOKc2X4dKDJNGCwTQ0BaNY\nlS1k\r\n=f7dd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLo2jkzWDLy3CvCEkSi8kybs0cZLwHqaDcczC75J4CqAiEArOqFTUWwQWh2sTbG7lJPiFGTnb+mrdQNUMoCnOALEXg="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.12_1612469154623_0.968323361956279"},"_hasShrinkwrap":false},"0.38.0-alpha.13":{"name":"minter-js-sdk","version":"0.38.0-alpha.13","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.0","base64-js":"^1.3.1","big.js":"^6.0.2","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.15","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.1","@babel/core":"^7.12.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.12.1","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^10.0.0","babel-eslint":"^10.1.0","babel-jest":"^26.5.2","coveralls":"^3.1.0","eslint":"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^23.0.0","jest":"^26.5.3","jest-circus":"^26.5.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.33.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"9259274e3b65c2680b7e1654a9be594df0f3b23e","_id":"minter-js-sdk@0.38.0-alpha.13","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Rb/NNN3jZCdcBCyA6i8Ht4Owx9b3zimBXR/groISYY6+GvgLMCNNalFZ4baLcCWJeFUugZ9/g8AxcZb5V7mVow==","shasum":"fd2871b5ce3de88589be4c11a4430625c257f0d1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.13.tgz","fileCount":190,"unpackedSize":2247049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJXiOCRA9TVsSAnZWagAACTgP/2jnzlXV7TgiQhrSI9Di\nQgs068AcsTGPexREb3gWyU++JDS9TIkqwOzH8Ai+0XhKHlBDodPbm46rwMna\nt7QRSHvkITP/qunhy6PPdNqns7/02fy2QMvmbUn/isawUczRSsy/uXZfYW8b\nC61muyvMrKtO/FDmhR7LOATValdeE4Dm9gbMdJ5jIDwESLo/ynsv7Dph39yI\nKzOSEgpUQc1RBV+PUOnWrOn+RG7kxrjXImS6S8kE3+yaD3rjPDlDaon0THnV\n6VpVeRIT1xY8qg91Li3DW5A8FDeqnmJbb+N9Sk9SbxfTHqARCz3BCT72XzyA\nRz99+UWZBqaURjQ8vm2AswHfTTq9RYtpAa80Na4NvPh4cPfuU+WyDU4dsnqZ\nUTv8YeUDHzWTJhX1Huna+kP7VT4/HQ3xsInk6+zri1FXN2YDxeSt3BtD4Fbb\n7867Ufhf3Y1WJX4xuBGHxf97+jvKqxjpZ04u23y9tXXh6YgHP6CyMCZgWi5E\ndcg0o2KhPV70A/8UMgyKBuZVydgXzEqCr5xE/gqE4js+Y+WnvWBZWC7ux4DC\nBhbK0tMXSqOu++k6LbFmsGi4LxnICP1FJIeSHQYGktCr/LTPxdUsBomjIbix\nvoiztFLDhneD0iRRRg08cTtyNb7nqH+cvoGUjj8EXP4wxAagxNYBuji7oLsJ\ne7CG\r\n=oKZK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKnfkSAMadESjt88IgCVC2ez61JxTdyjFsRGggcchsiAiEAksqpXpttrdQgAfoh8ip+Wmh53nIBQc2+zgXF2nxCUJw="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.13_1613068430265_0.6223826586897601"},"_hasShrinkwrap":false},"0.38.0-alpha.14":{"name":"minter-js-sdk","version":"0.38.0-alpha.14","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.3","minterjs-util":"^0.21.0-aplha.6","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"4094090e2f12a384d0491585c9383d0a61499404","_id":"minter-js-sdk@0.38.0-alpha.14","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-bbNRpyDXdVCChRbaE25+OO3b9qh7+bKo4Zc5rFvkR62UN4JORWv4f2f0KrudFdI5ku5rsVk5/PDF6zGYGdk+Qg==","shasum":"c42f936b32a6efd9d3d43f9cc4f104cdc59cd405","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.14.tgz","fileCount":186,"unpackedSize":2247928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJtjrCRA9TVsSAnZWagAAIdoP/3TMqQ8eMxYQW0xOkXHQ\nH+pgfVb8Fi/5hJ2nmKcqeSgT7HXezLqd2S+Q+Xf9rjImyCU3Y+PI4pUXfsNB\nWqv9hbW/QK031Quo+HwXq2PfWQavs53299uBu3VwA1vmDtKyoiTcEPjzbLi2\nsJ3HkV+/uPoDVRKB7cgVk0JHitUKVUWV/acI/otKVB67uyLJergZ+m4FrycK\nJ4ltK+Irt1LXYdvIQzfm9SFqYAfGS/6BDrDTzf4EHL5BQlY/9fyUA0CvMWu0\nlEwOfsbJBuAuMmHrC+VbyugC79EaPM04Bom6xW6QoFU0/d4KRuEKkoJsLnAx\nBE+S64fjARPk/BBtaHmzAR3mptxRX2/60+HRu/olDYV0Ziz0sQfCijZKp17/\noGP9T7C1Ec092cumrmMa7KxgqnZ8aw9t5dkIUHYID+6ucGS8SAgZXIgtTnuF\nkcX7vdrD9ewBZ3xY7XhTf++mGjqLXm+5v8cSRh50hvfpGtqIjDfLyZyspFId\nh+ZbUI8iorZWMQThLhEDaNaBGbZDUpMy7sCzENEmNgsFlXrYStRXPfZVyid5\nFewp8RqCoXvZTqP8LdTWrrFruLiTvFFvH0lBIJTq5wGEjYXfFQr6KniLzVNo\nKRpHfAEO7R6LWWRSZD/tmUAUnREU9OeR5nOfSrpsSCX+os9Uf7z0uO9pC3XG\naNoj\r\n=NvG1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpkFUa/EQPKbwlGhsyS67bELZYiEK1d8wm/buSdkA7HAIgRpPMti1eF7x2VF9lCAQLH1lm8POiBlch2Sjt7EQ2Q6g="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.14_1613158635236_0.26368816772258485"},"_hasShrinkwrap":false},"0.38.0-alpha.15":{"name":"minter-js-sdk","version":"0.38.0-alpha.15","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.5","minterjs-util":"^0.21.0-aplha.7","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"be7dd0e98b7b2a9a879cda3ed458ed8da2ab5bfe","_id":"minter-js-sdk@0.38.0-alpha.15","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-MubVKtcUABD6UiPj+cR3uwfdKQd6m2tJ1eIdZoa5dJ1/N3sgMKMacvs6pWFa7ymFwD3P6WPzH4PAiaSjM8hOsA==","shasum":"d6b35e6215b9fe382c77bf7b734df7d275c122ba","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.15.tgz","fileCount":186,"unpackedSize":2262919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK6k4CRA9TVsSAnZWagAAf+YP/3TYBhfGAst05xsMLhLd\ne5TWgkj+OkXfldQSIOnF20jMQvmxEBAgCAqPbnglgB/pUTKlBF6U4Zj7tMqt\nB4o6WLb3Z1iLfI+Wi7FwK1E0IpAAy9+e0Xc62bLcSnoaPWKVUXlqx+yfPDqE\nw84/eD2I1tzWaMPOF12W3PXiNVLCFUq4MjTX6TGMiPX1T24njM1Nz7f+14aS\nkdtFQkLI9N651J57Yxf3tiD5Y/K5jhjR0FHNfdoi3IuhY/m4WVeZLEsgTimD\n/TCRMWeWwrftekgF26BY9gBz9QAaD+AjMyf98xn8bSaGMAwy+p98j2Gd4IJP\n9iVFQEuCkiNbCkCgcWC4S0q9BQunSbgdGOoquoq1h5Esft9dtu/Ne61w6CoK\nJlIXquDq9+Jw/ncGR9x+y+f0QhDU7MItn5decuqzXupxQN8GlOzIbn+rDQxh\nmVYAunAYxydfrhVIhhf+LSnxcs9KsdqlQvOv1TXvr9SC0awzhfIiKQlIocrf\nikA4EWCFwkyqU2OwoTOmK0kio9xtQmchD/+65oB4l66TJ0dqhF1l/tsT2p5B\nstXG9XYHfLf51c+xpLEWAgnAd8u42HiVPe7D0w1Ta4Dljdolj8Lj5+MBsOMr\nRUH7DsYNbTnvE7V2QYnmpZFlXxYKhq0nH6hNblnHAl7JlzoHIAJAxktqSnSy\nsvoA\r\n=WF6z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPZgOwJJ9Up0irrWi8W+JSNrgwHUGA6277QwPYSwFHFAiBfQtSuXIBTdWifJe8NGVv61qUVMdm03Bn5gO+e+lMGbw=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.15_1613474103295_0.24423278950456107"},"_hasShrinkwrap":false},"0.38.0-alpha.16":{"name":"minter-js-sdk","version":"0.38.0-alpha.16","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.6","minterjs-util":"^0.21.0-aplha.8","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"16446b839a03e2865c8946022e9dcacf71f8ed1c","_id":"minter-js-sdk@0.38.0-alpha.16","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-euOqvNYSf8hH1ekjH3u2f9hgZWfZQW5pfJREMAai2FlkXnFP+y7zPulGP1w/kwQ2fbUr3cVOKxrbn8ZCp1GbMQ==","shasum":"93008652c9426bcb65a0f2ae2021293877f2b000","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.16.tgz","fileCount":186,"unpackedSize":2248927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLDYMCRA9TVsSAnZWagAATWMP/R6K4owvWWJ4KVynUczu\nzhBvKH3MqfRvRBFRScwO20gHPoEhCCVyfUQtxXoTLeqXMVesnTpvz0f04U8c\n46yJD1MADhBM1ZyH98INEdLqhgR8mdmv6W4sn8ICbWqOKFY1pgqg5Z+fqqpv\nWlT5DPkQbfrQgayyjXms+NjhLc38MMmeghMRNSz9jarZ5DUKIK5W/mcFC7I9\n0KItTxiA6H2oH5HRTqnBk/3p73G35PWdBVD3nB6SbteWKutS/g1DjEBLExSy\nW4ZMdIHBembRY3mdQhL7UbaL9p0eaDt5K8Sn/FrnLME1KjGI1yMAhPkV0SA+\nmaPuLla3n1n7Yg1OdLB9eNXiXVnpUyJPG/UzIivh3nfXheOcjXOHFo6ikBQW\npndLxxuAsRFxFreqdN0caDIfC8q7cLMeGnEBLTMep5Z28sk+octXVZ23vpEY\nHqaPCjTrESkUkJEEf7Gz/8h/cN1bgNugWeVqHpaMfiMB88RvA6z2C4O9xqAF\nytye4kuyit3xXXrOOm7dqg505yxmoLK4p7ks2kH5XRENpruFN3SkgptWb22p\n+53dGWOY0RjR56pNoSJxHWFh+2ZhJfYD1+56FOjSbrLZ0Ag62ROPoW/q9E8q\n/fN7cT/7l/kQIsfmF/0Tr7fRXiflKhjeF8RqzRF+tCO0f/vlI/nFkqVXKbzY\nPaKd\r\n=gm/L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFRapcui8GDiKo5dC205Up9EDWauRh7g1m9V61xlfUQ1AiEAnEg1iixm1WDn3O1dL/eMZXKj0k1dFNMqu17V2Qluz/k="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.16_1613510155434_0.8528365178835122"},"_hasShrinkwrap":false},"0.38.0-alpha.17":{"name":"minter-js-sdk","version":"0.38.0-alpha.17","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.6","minterjs-util":"^0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"830a900262e869b73854cfb74d3b30b4022e82ac","_id":"minter-js-sdk@0.38.0-alpha.17","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NQxuSOFruNITfINzyVHCUB3GUUzBwTdejFecTzwlHdY/sAoDR00ShVGdx1AXVA/G29Q/DDPp7Eqp7ge8QoZVBg==","shasum":"eae99fbe1efa4f891fd2739d160dff1f0e7b61ad","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.17.tgz","fileCount":186,"unpackedSize":2252545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLSctCRA9TVsSAnZWagAAu7wP/33k53C4y+buE0azRJo/\ncKQYz5VEemO4ZlN/zqbm5IyDD7Fz//gTtHr7zuJnXOsJkpRi6pZWeiesd217\nl5T4N4uCcjIkRdu87kPxDEGANh7sNjikL3tD6GCvtDFQa69yFZMBgH7n/cst\n2Tbx8bXUJ9bVf9+EyVrEApUth7pVmTcH3w95zYmt/VAMVIoyLbXHsUPVjgHK\n82n7Ykd+YIIhtITZBQa+/rx6ycnS1b1KCxPaCtE8o40J4TKg9ZflGN/eZUAF\n28bjKIDxBC99jnmG9gDxp1xOBb5noi+rYq6/elkLs7sn9eatDUifR/qdExU8\n21cWMvuedb/E2So6b/rvjeoaVfRjV+aMDLV9rq8cmGMVnfTqiX16I+kIg4aT\nWHH2ziUI2Ltkzb3R/PdyJWyaDjFxz8wuC2LrwGabs1PMHJ0XT/pD6KmyWSTv\ngXHJTV2g0MW6/zVoAdmD4uE8LtE7WbTpr3sfJa5pmXa3jOaGyO9RHszsK5Wv\nABUAKq9Y+Pk3rpCuJfpcpwNcasLKadlW686jB0wjSPMsGYyvDvi7WpNpR8GL\nQ9tqC7CHK4pNoPMnzqNyAlHHSmicy5az2tA7tVAnAPp9Ufdo8AAjkjxt/+0p\nqWJDUkAurgxx0lACyVaVVcWLvGJ+TlSxHcQ2+Er+8wOKV6RH2tXxhfOENQWO\nO/3f\r\n=pBv8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3groTvqwbTi7f6dwWO/8UoWEpQTsJMlhNtEacbfDNPAiBfNKnnCPpXT84hk+xnBxGAGhU1Bhtoad0/V32Seo2Ubw=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.17_1613571884464_0.9723811543406604"},"_hasShrinkwrap":false},"0.38.0-alpha.18":{"name":"minter-js-sdk","version":"0.38.0-alpha.18","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.6","minterjs-util":"^0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(txParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain\nAccept [tx params](#Tx params constructors) object and make asynchronous request to the blockchain API.\n`txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.\n`txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.\n`gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`\n`mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain\nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.\nAccept address string and make asynchronous request to the blockchain API.\nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).\nAccept string with raw signed tx.\nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.\nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"18f99f2bde6883ed4c8a57e5e7dac0e02c296638","_id":"minter-js-sdk@0.38.0-alpha.18","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-8OiwhONUaBv9uyPx5BmFSWrh5/Whx6n/8Xt4tme/YdPzqPBXA3SkdSDyENYhfj8iFCJkOIZqP/KXuMVHQMY2EQ==","shasum":"18d8a40f13b27694f19b3a1dfdcfdae93506bb8a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.18.tgz","fileCount":186,"unpackedSize":2252357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLT9rCRA9TVsSAnZWagAA7dcP/AseYJY5L3Z/S64/U0VM\n+jZcIMJ2v6Zk5IncsyQwAZ+oUH0skriUogMm8cCGkAuZy4bVYhAUCLNau37b\nb+TjSDZNcfs4veOdSM5YP43w8Sp+W0nHVtuoq1Sa9RwWbN2hHV9DwtljUAL0\ntcSAXmXXsCZ1LRHutIHGULVPGxarndA8CqS4Qbxm7060thZ3jQjPrlT/6wYA\nEW2BbOmHrem9HhzngQNoEVth0xW3A/umebYNBKLgZ/6KgDWVzYYzacrYaSAj\n4Kg0j0yWtpcYdAk2nI7tdalBczvtonMxxs1N35vZSg4mSVUoX5gJXHocUm1V\nGStIRtD1TE4iZopHdzm6TPgqMpwfm5bWWfsRWtpRUSa/r/pHBb2euSs57ZXi\nhTTSGrGE1raRiX1sCS6hH1HdLBBI99GtBKDDlMjiYQYn3JG05sh+rlBDTDn7\nS1JnsiHl8pgjkNf4tt4dmkT/fdC8UroG1olQVBgK7mSMwrfDGg+lyGqaphHm\nCzC+/9WTKM/FYnZWAn2NUSufOX6XeYkfpMzJBwbiB1ELGbc/C9+BVgXg37nl\nongYLVwcKHwz4+T/0t3g6Uy0iCi2vDMfBugYmnGA+BQxhpJAVhkTXqsz1oX2\nP6ui4zB5W6lu6qAP8aoJGuBaaiWha0rUMTrLbIyf8MLQgDgxoy/VNiLRcmNa\npn/R\r\n=zd74\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPMz/M2NXvkOVEUiaBeJUfPy9HW4+PNAwD9mxjN2eC7AIhAK9IKjXgVdeGGh+HmeBE4OaZryCXajrZFptqjQwL608a"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.18_1613578090918_0.16971510548179114"},"_hasShrinkwrap":false},"0.38.0-alpha.19":{"name":"minter-js-sdk","version":"0.38.0-alpha.19","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.6","minterjs-util":"^0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"9d51294427adef3c916177fe68241b26c20773a4","readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx.  \nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","_id":"minter-js-sdk@0.38.0-alpha.19","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-L5EvhJAqxXaUy9+5Wdemo5C8XBB8MbfozfySPAWQbDnr3y+sys1ghnOxrr1xzYAZNIfMWkPdYDxGSrI1lj4cdA==","shasum":"f39ec2195e5bd95e7cf9452d3c44e44a7982285b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.19.tgz","fileCount":186,"unpackedSize":2252674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLZD/CRA9TVsSAnZWagAA8xQP/jNECRs6z8OFA/KvNF72\nKckDjMBXN7NJyYbhTsRKmKja1SaOjSDt31lV6j694N6pY08ulg7OXTlWGBUn\n8TI/AkD6P9mlRnvCDKUQLc4i4mDE80yHKr/sbSa/8t0kfY1fLufzWO+8G2Lo\nu7EnBnyvOdYIlWWibqW330vyBKNgiGwGus9n8MZzhepzBIsgPL91frjhrqL2\nSj2LgZzLQ8uOZSpVk+idyDScEyergGm+wiNwMnYUhFMUvrJMKDUE3ffBVbMW\nreb6FCqYIx3IWN5rx/ik3ayf2OcEc8Q9bicPWGIcH9CPhsQ+LM2pCk+DMAbh\nj2RHd/UlmoZ9k3lgTsKRPbNKdoCWnhfgCnSrRey/90n36YM9j+prjXTjqNsp\nHn1UdoDqSW7EKcRg/IMTx2QygALkfUhI6HIJhRgIxMj8PQrBRkFbhTvKauDv\nqBcShLH+U2CtalTTC2bmUg2w1EzsBc/61/XJT0jZ645tWrTOMo08z9KFUFL6\nSmp1HsJqybtT9sOKKoqe8LSv3IWMlWBpk0ErwnNF4wEvyADGnkMevVhme6JD\nIdvZeB8CmYeo4EiwYEydlC1FWaAzzY0Tzi73ldCmrUO6A6K1kW0AiX6lmrW+\ntysTj0V7en4D8UX7c0ugb4GlQw4WPRH2GFxtUodC0ZiSdEsFBz3kI9+0Rlrb\nwbLV\r\n=7YXE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMCbapMVajjVyRUvi2fAouqp/81VXYSOlRmyWiEoFk/AiEAnlpF+3/ksBCEyra2vMfu3qFbaDLwhHYgunOTL4ThMSc="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.19_1613598974411_0.9583844602995695"},"_hasShrinkwrap":false},"0.38.0-alpha.20":{"name":"minter-js-sdk","version":"0.38.0-alpha.20","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.7","minterjs-util":"^0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx.  \nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"a87db9b78c86966bd52c952bc8d3216362887947","_id":"minter-js-sdk@0.38.0-alpha.20","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WWTgONqtrbskRZv0CCAmvEYXsYvU/yA2WmhceE8nu0mOr+wUj1U5R9Q1LNTkSR2RKxvaKscuDf779xI5p0VRuQ==","shasum":"d6e8f2b15ff0d2f2ec5f9b36cb93525cfd191e1d","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.20.tgz","fileCount":186,"unpackedSize":2252866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLsqQCRA9TVsSAnZWagAAiFEP/0vk0l8Tlzt7cpUIAbmf\nM1amltNArkmjFlo278mrUEyoJhKHPLnygbe3qlzKYbQ4Dz1e0RM2A+PWW15+\ngYxDqOByM/+eClUu7xsXkyRyRLPy8wIPMM0e39CEd9hn7XLjHZf7KSD9tMSU\nCFLUGtqSd7COtDpZBrf42XJsW9+J1kR4eAUJO63CWlqnNVLn0y/4GeceMQ8N\nEWN8VO4SYXOYz1m8XqTA27+MF1V0nuOq58G7e25OS2tQyfw8qT3ISSI5CEe1\nqYud5uVe2jRc7mRUs4HkhHAXlXZgVxAjli9ueqfeqLzZHZjUBS7TNoa5LfOT\nN4xSPwHPDGXSpUGFcZZFH/JPcfZzRkT01IwV0rAcwZD+RJbJE94WggMd6vL7\nQOPqU4U7EmapqG3KHmmuyy2HtYU/a+YLtj65ncJ9yTsZ1iqPCpGB9R2aM372\nzlGvdDHFYewXpU8H8Cp30uZD7ScutVuD/Z71LjBjDlXUfZo1a53QV4P7inMs\nLbudjX/AF/lxanYAUT7eGoZ04wmHlO9TXOgKPb9KyV1+EtVF03PegjpY11pf\ngcKqEblQ/aJOY0LPTSOtWeEsjabX5PPw2FgRPi3N7Zte9RVWV4TMdOs3JWBL\nE3K2MFi5Pz+oq+H4xDMAjP+CXU14N2eOJPX0VkM9Js8iduslGHSIGsBH2byF\nVKf1\r\n=Sbaq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3ostJv2+Edo+rLd61akZV7Evsp3P4XtZPAMwN9RK0YwIhAO5OeMxqCAl7xOvdyNT7QsJ6v3fdJi59qgAm7khbbe6F"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.20_1613679247833_0.15920301448311291"},"_hasShrinkwrap":false},"0.38.0-alpha.21":{"name":"minter-js-sdk","version":"0.38.0-alpha.21","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.7","minterjs-util":"^0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx.  \nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"4c1ecc2bf52f86f5aa27dfeaf9ac2fe41085aa5a","_id":"minter-js-sdk@0.38.0-alpha.21","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-U6zwgTYy0XjLf7TCfl57UnpK4y1EQu6AEXPv6kZ+XPHwXBNra5EHlZVK2vNvAHQZy/hLjYmJyKtIE0HSBem7gA==","shasum":"90991d01327a35fe4cb1f8e4bf4e6fdfda4b6ab0","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.21.tgz","fileCount":186,"unpackedSize":2253465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNom9CRA9TVsSAnZWagAAZV8P/3pBASf290D805IQSJFC\nwHhERF3FV/i7jqhV8ViVGRtnhV/nCGP5PDqGJt5l3i3Fp6dxtG4YZrw7Fmjf\nQjIcdzKlMB5uTUYPoEazzplbYazGuc/q54msTeFaLXnb1yTXTOfmk0Uavl3h\nKE9lMeQiKJRKQ87e5TrsNNDTjZD8OCqQNfFUww+EaPn0T/QYSZgvXORn26M3\n4Vv44orRvYWGnYMBU3yKvveq6Q/wc9Cv9kq33mGL6M/QzDYRKUExSOk4E4U6\nlTj/G3R37pDEZcjyBj1Qm4WtX1yQ2bs4og88hJnOPUx4+VfLPpBXIYKim5Bm\nIFzjgeQdJqd2OIwYmMnip+dCwEvOYAlv26OdTJT9hmsK75ciX+CGnXKpWTnS\n2GQKVEEH0lj47SFCqLrkvYvSRMwEfIcmtP150GIAwdY0oG8LOHK2b/mlWPC2\nE4G+810GXPGkPNUvP+h+OcMJ9bOSekHdE7MS3k9krYUbVtII5iTQG/iDyNNH\nUGXEbsCN0jIMBj0bnjNI8BSqiIlwHvZgFxjIS/p2T2Q/UvkegcuSdMYED2P3\nkwOjvnTku7/FJ1HY8e2u2L17mbpzInHNzUXVfFRevLd21aleanOxdknUIX4q\noNtVZzmaEs443iQAC/mZ6J9A+ePKgyR/b+khUTbB40OXM69UCsrWqhMeBynm\n0vgK\r\n=Nvar\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEohc6rXAWfbVZjuS/Kv8si84p/a7rTxOwb1EJnTSQrtAiBqNgLr5bFHWwYzM8+vfFdlqc4CNJC62u5M7HyYMmdRLQ=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.21_1614186939262_0.07615332909607808"},"_hasShrinkwrap":false},"0.38.0-alpha.22":{"name":"minter-js-sdk","version":"0.38.0-alpha.22","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.8","minterjs-util":"0.21.0-aplha.9","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx.  \nResolves with commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((commission) => {\n        console.log(commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"7c759530539b17935671ac0db7e57152793ac32a","_id":"minter-js-sdk@0.38.0-alpha.22","_nodeVersion":"14.15.1","_npmVersion":"7.6.0","dist":{"integrity":"sha512-rXZ8SF/EOkR8jHhYJF8amSEaXdZF46T1BgP876Gzmx7Mx7ugf82Bg4Y6L6FJWSZRm/0DJdPVfmtcMz3Ipkgojw==","shasum":"8b4ba38c9da79f8b1a0c6095342ba88cf314b499","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.22.tgz","fileCount":183,"unpackedSize":2252090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQiaXCRA9TVsSAnZWagAAvL8QAJJ392sKcmLElkt2C+j+\nLyeDgHkX479O3g+TvNIOGwZIEnyupcQGfR9NjSr3GkzQ+09X/4lGNdacMStO\n/Tvje9vUCu5R1bNDZOCk6aTDLSuOW9OA1SxIO0hSYYNWCJ9MfOsBR2+T92oP\nZAvrhxS4k6aZB2sdnYw7rPCNVf1I82woEZTbmZu0Mz40RqiAxvEG4adtIPMO\n+I/x5guUjEniRxk9Oox75um5oIYx8hVcjjl/a75ss/Q7r5j0spwwv9ApcAcC\n09jJOBSVKV9VYV3NZvt6XTvEk+UpeVvLi/wfUKdtzEmmeIaGXJ3C+Xp4NHAd\nWY+viWALG2LNH9av1nHqsIzUD9+qLT9+oSkg8O7St+gMssv1aGa6qdxRY0lt\nixryQB2vGi+k5MKxV9DdgjP/J3BVZuyO9lAWEdmqN3qLoKTE154fUpb7V71I\nMw1LPzrpbynbCF3o2c7NQxBIitRqAryJMsQxDzdAb68yr922NALZ8xWt32BQ\nSoagoWlhkob/874LE8ohU6UJoX7jOTl8DJ+dp/ZKS2YifldZGNsNDNTYR/TJ\ndo0Zf8xjqurThtk+yeskhCKYJ0zaLcIX21+xQMozeEq3CgFczX43spniHbPD\n4S+IuFGQ84tsct1dRDdrbZKaQjYiF0xT75M7e/MACTWil37ABD8atAyfHkil\n3cU3\r\n=Sbkf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIByJAPPK1vDTZstHlkOWxupvoYSdHUFqOkRjlEKzCEs6AiAoAOXcgmB3ES7BE6cQozK4cfw02vRQl7MdZ8RR3dV0fw=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.22_1614947990581_0.4511558425421871"},"_hasShrinkwrap":false},"0.38.0-alpha.23":{"name":"minter-js-sdk","version":"0.38.0-alpha.23","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.8","minterjs-util":"^0.21.0-aplha.11","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"41d558b6b0009ff55b5f3825b148b79021645ad6","_id":"minter-js-sdk@0.38.0-alpha.23","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-cNYohVWscjcUlshiwocfOTGTy+WgB8tXpSM/bNVqunFsiHEfZcHmGxMUAfKRyDhoyd20df+M+k66pMW7amzc3A==","shasum":"b7e4ea92a96a99c99155f12f9339363c6f8aee20","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.23.tgz","fileCount":185,"unpackedSize":2352580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRgI3CRA9TVsSAnZWagAACngP/ihxU/qZnGiLFfQODPFN\nbTYQCp+jDi8WfqLb6vVrGJx6mMXvbDStLcgQdjH+5H5RISFe+vack7t5ITHK\nkmQR1Y6rzqp5CsN6POutTxFpHTLVKe/Bk08wqWU1z9409MB/+MDPsJboDB41\n6bcI5uF9FQL9SfN6z1yEAa82LYl6GM0gcyPTX/aDV7HRCs91QV/09h2Ty6B6\nP7v59OlO6u7qWVbAH7D9WQIpz0RIMEuRluGxbJ7ah/bz314ne3znfv/xnMv3\nnj41d9jDiFW82r/tFms0MwTNlyukIfXw6is7taw/fKxnrZjsW8NoP1KZgygA\neyeKcjYwI8QWxwScTpxqHN6hcBUDaI5SCjdVEPXyC4pUgutUF9N444pcWTge\nm7uEUyGNsSlNUe7GffSNWfX52Zp0qJUeJmxxZjJxL1R71WNsgQ8Y3c5w1l6v\nvYd64uYBq/GMUwnHQD72luH64+OjD2PsMBHT1zliMZKeMefODw/IcwrUMOiT\nRWawNozHHWePzVp8mr9/RRya9/lAkC+roc8g5noYJgCqNJ2e0cWKxcd8KnFT\n62N8bdEEbsY8oNRa1AocG9lv6F167ga+AMNrBR/a5VuTn2Mi03DIBspuzkBl\n9j7DI9x77B+9+0Kd/sn5DK7tY9Iq0R1Wx0DSr4k+nWTib5UAvFpVyp6HYbdU\nZ7BW\r\n=Jq57\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/c1T9eCiAv38gB3uloPUkj/4lUxFKkq6EulB+aHIAyAiEA4H/Sy4/td6/zIvcFR9281dnappM7Qff/4VSREj2iu+8="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.23_1615200823420_0.6305809007698617"},"_hasShrinkwrap":false},"0.38.0-alpha.24":{"name":"minter-js-sdk","version":"0.38.0-alpha.24","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.8","minterjs-util":"^0.21.0-aplha.11","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"a9a6bd73b6c09e6d0060d353c229ce167d757628","_id":"minter-js-sdk@0.38.0-alpha.24","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-vKd0rmm37PH/RhrCQK9H2l7FvJacZU7MUuyci62R7GJubQTocg3QG0hgMqC4Zhqq9DyhQeHtHPIxIIjp1gpbVA==","shasum":"a23b60121d5d857e5e53104ce688d6d3011c22f8","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.24.tgz","fileCount":185,"unpackedSize":2347897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRihqCRA9TVsSAnZWagAA/+8P/1am+Da6vw/DefA+Wwx3\nK+80q4dCS82emlGtS0ofSUW483q6ZytQ7w4Jf3ZKE157T+nbGM1rOO+mP7uV\nkeWl608lM26N0pu1W3D+qUr8AF4bSBIRCytxb5rRzZMLqLl/7mWBh3J4CVdF\nXRdYuvpphz9imyiHg1aHrVKq5OuoYRNGm9H/SLNV7z+N8QWI8bqDIORfXNQL\nrpNJqQtD3OLsOi8geMzimYoAjZDzx0v0HReluJMX/fd+cpxfCS0x9ayQ6Neq\n7DFRfVZ96Vv7m2VqLYrd+P9S1stA3SpPo8+2h7ZIniFp4NUNATnIyWFn68fP\nKEy1vfY4mN2eIxp//VI/vG4F4edcK7HV2991z0EKfM6O8IoVNnKi1vHU4w2C\ndXG2MYNM0sf0h0vqgZvj6zA4KKwnrNmbzAMlCMwCij64LBOdN/hh6sYY6cJ2\nJYN0C+5hDPZVVQ647Gaz/maJ5iBv/Y4tXf++5HFvXaJlSaHX36tGsZOGE0/Y\nNQ2tRz99rOdEAMTjj+aUGkIqQjqt063U3GaBwhAm+HJspCYKev36i/sdbRaV\n7SViUWwvYSNO6ofEpNhf80v6fcAVosYw0V0wfA0sBr9W7i9+YVOPnOhCdyqK\n6teJuYd2c3SNrQ8nUZsXpfdkRDdfKJkEdk05fjSlL73Dz/nWS/v/BPpjFElM\nZKCe\r\n=YD1Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHyQ4NOEFtDqjtHh5Lz/l8EMEkyWnRoFLLxFlntlhs0UAiBv4W9m7jVUb5mgP/u2qdfia93RJdRHGzyPjpXnveF66Q=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.24_1615210602182_0.06803859565626302"},"_hasShrinkwrap":false},"0.38.0-alpha.25":{"name":"minter-js-sdk","version":"0.38.0-alpha.25","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.8","minterjs-util":"^0.21.0-aplha.11","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"4c93160e14e82bae73828ec1085391571e7a6ac5","_id":"minter-js-sdk@0.38.0-alpha.25","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-M6Vmw1zWStfVzuu/OY+lzO7cIho9DwlOnw2nNdJskQoZapGTlt0lktbwD+lgoCfEmaEW0qNnn55bcFGKdY6GkQ==","shasum":"de5ad4c7c622e1575ba2d042ace2f5d99294163c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.25.tgz","fileCount":185,"unpackedSize":2349101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRlm7CRA9TVsSAnZWagAARUkQAKMwUdTwebG4NnCwtYRG\nBSN5ZAabFLjZYbRnyePdF9WzNExDsN3wtdHkAnjwwhlxhNlP/0S3pYDmrI9M\nfDGOVc3RfU55eP6OxtLc/ien0JwN5abS+Zje8yVqKGRl0tFBy2wbqd50bwY8\nz+zY31wFtsztBDTTr65p76fNXMEfpPdl+4gOO+SlTvRHp8axRwSGo/voKQtj\n3Cz9urKG4b5XmOIeM2IJfGGNBMyu8IBTN59LhEtThPKx0TEyoZ39TqgA11R7\nna4WbPkzNYqzTDHQ0YnPAFkPCNphNABDMkXddowPChpP+/gSxvi7dchJC3n5\nvABSo04XdXnaEhcfb+qhWfd1hFiSTzn5j8c/tMfI578GiajFaGcL4fzSJHHB\nfY7y3nNbb7D1pq7WjEygmZIvl185T70y1cpKSaAbVbjhE74XtSo+r94wgfeF\nzWXjcefgfb3vtCgcTC6+/ryEjjcPfaLR2uewjE6GsHckWxl1JRHaENZJ9e/T\nWRoQxRK4Ycj0OfLkEHTHnAlK3GMh7DRFltr6LCF9/jF6h4dk7m2KAECiAhn1\nKuQf/KH9ODsxZ5MuQlINw2UcNuEsQOrXWv+7zvR5NyutI5o0qODz9iYHJMFB\nvmkRdXjdRwhfRO21PeXNAHlB4DU//pAhVOsYBIHGDcRa3U/dig6dzB3DneoH\nesaV\r\n=ObbG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEWKSZ+beCF3p0ShPJQseyCrUxcDd3oUAb0QNbvUfSOwIgCXrmMAmAyFsJyxs1UmLKJYd+G1lRQmLamm2m8ndZdc0="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.25_1615223227372_0.8899610988957485"},"_hasShrinkwrap":false},"0.38.0-alpha.26":{"name":"minter-js-sdk","version":"0.38.0-alpha.26","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.8","minterjs-util":"^0.21.0-aplha.11","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"c552ccb5f787541d24dbc4681ab9537a05a69443","_id":"minter-js-sdk@0.38.0-alpha.26","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-W5I4O4KAPs0QbfLbG08ryH8t/7hUjFqIuyv0/2JppBtDWD9L3b3oHOX0fCjO0quhsTY/XOtvpSDXaMxMS/b64w==","shasum":"7964bc6850c6ceb9716a86dad2ffb8385ef86935","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.26.tgz","fileCount":185,"unpackedSize":2350123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRmCoCRA9TVsSAnZWagAALKwP/2wtO/YkQttdTbHbpNKQ\n+/eyoI38ddKGNA3GN44kdQ9s5DUXaaLWsa5NnaOKNta81jMp3305ooRLBIdU\nUubXVva8L1eBOJqxN6Ciokbj7FJgqPPz+VRiAzuq99WXHVVUDF74/oiiOhBx\n1/RGwvy2jk/nkoLA6Qn14T24aloWoLDKLlqP5QKMo6P4IPtCD+14KQ90gR6a\n9nZxiHc7qC4gsc7icfKXieYxLc0hg8GWGI2jD7l0JzukoAtwFH16WJb+nruP\npHsoaBiSCpDvUstslOS4fjVpalLpLV0VnPU35R8ILwgvwlhDxb9abOhRABHZ\nzSpHGy8IwtCOxkNW60+UT6GpAnXbbN1ZffRIh36ZvXc0S/onw2FX4LZ9nAPi\nA/oAakLeWB9kIfzw6GFFItQ5G/4gCHHoVc4Autpyy8izb4xjJk4ChRwJu/Eu\nLRx0tSDWIHCI7/sEfnd9HPibbt5498U1F6R8MgVxQVHYxgdcxJGex2Lxlynh\ntrKZWHvsq7CrJIrpzabXqulGPp8aC0GwfKT4wNHdR+1ZScrsus0x6qwCfPAA\nJos2gmglF2t5ZdylpH8jYuzam6G3dr5nb638h22/li2KyaU8mQQ1kUQVY0Pl\n8GmULjY3cItXNHKr94xJ5GUGyKbHscRhKVwXNZBGYYoW+wEJpm+SKVUGyF+y\n5ksJ\r\n=qAnN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw4kfYHAA9UQdgZmy/mEgzOccVX/o7Py4yo9PodqAGtgIgTe/V2jWRu47ld/fWVFeKlncOLmcBNsblh6lczAxzzmA="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.26_1615224999674_0.2824595221028894"},"_hasShrinkwrap":false},"0.38.0-alpha.27":{"name":"minter-js-sdk","version":"0.38.0-alpha.27","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// replace coin symbols in txParams with coin ids\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        return minter.postTx(newTxParams, {\n            privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    })\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"c552ccb5f787541d24dbc4681ab9537a05a69443","_id":"minter-js-sdk@0.38.0-alpha.27","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-EXC43TZB6f60nxxk9SJpJOF5IaLZNjGPiGXSB9gof3Z1IvA8C655HtCYl4zAMgM94K+HQKhrfIiNKhf4ugUluQ==","shasum":"2c9b5fa6e36881ab8d85f97e529eb34e896cffc1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.27.tgz","fileCount":185,"unpackedSize":2348683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSO2kCRA9TVsSAnZWagAAzNcQAIm4Z6p/INf3dQPn9e2L\nkpiBV6W0Fn33byW/6BtsF7XNfX6ERgu31h/+iybIogvi84lh6VbqRRV7G2O/\nAOYUnCdCUlnEVo1rFxxs2YO88P/YWN+ntWx+BPKpAXDZ4WtKSiSOnkiJkne8\n8jnabdO2cOTxmMvUV77VEmiq4pA6S6rAeq7N1xBQx6koOTKo2hGZ/NfMnobV\ndmc88aoEzjIpBmjX/XabEeGiIuo8mL5zhUrAB3P6G1oYfQeT1d9Bbh5QjNHL\nFmgPMKseXXzqEZWstMcnBNsRnJFbtRWPSXLWsDWHDJUoRGz5lkcfhOEP5nFa\nU8ukZkM7rWLjnAYW28bKW+gU/Zz7h6oU59SA1kEb3eFppYyRWu5UWHswmv5N\n0S+UbrKemHrL6q3o87llsbzp8aEyBCiYbPGMbcDUuILiWkIA9qe7MqHQ1nJE\nCSo0f7p6mRejjh3db3aUujneJvvu92c6bf5yBGZ5XQUw9+3SyFwNr1Dp+LVi\naT1GNiMDurCFPFpt1HyQhaohlFV5TV2UdCBw/ocvCT4So2jnVFxbhwkuBbWI\nqcTqBD0AAOmsMX0UguArmWmI+hKqUpkfXimdA0BnkNAfeUfolRkirpKUYylh\n/t0+GE1ledy5hjcOHu1t6LszfCCQTVUK7k5b17bXio8gj0bhS4zAnE/oxic+\n9/Ak\r\n=3Kpe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJM3veyKodu+cIi3JgGOrWBhQRj5DM/jhnK+QpYmVyLAiAXKNyI0oWnOl0cYsbEh1cu4vYMUXLm1vAfy/wdKSPOiw=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.27_1615392163865_0.11264470850023556"},"_hasShrinkwrap":false},"0.38.0-alpha.28":{"name":"minter-js-sdk","version":"0.38.0-alpha.28","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.12.5","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinInfoById](#getcoininfobyid)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n          privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinInfoById](#getcoininfobyid)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coinSymbol.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinSymbol)\n    .then((coinInfo) => {\n        console.log(coinInfo.id);\n    });\n```\n\n\n### .getCoinInfoById()\nGet coin info by id.\n\n```js\n/**\n * @param {string} coinSymbol\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coinId)\n    .then((coinInfo) => {\n        console.log(coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"ab8cb95646a0973c71af1e5b70da3073c1dea5a8","_id":"minter-js-sdk@0.38.0-alpha.28","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-xeJuUvOMozDZGJYpTG+J/1MLa8ZKx9+cw/vt79/pkHYgC4nDxw/dbOMDEa5GAVJn/RiRRyfsCGy52h5ti9doGg==","shasum":"b48c333fe64b34308cf34da172d2428fe81a8ff7","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.28.tgz","fileCount":187,"unpackedSize":2376785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXfIWCRA9TVsSAnZWagAA/msP/iN+daDsewTH1Dre68eu\nOLt+OiNeAUb08MFDTCxnHVAHNX6nKXqyvZIGHJ9agAhpxicLPHrBbXfx7dfh\ndsg5b00CWebjlITzoiQW+KZJpRCklFwm0ww3ojtPFxBwBa4KYfWW844eKRW3\nuwby1mRrAB9cUCmliUQ4q/dBqo7rH8VpkDaY1hI+09A8y3flfDBwhBIrZKwc\n14iQFlfpIHq5wLoRTg+pn4oMgm9Wpk7QDHqKRlevLLSN26qxZ7kYJcp6l3qD\nfY/f1w6ahhDQX95XyuIrkDWEuZP+0dPHh5dfmGpcauaoe/SQHd/XQG4DU2zZ\neRMRMrpLrh9LeU5RUziKXiWMHrxyLXfxenHjDc0sLm7tJG/TqmBlnWIXV5um\nhtTRDpLGcauTlSZNbnDpX3i06SecJ7pSXdb1OHs4uv9rpQwG2zAjl9nExiIJ\nuLFgkFqk6+Wiph9gqImK0FzQ5bDq/GoV3Msc07bISCjboue1tvcFwxaRtEAE\nOOrIZDSS2Ea+Ay2OLqWssP3V2h7ArL3S4EBnkyJnNY2jvDFX8Be9rwNpLL64\n3iH8j4N7g74NOejb1xvLTzjLOElPPr7fx1d3Vn1NCd0XbSnKyatIpPnuapYa\nRdXpTLggBhx7aqXiClPpd93LgKkFVkcyra4rDvWsBaAW6OZmlmz4zzxCPRAL\nCrSd\r\n=7qQU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy7TAwPXal+kjODvSW/i9/OCzRxn8aeds0FmkfNM8d4wIgHOFKODxbWK15EVtKT8V6KVwFPg1PSn2BUgW3mPOoaIM="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.28_1616769558214_0.7405799383389438"},"_hasShrinkwrap":false},"0.38.0-alpha.29":{"name":"minter-js-sdk","version":"0.38.0-alpha.29","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/runtime":"^7.12.5","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","minterjs-wallet":"^6.0.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n          privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"3f26a150cb1387af81979eb474d060fe4c9514f1","_id":"minter-js-sdk@0.38.0-alpha.29","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-sEzXu5uwy5wjLtl8cTygq8Jdkw6+iBpGDv7rMShcBTJKibrLBQO2ofFMT5luC3m1wMbULXFUhQlesk+eDqOrqw==","shasum":"9e3aef10e25d1903bb01994c9f7b78949c6ad7b5","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.29.tgz","fileCount":187,"unpackedSize":2416214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXhF/CRA9TVsSAnZWagAALMUQAJYS84ysjd2BDl/KY6Ed\nmC+A17wO+7notJX5QzoDsFOzNRlmy5f2+5pdDlyPsuaRDtFEojOQsnKHTNzj\nrmWWdbGSc0J/GqvCV1FWEAt8Vc/d1qLNKevBMTBDG+scshxWrb2KTutGbVfB\ntV6luROevtEgtDTDMK5dMUiY53ol8Q8Ah6Oz+WQ9xx5QBvRI1MOV0S6mfomU\nyySaxwHLv7x/RO1O6y0P0w671fOfn0MC+5Fb4ljJuCLsvIoNTRbhZjoIkIih\n6aFWBbLh/sRPliCMj+8Bs3TE9+kfopXOIQ71J0kqlVY2Ukp8Fa8x6S/zTFz+\nJo0xQRvbvNqVXh0DvItH/lHQh2hx3j2A7+YJNy3vZKcqbriK7+r6XXh4CHYA\nmtetAakwmeL9ggY6XBrz7iHqD+3UzXawfff5C5X4tQjOhPbp5hxiEpbgcW/9\nhauv7tklH4oXQVnp4hcsaYJPlbq9I9TcciLHnT3DKwkPzGAvhZZ1lDTNi/vd\nFPNIYNYc6u7eLl65UVn2+AosDlFzXeBVZuPgF8Z0gjEV8g+No+aWZILtqCiK\nYnps20iApfz2RccHWFrgbJf8hV5dMPAeI79co0BEMWQuDwctN0iCW1DhLB7e\nAtHNY5ppo+tiIn635ATWiYMqM8ZyChHGT5ZkThccKhnmCLQKBJr8K7P+0hZa\nbTfq\r\n=RpU0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3nYB/ZOJDLlUbFDsBJN9MFivsWodbcabBnFAXx+g6MAiEAxfwA4wzE5sLxccBWTiCvBAbabwKOGfWwvuHZqKO+0lA="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.29_1616777598590_0.5654547257567135"},"_hasShrinkwrap":false},"0.38.0-alpha.30":{"name":"minter-js-sdk","version":"0.38.0-alpha.30","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run jest && npm run build","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run jest && npm run test:bundle && npm run test:bundle-cjs","test:src":"jest","test:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","test:src-e2e":"jest --testPathPattern='api/'","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","jest":"jest","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.1.3","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.7","ethjs-util":"^0.1.6","lodash-es":"^4.17.20","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.12.10","@babel/core":"^7.12.10","@babel/plugin-transform-runtime":"^7.12.10","@babel/preset-env":"^7.12.11","@babel/runtime":"^7.12.5","@rollup/plugin-babel":"^5.2.2","@rollup/plugin-commonjs":"^14","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.0.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.16.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^25.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n          privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"1682d7978c9cfa6dca4add4b6b16f08cd747f448","_id":"minter-js-sdk@0.38.0-alpha.30","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-V3mf/Wpwz+Mz0a9kweMORishYlVuom/Jxp1PUp/ZbYWijjYOP5uRx5gSydIYeHuFjR/vrJMIXXr3FArHURv9Bg==","shasum":"26bf204b6c2efe8230787cf8554bef3c52c5c386","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.30.tgz","fileCount":187,"unpackedSize":3196901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYfPLCRA9TVsSAnZWagAAtpIP/2VX55gGccJ+YAK0pQ7V\nA41zxy8NlRAM1DhKZfsz+iAwNQphUeIPJGRk9hgwSARXtOFD7Q5Nf8+KpcTS\nm2nr/9Mtl2hg97+sSZLMN5B42KrPDFfak8rx7oVZ1PyAVre/i+eduznlT4tD\nO5fVTkdPnF8HYS7+RmjknrimzYUsztaiwLE9pCndiqvil45LfZ0d7wj14mAX\nTKNpx1DBi4oE9AtgBURJPuzgmQFkhlY06JR8Abq+k0+eg1eGcOcbxzOb40FO\n3GApx6XwY25teyQItd+89CztCIOUFNJFV59jj9z02N9WzvrZo1jwnBf3rZ8s\nGODw09BB+IXkfWbuzQ3DonCWX+9QTIayk1/L0urtgIkfOMFe7PAAhW/RA7tf\nFo9is7jBJNScvnvtQWDDjj7w/jriae7LayeX+fvk+Obm2KGlxXf/YwnZh8jJ\nzNLNrd44ylqUmgnrAAoGG6o2VG21tOq1Qf+Efqcq/CGzhuAARhqBJNRL0Oj/\nmFTZRufa1Xn4dFOx+7FSrKJwKk1ldADU476YndlWIUUn3JyM2kuZ18NMTTJd\nH3ryivMlW4weJ/3kOk74/6fgQyKCah8FstcIlbAAu3ljbcVsuV6qD6cob/n4\n9EG2mbLrphpiITE8kYm5dLZ5X/3DTshdtn+ytspso9CeNE8EZV06HHgTILqe\n12iF\r\n=rQal\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfutUb661k5uDX8i1t7jOStIQ3glai9h1fTGOGnvpUGQIgC81L+EFL6gFVTkYR83CueoNX+ckEPS8Z2U++CV24YPM="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.30_1617032139184_0.07193947223713804"},"_hasShrinkwrap":false},"0.38.0-alpha.31":{"name":"minter-js-sdk","version":"0.38.0-alpha.31","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-tx](https://github.com/MinterTeam/minterjs-tx) create, manipulate and sign transactions\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateTxCommission](#estimatetxcommission)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy](#buy)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Price vote](#price-vote)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n          privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'\n        })\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateTxCommission](#estimatetxcommission)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {privateKey: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {privateKey: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission);\n        // 123, 0.1\n    });\n\n// or by coin id\nminter.estimateCoinSell({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n// by coin symbol\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission);\n        // 123, 0.1\n    });\n// or by coin id\n\nminter.estimateCoinBuy({\n    coinIdToSell: 0,\n    valueToSell: 10,\n    coinIdToBuy: 123,\n})\n```\n\n### .estimateTxCommission()\nEstimate transaction fee. Useful for transactions with `gasCoin` different from base coin BIP (or MNT).  \nAccept string with raw signed tx or TxParams object.  \nResolves with object containing commission value.\n\n```js\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData.commission);\n        // 0.1\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain\n\n### Send\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Multisend\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Buy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Sell from swap pool\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Sell all from swap pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Add liquidity to pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Remove liquidity from pool\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate coin\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Create token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Recreate token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit coin owner\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_COIN_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Mint token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Burn token\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Declare Candidacy\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Public Key\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Edit Candidate Commission\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Delegate\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Unbond\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Move stake\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate on\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set candidate off\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Set halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n### Price vote\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Redeem check\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and privateKey will be used to generate check's proof\nminter.postTx(txParams, {privateKey: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {privateKey: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://docs.minter.network/#multisignatures)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n### Edit multisig\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {privateKey: '...'});\n```\n\n\n## Transaction\n### Prepare Transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.privateKey` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {privateKey});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {privateKey});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare Single Signed Transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {privateKey});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {privateKey})\n```\n\n### Make Signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi Signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode Transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://minter-go-node.readthedocs.io/en/dev/checks.html) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `privateKey` - private key of the issuer to sign check. Type: string\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    privateKey: '0x2919c43d5c712cae66f869a524d9523999998d51157dc40ac4d8d80a7602ce02',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"bd0b28df8c82a79bce0b3270a7fb33d036468d65","_id":"minter-js-sdk@0.38.0-alpha.31","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-mDyW9Oo+QcfXVZ4/5aRv8+QM3jXiGDCYfbe+nc17GN0jx514ZyZJbB+bqxhPWXKJ02C2bLGulovwoEvVwF1nmg==","shasum":"2ff9c88984c07bbfc3444a3c459c5ee05c6eb5d1","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.31.tgz","fileCount":187,"unpackedSize":3272923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY29CCRA9TVsSAnZWagAAamMP+wZCotDcrJQAwpnrp4MV\n6m9HexW7lH9PefmujWpXUcOJIgB8Uj8dmhNJbKnsKlNYLvmjokZh4mbeymTz\nSIbOIqJompI6S4h1k4MewRNmIOTIUBEo4L3fFYvycXTyYZvrVB8/yOBElzGG\n1j9laD2x3NUZSkxJiOruNQEidqiCfKdc5ZWdauYwr/A0ZYPjQ7jmIfqNb8at\nj/MJBhaKQaSLKKD29RTsLj5UiustiBniI2A0dQwNC/ywqlendg866x9L6r3x\nOhkWt1JIjyn/q+q9Hi4+ivLovCVFNDTwuawBvCg123TV6KvLCbVB6DlHdw0x\nTXhf39vN83rFRyE8oYjV0ESyQME53pecCO2kFT/HzO5b38amRjQpBvRtEvTO\nCbygLoKBn525qgqZd4jq/3JyyR1yeUx7YGHeM5Z8cKCw0w3ebO9hU6J2t4QW\nSNCiVXdujgSaf69mt7p9rPY0yuiQO5rzTC4vo9AquWCeTPK+6c27Qx6zoIw+\nyvjH3Ch8i98ogkTvHGU56pk8KpeeCTAfneAEFsH4Z61Uuxzyd4tEapBQ6yRq\ni+1xUuG3jkKhUu/vHgtUf09EI9FtGHajn15eAhl7ye+E2zjnYudhU4MLdDa7\nF7kfBg/dY7MaauwaTnJnFNvHQ5lDPZv6SNvCmZTwbZanMaYzTs1arg8vuNFF\nXCJj\r\n=doE+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt8JW/jsEgHTziFYyYLUGVMTaZ/xTrM+QDPtPuLX/iZgIgDGYdsnD3U8aYZuwe2ELcLm5xKtQDp5Qcs8EIgZBe0/w="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.31_1617129281369_0.16277694341447146"},"_hasShrinkwrap":false},"0.38.0-alpha.32":{"name":"minter-js-sdk","version":"0.38.0-alpha.32","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key and address\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. Address for which to get nonce should be provided, instead of address can be accepted `seedPhrase` or `privateKey` from which address will be derived. \n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor or optimal\n * @param {Array<number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how much coins you will get for selling other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` make one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provide less data (only `commission` field)\n- 2. `direct: false` makes several requests for blockchain data and calculates fee relying on this data.\nPros: return more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some request can be cached so calculating fee when users types payload can be done dynamically without extra request for each payload character. Cons: make more request for single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default .\nResolves with object containing commission.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain.\n\nnonce - unique number for each address, used to prevent transaction reply, starts from 1\nchainId - id of the network (1 - mainnet, 2 - testnet)\ngasPrice - fee multiplier, should be equal or greater than current mempool min gas price.\ngasCoin - coin to pay fee\ntype - type of transaction (see below)\ndata - data of transaction (depends on transaction type)\npayload (arbitrary bytes) - arbitrary user-defined bytes\nserviceData - reserved field\nsignatureType - 1 - single signed, 2 - multi signed\nsignatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-coin-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also how to [issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n`options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet)\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"654e58d437663c73d8bca196970301c870125424","_id":"minter-js-sdk@0.38.0-alpha.32","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-bsxzh27rayJskWcq/Z3NauJQIIHwQh545EUpQjV1nEtBiM0gvF5AX4S7zNeKKhFkLzjxhyrX2cBofMopKiAxzA==","shasum":"fe80e83ec91917fe4870ad4378f55140ed469662","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.32.tgz","fileCount":187,"unpackedSize":3285376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZdtrCRA9TVsSAnZWagAAm0oP/1wAaQ3ETBfa7KBFgSmA\nsfRpnWSED9M41PKYlSzV3W1WdthDeMGehGL1IpbImcGC3c1+tLhiHVvy2htx\npoq0JkHkyN0VysQRDxnpJroFl4dY9EOY1IEkQ0sJfzgChGe/LSDfOxZidp1A\n4v17KVtirPQ78AMBmyivgY9i0KFj/9lENL/PfwfwK/cKWtuiAsbs7Uo6JE02\naVEvMrG3LeP7e1XU60soa9INIk2LMKOKxNqa0eDBbUgWTTCXxqcEzCZvHtjR\nVDl2R6tmQpfg/uZq/Y23kfqyGfNXRVny8n0KUlifggNiEye18mjldHDyJC51\nTAhHBXOnArsqs8TUUrtzCf2w8MuN3WCsaeqwtBqdyvuJ8hhxhYnDYOQ+oP/E\nc/5Jx3DbQfLwQxWa0ZlaCwbyVGQpLyDVfOb3WLIJG4rUDESso8P8BipyZgsB\nGLeOp2vjjNWrkg/CCxVMK89r+FlzhaPEN2LSBxq8lgJjkxjudzCgXDLreh3b\njVaxIMjimAPzzZQAdw2Rdv7xT8FSY/xLIQBmLZoKpBEMs69sySFnMK2wmnah\nCnaEumLo8mIi259urAk5szK+zR/KXFuVlrXv5ZSeWwP1B09aB8QMmQiMuK8h\nWFtFpSfWmfT89aKPU4gRlRXpEylR+tOkWkbNNFykgERs2JKNUJBHu0cYPkBm\naGzJ\r\n=9naN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCa6DxFKoB9c+wwxQ9lGvIGgb9EcKpkD3Y88rc26ZoxFgIhAM0mAX7+YTa66/gn7noU9Ol6ZpEK/hIJ37aLoiwcstw1"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.32_1617288043437_0.6742427450993302"},"_hasShrinkwrap":false},"0.38.0-alpha.33":{"name":"minter-js-sdk","version":"0.38.0-alpha.33","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key, and address\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {privateKey: '0x5fa3a8b186f6cc2d748ee2d8c0eb7a905a7b73de0f2c34c5e7857c3b46f187da'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. Address for which to get nonce should be provided, instead of address can be accepted `seedPhrase` or `privateKey` from which address will be derived. \n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor or optimal\n * @param {Array<number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how much coins you will get for selling other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` make one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provide less data (only `commission` field)\n- 2. `direct: false` makes several requests for blockchain data and calculates fee relying on this data.\nPros: return more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some request can be cached so calculating fee when users types payload can be done dynamically without extra request for each payload character. Cons: make more request for single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default .\nResolves with object containing commission.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain.\n\nnonce - unique number for each address, used to prevent transaction reply, starts from 1\nchainId - id of the network (1 - mainnet, 2 - testnet)\ngasPrice - fee multiplier, should be equal or greater than current mempool min gas price.\ngasCoin - coin to pay fee\ntype - type of transaction (see below)\ndata - data of transaction (depends on transaction type)\npayload (arbitrary bytes) - arbitrary user-defined bytes\nserviceData - reserved field\nsignatureType - 1 - single signed, 2 - multi signed\nsignatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-coin-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also how to [issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n`options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"314e867143500593a88fa0a430a3d1d03bc472b3","_id":"minter-js-sdk@0.38.0-alpha.33","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-dFXYHOhbAFgdWxWXTLqTt1bHGak/s3SVFO8hEcy4QP5bSNSqQqzjPYn2YA5WhpxHF1FZKO8t/PQRiy3V9G64gg==","shasum":"b32f2ff7203d34f7ef7bd7ee32119e08d96e16d5","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.33.tgz","fileCount":197,"unpackedSize":3291188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ031CRA9TVsSAnZWagAAh5QP/iCKNf+anNgw9Biuex5E\nohmD+Q3bwaeyKSUuYp+P65htTVKDh8To2PLduJ8vnR7LW4usfWJNXV5vXDkL\nGNJUhTRirvZrdDUYi/6KyWQTL9TNL+vr59Yo5SklztW2lvPBdd9HNwfytRdU\nz83CYx1T1m/nKwGqsOndUdUnp4spGTcfnAKu3ri0bgwzuLhtXIaTGnSLEDFZ\nbuPYWnoFSkzBFmVoaHa+rNAjnr2KR+oDQOZd+q9PqYduOngl4EmKPt1BmpSB\nFNtulLqgX2HyzrllB2y0PPjD6rrtoBhIUS8su+wsMMjTbJkhnTzjXY828kix\n80Q7U2PFN61XupSSVQzw5bOdSxJeFm3KshlaMD5cNljBwwjGxBbDz3wdJ/Uw\niRAZCH/0ZR+mIE6AGwN+e08zlnjTZsx3CpQ+jj5sXIiaPjI1zTpnonwYio6V\nA5l3Q0SIzSmAkcOSrmU45N93YR1a+XD6Djsh6s++2tfRxFlSxB0o6Bx1wfIH\ngy5EqjXtg2P87GLfBxcUgGJOD6nSUIwa7FGdFngwN0rHzA+oNeiYitMfS00A\nn7EWMKD/IIU2CL99bGKkQfVTZuUubhN/SKdu1N9nLsfH/ajdHbRAuaNWjDkY\nuGG7jUMwNiyj6XSx2IebCRjIDpI/PUAUlZ8pPJ80FrB/TQ+ZhhOlPGd0VgM8\nrwEa\r\n=m4EU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFT2YGj4p4itCSEdCBZ4owaxvD9NkzwSV6hqJR395gdxAiEA8LYcxltdBtUc/pxZi59pII/B+yzbydVORCkjm19U2ZE="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.33_1617382900899_0.904044636287685"},"_hasShrinkwrap":false},"0.38.0-alpha.34":{"name":"minter-js-sdk","version":"0.38.0-alpha.34","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0-alpha.9","minterjs-util":"^0.21.0-aplha.12","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide with an easy-to-use JS helping developers to communicate with the Minter blockchain through its API.\n\nThis package should be an aid to any developer working on JS applications with the Minter blockchain.\n\nPlease note that this SDK is under active development and is subject to change.\n\n**NOTE:** since 0.34.0 SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) take care of BIP39 mnemonic phrase, private key, and address\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) utility functions\n\nContents:\n- [Install](#install)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit coin owner](#edit-coin-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Install\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response mean that Tx just get in mempool and it is not in blockchain yet. \n        // You have to wait it in the upcoming block. \n        // Also you can use gate api instead, it will return succes response only after Tx will be appeared in the blockchain \n        // WARNING #2 \n        // If Tx was included in the block, it still may has failed status.\n        // Check tx.code to be `0`, to ensure it is successful\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error request will be retried with autocorrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users\n      // #1\n      // Successful response mean that Tx just get in mempool and it is not in blockchain yet. \n      // You have to wait it in the upcoming block.\n      // #2 \n      // If tx was included in the block, it still may has failed status.\n      // Check tx.code to be `0`, to ensure it is successful\n      // Gate api users not affected:\n      // Gate will return succes response only after tx will be appeared in the blockchain\n      // Also gate returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance)\n\nOne extra field of options object is `apiType`, which is one of [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine what type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId specified in the tx params, 1 - mainnet, 2 - testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to the blockchain.  \nAccept [tx params](#tx-params) object and make asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce given, it will be requested by `getNonce` automatically.  \n- `txParams.gasPrice` - 1 by default, fee multiplier, should be equal or greater than current mempool's min gas price.  \n- `gasRetryLimit` - count of repeating request, 2 by default. If first request fails because of low gas, it will be repeated with updated `gasPrice`  \n- `mempoolRetryLimit` - count of repeating request, 0 by default. If first request fails because of error \"Tx from address already exists in mempool\", it will be repeated after 5 seconds (average time of the block) to try put it in the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always check that sent transaction has no errors (tx in a block should have `code: 0`). Otherwise errored tx will not be applied*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry, if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries, if request was failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries, if request was failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries, if request was failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multisignatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to the blockchain.  \nAccept signed tx string or Buffer and make asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from given address.  \nAccept address string and make asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. Address for which to get nonce should be provided, instead of address can be accepted `seedPhrase` or `privateKey` from which address will be derived. \n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimal gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin ids in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin ids in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how much coins you will pay for buying some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor or optimal\n * @param {Array<number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how much coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how much coins you will get for selling other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - intermediate coins IDs for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` make one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provide less data (only `commission` field)\n- 2. `direct: false` makes several requests for blockchain data and calculates fee relying on this data.\nPros: return more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some request can be cached so calculating fee when users types payload can be done dynamically without extra request for each payload character. Cons: make more request for single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default .\nResolves with object containing commission.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object to pass it to `postTx` or `prepareSignedTx` methods to post transaction to the blockchain.\n\nnonce - unique number for each address, used to prevent transaction reply, starts from 1\nchainId - id of the network (1 - mainnet, 2 - testnet)\ngasPrice - fee multiplier, should be equal or greater than current mempool min gas price.\ngasCoin - coin to pay fee\ntype - type of transaction (see below)\ndata - data of transaction (depends on transaction type)\npayload (arbitrary bytes) - arbitrary user-defined bytes\nserviceData - reserved field\nsignatureType - 1 - single signed, 2 - multi signed\nsignatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.BUY,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, by default 10^15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, by default 0\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = new {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123,\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, by default 10**15\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, by default 10**15\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-coin-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also how to [issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// also combination of password and address can be used to generate proof\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeights must be between 0-1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nSend it from the multisig address\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx, accepts arguments:\n - `txParams` object, \n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and can be used to sign transaction with single signature.\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. So it doesn't support multisignatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi signatures\nUsually you should collect signatures from other multisig participants, which can make it with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP serialized tx into params object\n\nParams:\n`tx` - string, RLP decoded tx\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account. \n\n### `issueCheck()`\n\nChecks are issued offline and do not exist in blockchain before “cashing”.\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issue identical checks. Type: string\n- `chainId` - network type to prevent using same check between networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee, fee will be charged from issuer when RedeemCheck tx will be sent by check's recipient. Type: string. Default: network's base coin (`'BIP'` or `'MNT'`)\n- `dueBlock` - number of block, at this block check will be expired. Type: number. Default: `999999999`\n\n```js\n// Since issuing checks is offline, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method also available on the SDK instance\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method also available on the SDK instance\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a link or as QR. Then link is being processed by [bip.to](https://bip.to) web app or any associated mobile app. App retrieves data from the link, generate valid transaction using logged user's private key and send it.\n\nSo everything a user needs to do to send a transaction is to click on the link or scan QR code.  \n\n### `prepareLink()`\nCreate link from transaction params\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params\n\nParams:\n`url` - string with link\n`options` - object with extra options\n`options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n`options.privateKey` - links with `password` and without `proof` require privateKey to generate valid `proof`\n`options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"322fd9c2d8033d5b65d81b4547f7c1fc320c51cd","_id":"minter-js-sdk@0.38.0-alpha.34","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-43AA4KKCS2MzIE/sEoBGfzTMViwwxKW1NmrEUlJ98B3WMHQf7wuwgsZt4zOtlh4vfXwOo+Dzmn6b9l2fX9TD4w==","shasum":"2d488b4f5d689f3b873f8d75ae8a0f3b72e6c31d","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0-alpha.34.tgz","fileCount":201,"unpackedSize":3293261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbdzcCRA9TVsSAnZWagAALg8P/Rkh1DWXYatmME+CdwAC\nx+rWd2/02PN+hUd0yyZE4KEq9o6EAmbOPMrsAjPpYpyW23WWwLyPsy9DoQEu\nyMCpqZLYw/BSl/7LIW6Re0KGxpo3VAfq+sCN1fInMl7Kp/pxi7MNUVQYYP17\nnSi+NWh0HAT/lPRlxDU4mNiIHUFD5WkTq3IEfpEM9JjX3Le6YfE5Kp74ZLLE\nByv/vXyetvN4DhFxJJjp+p+qJHGdZ4cUdLEc6t7F48AYA1JhM7FtP5z5jzLg\nqdlaeqS+0Q/uWtlo3sEby7wQLAC6tUl0EwUAL6fIYeVGmuoLTFzIfOxasojL\nefCb9WZj1IrvzbyYCHqaIx0Cm22FL+EVrtmbMAYSNcurvQE8kVHiejzT701r\n2nIsU3/DDinPRnip14zaStNkMx20Gbfv09k1b3rPCQ4dWrgKgzCLf8EOEXqL\neddmKpI8dGSKu79dc61IUqRUpM04gNu5OgerYG4jv5Bmmg+kfTmTjIRXnL9q\nVOj3onS73YB0ZURVuG0hlVfoGrIlqMJtQxrrTE5VK8OfFxsOJZE5E1YF61Qg\nNgoxIlcjAtcBh/I/hNNX2FLz9brEgHi/yyssQHHEkqLp4kjgfqd4FrP9cGZo\n/oUlbaOlsSTnZzr536CSz80fDXF88WAkiXt4hvc/sa0nNhgFvmF0shJsbISv\nyNhu\r\n=zeV2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3VBM0n5Pi7Ly44a92h7zjeXGJn30dbyN87L/J4wcj5QIgX8P5vOVVGDZVagqNBg+DnlzSeU0cBU5B3qya1btMwj4="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0-alpha.34_1617812700075_0.33025166466555533"},"_hasShrinkwrap":false},"0.38.0":{"name":"minter-js-sdk","version":"0.38.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0","minterjs-util":"^0.21.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"59787d0f67073847a3335cffaa1a935183f5e39c","_id":"minter-js-sdk@0.38.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-UdHHI3fr+IOqiu4fKcHBKIheMR/ks1mqFwDb7ErdL11zSCjvrms7F4kxHLhQq5+lBbWMMOEv4E02ex0Rs73pfg==","shasum":"f97fef22e3794c48d6b01f76084d67ca51296e7c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.0.tgz","fileCount":201,"unpackedSize":3293477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcGUgCRA9TVsSAnZWagAAXFgP/iuupf+RfIhxYwMnDzD2\nYOngRLUQjAgjynq+SATzJ3i4shRoCiGF9xLXCxEif7UKbzbo+57VAhskhMZ6\nbUQtQjvnWGTnfo0APmdodCUYVnLGRWUu4YM+KViIIhaPl4OpLbd2tw24Onff\neiG/+UAocQY/oE43mOv35a8gtQF63yttZJ3p8KwY4aCIaa8frb6CxpTXFwdV\nrb7ACx7g3CNIfEf20nMj0fTDbKM7V64/dE4mZOcEJxMfqptfGdcQPDRudRVw\nKGZkfcnr2oTYN8YRbPOHg5TWYyg/AlDxGnHCobr66aykeuPyNnkNgmSZJzV8\ne+/8vCepHMjgfrP3Vkvng5+9HnihooDKf70X5T5U3w0q41ear5yj9kynra5K\n4LD50p4J0v8TLo9ObOvYkgMseHp7MX3AvgFnohMpjtqyspZEHL2fnnfa7nUM\nmgidd0P1qBzlOe9wKudZCJIrwe5Ch+znU/BAbL2zdA4c0C9h1OQRYqm+/Eb4\n2LHa6l9x5n1AFFodlihwPiyZBrpC5pAlH4o8c5+pEjRiiDo/nD+pPAr1NSE4\n4Rkzpwa0LmnvJ9++PC5JiBnuiUY9OxfUkBw4qHA4qK2eDLBlUif9xBNhBjZ2\nymywEsNtmcVXU8Za4Q3f0Clghbx5PCZbMXaEZNRDTBYc1OCPTHjDBz9YJlTk\nvAgB\r\n=vpmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqm76Gl/g0tpPTKFgyJrS4BF+mV2U2jeurN/RpyTy0NAiEArhus5xWH1SWbExWmgTVOKxKcigzhoCQKiYt7GsnTBW0="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.0_1617978655778_0.27191116854292385"},"_hasShrinkwrap":false},"0.38.1":{"name":"minter-js-sdk","version":"0.38.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.9","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.0","minterjs-util":"^0.21.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.14","@babel/plugin-transform-runtime":"^7.13.10","@babel/preset-env":"^7.13.12","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.23.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.2","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.44.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"263d2743d45f5d07eee14355b2cea4e4478b9ec3","_id":"minter-js-sdk@0.38.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Z7Ud4bKZfB87GzNkU/tCSCPRQrtfxd1CWAoPBKFq492RWtcHEJPTE+GqlJ809qOBQ6aBbN6dFcjiMCE9aaMDcg==","shasum":"28860664df1115dfb0f0fc5060a2bdcafce3bc3e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.1.tgz","fileCount":201,"unpackedSize":3294334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGQDCRA9TVsSAnZWagAA3cwP/iK62DttX7+1Tr5K6tfk\ncyru12VuCX0Och4/Zw0UpXR8pf3XdEyN1ve6fKceiOOa+hjcHBtjBnEAWkiv\nvMdgvDrG2CqpPqCUhxXTAVIb/oh0S3pcFXhMoeW6XHnm8ihOgJ4SeMqD2Nui\nVAZ4ShkyUiKbh5519zuydhh/ezmJnV0G/BU7512hxory8aY/H+YRwY27u7O7\npAzojwy2xJatd1oGwl2VRPJpnCIY7tur7TQDC1tSdvkB10w327KwqzN0KT/V\n0wjwVtr4EnubcXMIB1rI6F5iFq/NXxAg8Y08HhhJEoi68t5wdCwTT6My3kDh\nyz/CQefhlytCLASHP2JgeK/TC8zJLzxiVDMweSX7w5lgtvJDED/KnESTPENU\ntXuYfiO00N/X1qmoIv0SUzStmrA0a/I1VnJtaJNSNYCPVoJn6PRFyML2VXse\nfeWpP8wCZH7pDZuZgJAqmLUdNXWeZheA1Sbla6kjLUH4akQya4xOKdOR69+H\naavl1ZH8ddN4GG4JxX6JGJ2ulODH27Mfq7AOHoQejXQa1nYeT9UPiR8kZCtG\nW7rqYbhZN6zDz6EMLsZGajHQBvdY0Xf7C16ZgSsP5w1s+Uk75hEoNbQzYq2g\niAk6RFYdNYzt6R3BSQCIU2iQk3UY7tNJ4ave57INLrsCFdK82q5Z9uq4H4fx\nkzpE\r\n=+/87\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEakQi/oKFc8PE2OksdG/f33B/y/jJocHvxjH1yTtKrjAiA6cLfbpx/6VSNvRtEVAo2eMOgGEFcFrRpXmlLLgZkVBg=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.1_1618240514622_0.49113631276665504"},"_hasShrinkwrap":false},"0.38.2":{"name":"minter-js-sdk","version":"0.38.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.10","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.1","minterjs-util":"^0.21.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.15","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.24.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.5","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.45.2","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"6d23e4016a17d7673583b42906b05bac92851614","_id":"minter-js-sdk@0.38.2","_nodeVersion":"14.15.1","_npmVersion":"6.14.11","dist":{"integrity":"sha512-jE5SIWILHoAXyxqY29XUC5ZaYQKE2G040Jp2afOvRr0ELUh4Rkj2+kmXHrej45VfZHZsxEezvWktCQhM7kRN1A==","shasum":"88400708be8fb373fe526f0963516c31cd53c40e","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.2.tgz","fileCount":201,"unpackedSize":3294313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdZwLCRA9TVsSAnZWagAAUmMQAJmIquAS/HGnGKbX4yi7\nb33W7/rnTskkT7HGQR5k4xcQqhagd/ofBhiYK1PCuYQfMQyqcu/aqp98yYpE\nRYQLUqjWvMPPMrRdCMEFwS1/rK7lsctibqGpeNuRnRPkpejVTjpPPLnwXoWu\nSBGccAVkyp1N4uARnAbpMzrlD+Vlvilvs7PKI8KWv/bA6Gx9oxqaFOBPhUqH\nDpAFTN0Avk+yixPcV5QVvQEfzZXxT+2mN6GwUTPtlLHClV0q2THYugw9Cz9C\nvuG1mk7kJtaVdD4JnCvHQqx0BjkoeUdI4DW/54mVsL5E308a9BC3fDho8Mk+\nVXRnVkiiG1Zkg8QXnSxBmiAzR3HsL1kL8DI0Py0RFzmYK3JVyVvu5e+xKQCv\nZhwgcjQzGLev43VUZw1xEZ7yMRHIr3/0zV3peMKc4kpWEzw0M47GGHX1pOr/\nxv0sURT1VZtjgX3yjrHV72/KtG9XOdj8C3BECx6yeFIYZcCJB/YaVMM6uSG6\nio8CLwBtcOu0Yckezeho78nktTaKpBA3XkYrIaFdYB3ze/LOTy4yKOTS1ZK+\nmz8I/25zVwmMr1KMltpUNDBZEAQcEvJKcLr07Jg22NzyFaQwgP+dLy6Yrm05\nsy9N3ngMbmioAPFh4n25oTdiDMROL0pmsjj7SQgZqrAZLLaTsKRgpMuiRUyP\nv1eR\r\n=lW+U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC87XlJdeN+pmSvS3SW5Q/h9qTq1xCofDWnHWtUqPql+wIhAJXzEes8PxUSYkO8+JX0NFomZs67zqpUfHJ9HwyOEfRy"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.2_1618320394741_0.35442408618403"},"_hasShrinkwrap":false},"0.38.3":{"name":"minter-js-sdk","version":"0.38.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.13.10","axios":"^0.21.1","big.js":"^6.0.3","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.10","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^10.0.1","minterjs-util":"^0.21.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.13.14","@babel/core":"^7.13.15","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","babel-eslint":"^10.1.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.24.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jest":"^24.3.5","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^29.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.45.2","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"2485f2aab4c6ab7904acb9a46d01331c9885777c","_id":"minter-js-sdk@0.38.3","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-7qdGrS4ZQG/RPcP4mao4F4tAonBpWkOWCL3fDIMSsUqIaGsOTxRDffqWkuloWOCleVJyqybAiwgAcQpxeh2AVw==","shasum":"32d5c3959bda980d24a7641601558905ef6c176a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.38.3.tgz","fileCount":205,"unpackedSize":3297228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtQyQCRA9TVsSAnZWagAAKekQAIgbuiEhNtuV6/Yt4AP5\nzJe7KrVw8hN+iyeXqeH4qIsbSKwGxo1VsOFXzl6SsThIhMCuNKUr5ZhWAPFs\nWnaNBehTgH2pDjEBIPAvtEwyPxpa+RuAIodnbKgrijTkXsvk475JywueKhpL\nTZQySOJqd+pP3DF0/nfBgDpHQsfNEmAyeDnkFaCjs7THTtGsicd2W46w+gEK\nspOVflaohmcqrMFe35QwEOmuJpUInyquEWLlPN4fN8Oak6ftLXlY8tKMHE1C\n7hHF88RU7mv1orMkxXVMFY0v2K5QUAvCOxIEcV14lDVtjpGq1ePM7yGLqnKf\ntiKoE5t9xeUOFX0VSwLWqn0ItU6ES3/V1NVZSh2i2BWoysBggbV18lx9UOwN\n1NDDuBcvrwjQ7M4sLwtMnAvErXLtMD5wlYHEbfqO127xOjQMXS5CHY42h0dW\nt5ePkPlp3eKl6ovYcyJtn6AAAMJiCL0FHwmEsb0/MmWkDW2kUbktFASnY1Xg\nE3WS2AO6T6+opUVLCp7TV6Vlm9cMAksx+4gbCpoHOCOBJTnkkIRhuzYy2dfk\nnkY3h1he6h+9CKJ4wG4Nyy/MaAOXCGVCUbynRxSnupP4IDX80/PaGVZ+F5Gh\nj7lhBWBtZ8uJFi2V7Bfzt/jwpZrsBOgKtK1zlpMd+EvS8bcfhShaX8go1jxN\nEWMK\r\n=8/Od\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdM9JueXWXLAgZlKkeSR/MHgehgikVeAD/I5wB1I5YswIgcGclDapJmyCbvXiT/iqHBm2U8i4BHXZof746blPWCyg="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.38.3_1622477968228_0.4840524263848951"},"_hasShrinkwrap":false},"0.39.0-alpha.0":{"name":"minter-js-sdk","version":"0.39.0-alpha.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.14.5","axios":"^0.21.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.0.10","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0-alpha.0","minterjs-util":"^0.21.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.14.5","@babel/core":"^7.14.5","@babel/eslint-parser":"^7.14.5","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","babel-jest":"^26.6.3","coveralls":"^3.1.0","eslint":"^7.28.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.23.4","eslint-plugin-jest":"^24.3.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^33.0.1","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.51.2","rollup-plugin-babel":"^4.4.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `direct: false` makes several requests for blockchain data and calculates the fee relying on that data.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: makes more requests for a single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"6a94ce133109b7a3f277b7e7e22c48ce7adc8df6","_id":"minter-js-sdk@0.39.0-alpha.0","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-hjYzEpHj1d628rShXY+eAFn7Ydjufx7z81O2UqF8aG48wi/ETIJ1dtow3AX9p3y7XTitvlb9mkEbdTFBwI/PIg==","shasum":"605fc0c2647446549ee932b695459ee544abf22a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.39.0-alpha.0.tgz","fileCount":205,"unpackedSize":3312622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw/T4CRA9TVsSAnZWagAAT/EP/0JiCE4XPkTTxgjZgb8Q\nAihN3EZfotHLsKpn4jR5vnWsboJAIbYOthyjuDbApTXBbcgiVaFRGBwjKdNH\nCFdLyuxrWdmGcIWsFcVfudcBE2Lw4LBebXnPqsQtM8dxF//QN+Ugi4F5oWVq\nYVqy5TbqC1kbb9mLlH7F5lkJFG165I5xGX6DYehDf27mRCyHLqIvhMz5k1t/\nd6IESPwzY+YXPqQ8CP01voMcdKLVxNuD1KfGg8IjLAEfQN6Fg7RZ2o6cmW/9\nQIdYWHswSqqBIZbXoUVy2r75jU75w/MT1PceTJXeCkjfrZi9Q4AIK7lHdOt2\n3GPCSstMT8H/g5YPYtKK7x1I0t8A8SIyD5s2omd1NovtJupmZsLmN9j30jj4\n+7Lf7/23SRESQiDoAqcI1+V1ar0eKlx2CKBDcNOcHX/rAXL5QgsT6M5+/15/\n5UQGYM+SKF5eq343C7no2M9EwiYvYVZRWThvRFEXDd9LtQHyQxht3DcoTzRF\nKgzXFwsvtxRxJJUvGdsj8SyVDcaleQygaHwQu66rnnTHm0j6f5Tyjq1llTe6\n8ku4caPB4ZOSttW4uS8OOwBnxom4imOPid9WlakcRdvyzpzpsnAq+1QZ25Ia\nGa5unRNpEBSh09Px188YptqOh073xCca+i3UoOqGQa0wMeSwIzG4aFGlEh+z\n4cFc\r\n=Ja9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIOLfn/DQU39z74mitAH0KDcVOcIiDMPXstj9jnX7pYAiAtUCrLA1fIaAxfYrcCXUcV2bWWbW1hQTRcF3CmPjXl8g=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.39.0-alpha.0_1623454968287_0.01234737354783455"},"_hasShrinkwrap":false},"0.39.0-alpha.1":{"name":"minter-js-sdk","version":"0.39.0-alpha.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.15.3","axios":"^0.21.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.0","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0-alpha.1","minterjs-util":"^0.22.0-alpha.2","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.14.8","@babel/core":"^7.15.0","@babel/eslint-parser":"^7.15.0","@babel/plugin-transform-runtime":"^7.15.0","@babel/preset-env":"^7.15.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.4","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.24.0","eslint-plugin-jest":"^24.4.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^35.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.56.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `direct: false` makes several requests for blockchain data and calculates the fee relying on that data.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: makes more requests for a single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"47a2fbc89780dc04813bd7467256d704ea238deb","_id":"minter-js-sdk@0.39.0-alpha.1","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-ByMnv+5mhsSiZR58B5g3ANpKwZOWu9WIaHIG2wCRxZnbnP/oggtkVQz6DnmUuFGQRbzfpf42HQE2tys0dl4gVQ==","shasum":"d33be6451f8e4a90d2a1ed80983c9e2330c8b4c4","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.39.0-alpha.1.tgz","fileCount":209,"unpackedSize":3185414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHT4yCRA9TVsSAnZWagAAP4YP/RfS8roxkm4IzGmEHQfy\nMMOcI4iL45gHaOp5JQQiSwrltmr6VlslPFjlKF+QSiIcfnE/rmTXQOvWxxyq\nM9EvZyCvXEMFdENTkC4foOhuTUBiCsi0x5Xs0F+ecKlcte6z7xqF8Sp3ZkFm\no4UAfckSv0TZK9isLtaAjrrle6CF8QbxBlOMUlm7hKLy55n/CXPF5bGCbEny\nip2Jm1BB0Ls8Q0dTlaLb3aBxtrO1Bw3FOkeuPyFn5loh4Y1qMsRArO64M7JW\nhykfAu7rD0xoOPuwf38nSQc5A9AAHMiczj8uXe5GNJKZTysHlqnTUlfBQJK8\n0qIdVEiaQE7nzwYp2dhWxDGJXx/ULciFFVOJLdodjfWXTedC1+D0isqm7m8t\nD9gQ/4iipK/hhS/3IfAjkE8IDWwqqcGAnidtP6OUmXM9uz+6KOEz6XUGbsBY\nv00DTkyxiqwg3V19E9LBUa1O3cBx+crjseQSvw39fxey7fgIBTH6EYY0oD+f\nC6OqQC17kDNi+o6fLU9HU0FDEhCuhBdQHbbjBAuZ3fXlH5rXXrGbmmanu2C2\naVTlpWLEZZhpYQDUjawXDXlKe/GtoEpdpnQvjx61CZgsS1U55QY01j/SEuKh\n3Gre6Iw7R/5zAc+oWzoCYrVsdRrhUjpf00E4iKd5CD05kAmvWraQu6PsZujx\nXEqi\r\n=Lp3j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjMfyfhbNacpgBwrL+d07e045CICR6TruPlsMgfOP5mAIhAKyoDVFqARS9H7M/4u2ADd+c/6tq+zcVHNfWOOweAjQi"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.39.0-alpha.1_1629306418408_0.9870493900409585"},"_hasShrinkwrap":false},"0.39.0-alpha.2":{"name":"minter-js-sdk","version":"0.39.0-alpha.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.15.3","axios":"^0.21.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.0","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0-alpha.1","minterjs-util":"^0.22.0-alpha.2","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.6","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.14.8","@babel/core":"^7.15.0","@babel/eslint-parser":"^7.15.0","@babel/plugin-transform-runtime":"^7.15.0","@babel/preset-env":"^7.15.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.4","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.24.0","eslint-plugin-jest":"^24.4.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^35.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.56.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 1\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'LASHIN'])\n    .then((symbols) => {\n          console.log(symbols);\n          // [0, 123]\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `direct: false` makes several requests for blockchain data and calculates the fee relying on that data.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: makes more requests for a single estimate, can be less accurate in some edge cases and when caching is used.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\nDisabled for now\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"a971a3a4b257fb74ea37e72f5ac3819b35badf2b","_id":"minter-js-sdk@0.39.0-alpha.2","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-xx91K5++Lc1vU/M2VnW7XEUTBgsE5MjuLoHSOCKCHODKXnnTUSMzLC+uaXXwsvar3Xqc6zlynpfrEZSPN+lYKg==","shasum":"7ba0d48b866461781f290835ad1771f4339490ce","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.39.0-alpha.2.tgz","fileCount":209,"unpackedSize":3185571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIBW+CRA9TVsSAnZWagAAK48QAJXs84zSQnmQoH+xik9i\nWbmYyzq1q+Y37iBuEYjzNUJ13dNdxWMQoswGC+0K/xKSRooafBhHw50Vw+9f\nRRSh+04wfI+h8VF8jPNZJ4Wsrsmf6ZxmUsvEXNYEednXk92Qq79rE2zRW+dd\nrh2OJT2Syv7I+qR0JqVOYnmN0h3nXtwPtfP7/2CNW05YaVmP7js0CcQUqCfa\nBNmVHD3typOAUIuCE/MtdTnp4cQzze/ObKurI7Y/xYTEUowyIIOteXlbiU5r\nIG5gObIhONVmzuvOIUJ8Ywwqz/Yqy4XCjbCZ6pAesJ/k1O6u+VAodSRv1qQO\nohM1qhV3IKYGk4VgG6wt+7DK3oSok3mQLR92AU1aiWt0CyQN/Rei9ewu6N7B\nbabCCC9v7gjCWGGBUVcG/egL9iAIgeFJWIQkKEWp/V0PVXNY5T71ARGxaFEW\n4q9kk9baeFgZ52G3Dt+fVvowj0FdwIONNZ7Nv45Gor8OYFzfClrJ2lMksREM\n4MVQzviXxbbxgxdVAP194zm8B8MVrCNeCdnqRFI2koEhuccg1JFrozJyzNN5\nfT3xTEAzwPP0hg/KecBB/NY1OakvmF6OmSFPKL049u5fzqia4uU45HwN8wel\nsflanCvdWYJCM5b4zs04SFF6Wh2i5Lta0Qk3IaL1HQKbYsNxH0IuRp93SLdg\npzIZ\r\n=BcAS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPf2upRvkzLYmmTsfk3ygxDYSQHrECupHjzCZGpT/sGgIhAKXp4CjrOY367j0htdDzao4d3RWNKGFnzfAj75TIkCWe"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.39.0-alpha.2_1629492670340_0.4924047733400003"},"_hasShrinkwrap":false},"0.39.0":{"name":"minter-js-sdk","version":"0.39.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run bundle && npm run bundle:minify && npm run bundle:cjs","bundle":"rollup -c build/rollup.config.js","bundle:cjs":"rollup -c build/rollup.cjs.config.js","bundle:minify":"rollup -c build/rollup.uglify.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle":"npm run bundle && npm run jest:bundle","test:bundle-cjs":"npm run bundle:cjs && npm run jest:bundle-cjs","test:bundle-unit":"npm run bundle && npm run jest:bundle-unit","test:bundle-cjs-unit":"npm run bundle:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle":"jest --config jest-bundle.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-unit":"jest --config jest-bundle.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.3","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0","minterjs-util":"^0.22.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.0","@babel/eslint-parser":"^7.16.3","@babel/plugin-transform-runtime":"^7.16.4","@babel/preset-env":"^7.16.4","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.3.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.60.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"6942fd3631f94103b9d0a850ace5621f570742b5","_id":"minter-js-sdk@0.39.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-LfIcljpEt2p2W8COIp3dFYEmb/xeBlW64WPhunRmC9Dngn6YcRAMEsn+AxdR2C2dM4hiqu8CB2sKrrMJ2T1IzA==","shasum":"ecb0c8509ee257fe4d26faea410cdee2de012c5b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.39.0.tgz","fileCount":204,"unpackedSize":2355245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp2ENCRA9TVsSAnZWagAAi6QP/1dvhohXGjyOSnhmCAPq\nAcMD2XEE9UNf+NhsZrzzDj44Sa+n98ImVaJnB5HpEM0nxG34Y0aAc7E4Ivk4\ngqz/0kOBg2DHzV97mhHApOX/GbdxYdEF6YpFmUM7n6z8Wu/7V6Uw85g/+QXW\n0VKqn1s8VXfbtKINO1bQViSFByBc0cX9TIB6eKIK4aLVUoMOT10qa6wHznxC\nJATv+FSlsrCgkgHPAyx1LQclvXHoJqencqy+2l4XMmyHA/uT+EzebTC2DBQ7\nVimb7yLz4+dPgrjNJ/afl7MSF1Ue/9mkbHP2f9glgdT+pIlS5JetMwdt2OF0\nuf883XK77VaJFT/21wmoYROHsoVFNLF5bu3+2LX/zPdg1roAKyHitY0tYrBe\nCpH8kMZg5yBXyhmvd4zr+PDlnmhf+yeJldbYc0w7pN9nAeMB0dq0k2UQwSNG\nJ6MxO93fqD5RVDPUQcTJ3n2tL0UKsckz3BEssgejsY0ch+1pYgMKYfNn9gB1\n+QECOzhMiTW9RPq4fsuPMUE8OTBdno05PKq0dcWOFOQv7IG5mfziiOd3tOoa\nfCdNqJnEeHfQVTvo/4VRAFwQrs8luuBL9koK5bgYoVoeltqt4MLmiF5INLWE\nIVfWTPuGLMFsHzo9kY9qS38SOYYsjE3+qrEHLr1t4hx2gZ2FBSMi3FNAtuun\narB7\r\n=yDJe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDR1myXiFo7qkM4FyBzH3moHdEjtY6tJQX6s6tS27K/5gIhAO2W532leQy0kw29/oI1CVceL0jMtUhBcjC+ftMAhH6+"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.39.0_1638359309389_0.27669915518659427"},"_hasShrinkwrap":false},"0.40.0":{"name":"minter-js-sdk","version":"0.40.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.3","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0","minterjs-util":"^0.22.0","minterjs-wallet":"^6.1.0","qs":"^6.10.1","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.0","@babel/eslint-parser":"^7.16.3","@babel/plugin-transform-runtime":"^7.16.4","@babel/preset-env":"^7.16.4","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.3.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.60.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"4c1c88186b55bd084d40c22bd8cd77e036c9193b","_id":"minter-js-sdk@0.40.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-11bRm6M4JWy7YNvLy5cLFN91nT07SrMTlDSNFvebxCY4LA6w/IcGdhAapF5dsYH517zzGc41S/R7Pj2ktj2DYw==","shasum":"f6bd4c51b1fbd8577700a8f33a7b161749869389","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.40.0.tgz","fileCount":205,"unpackedSize":3050354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuhJzCRA9TVsSAnZWagAAQhkP/ju6ry0wCaCQT77J3giU\nA6uvLPnqNRxfdlhVIgeb9CBmCVnCOi1oITa7scKJATOwtlKj2g0FZxBBSE29\n0T4sDeDrPYjaXPkoxEMCFOOukgL8+VELoJy78EqqZFpkkmRDWyVqSVBOm/K4\n4+6pJDzgCy7zQP+Sk9CKE7YsnyztloS+GDwRazundbbhOG+e4aKDX8WTuanu\n1LJkWGzFdAV5cIWsLGmUAzT6LivI24Ho/0bxjl2eBNJDMnbWAji+ycyQgNuP\nudiKkXf/iN09+LAUjBSUxdomYDwqKWUbmUBqBnswfRGyfmkRcGg/MLWsaSPq\nWDILeT48Jq89QbtV2n5gp857tbcLzopnlG1P75Bi7Pt7Iy8KmZNAmjY+y2Zv\n68XcnWHnGc/U0Dax5EPfk+xbsWBJRE3np2de5tFbccB/wze0p5XNtc5ZFwWd\nNMTmwkAGXSLf+C0PHWHbrAFaqmeQgciJynNC3bmaQQCEyQGKjYWF+GdWRe/P\ncv/McOTCYCo432uT0E+FvsXI9JkwtdwghXHzoe4BOiBq0GDw0zE0oLunZWGO\ngPVubag1x0CVigvJHjQxDqkZHblU2HjBt5dj2hbErRQ8+Z+10S+/1G5sBEsy\nvVO//CwZMfYPPZGgUbx/c9/cPfW7GoomBOYfQSNah7cAj0v7rPQMTRhPpMbb\niHM0\r\n=yy71\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMKkAU5iour8CpZVlLNnWQ7m3BLGDFh+OdS/OWJLVIQAiEAu0o6DR7cdmITDggiFrq8SaB+ayzHM7Z+ekXPyTV13nA="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.40.0_1639584371538_0.5951062482336478"},"_hasShrinkwrap":false},"0.40.1":{"name":"minter-js-sdk","version":"0.40.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0","minterjs-util":"^0.22.0","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.4.1","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.61.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"4a6f52636adad6c0f0d17b0d8da29ccaafa6f72e","_id":"minter-js-sdk@0.40.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-nwcTvIvhQEOJpprpqbJ7wh3Hu7Fer/iP8e2IMSznyV9AAg28lz7mJBvzSRUR/0mQ5W8V0UpAAkSPCZU0mCxF5w==","shasum":"cab185d441719553ef967e421f261739ae609e75","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.40.1.tgz","fileCount":205,"unpackedSize":3113439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhux7BCRA9TVsSAnZWagAA4SkP/Ag7rGVGilCQfTtA+oVw\nr46I/sY/Nrd1txx06ZpWUhamDX1aG+cb2J1lIdH5CXlcPFxaWhKdehLjgIXl\nTQITneVwgMR6WhH6GR5RJtej6EmBZkxlTizuLqjk1XMHOebULvI0oF8wWKIm\ngWz+FHBtrAymFDKfTOTQtz1Mv2q9er3DulEYC4I3fLNVHFEbV+iE3IybEdKm\no+BFziqqPMNhmI5j31gB4vyK3N84MAAA1uIPKOlfegEO/ELrnDGZItCP9465\ni8nvOAtb5WTZ7f9l00Ry4tQU+qdGdnwMmB6YzuLRhfpflJbMpMIfjn0oaacG\njLrdKLwcNQsn25w1n9PtV2JLGnGrjiQ4Yra8EmMp02l40muR+HAh9O7tsIZe\n/LIb+SMkSkcuMbStPsnb9p8HjEwaEJqXxv3Q1Pxf77Orgv1gqzUOAEC7jSR2\n03iwENCR23/6GjaOIUVBssmoT5JC+byq329Q84eGP4se5P1kjmMEotPBOtvD\nmri0EsjthPLmbuQG+KunkQ/D03IXFL0PPksgbiUXMFdtHG4PITzZqySmi1XM\nmuWcZWPkzWlJx9DvjSO0Xao2jiIljUTCf3Wp1E+SkNNGwgFIKiPmx4zSiAAd\nQzX+CNA5F/P1cUmlyxQ8NImVxkosPxDzlGHm95byIOVjzBt+68ByrYeNkNDq\nYbtH\r\n=GsE1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzhB5c+MvTTv1RsVPYfFwpfsosVMIaXOtETAe/zOAcuAiBwK2R0zryVoOJIieYz7/KyfMgvL0tnoxYSfbg64fw7uQ=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.40.1_1639653057251_0.9184010783682119"},"_hasShrinkwrap":false},"0.40.2":{"name":"minter-js-sdk","version":"0.40.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.0.0","minterjs-util":"^0.22.0","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.4.1","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.61.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"30b9272bf718ff32178b65aa2cd4f64f76ef11f2","_id":"minter-js-sdk@0.40.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-rax2tQ7+dvrhbR0JP3mE2lfyCb/xBN+yqR6uun+brYp8UPZcbkb1hVpJ+XCkF9mPC10GVDuROZPgpra9PszueA==","shasum":"c89bf0e41ef8fcf86268806526d37c5a6b3a2384","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.40.2.tgz","fileCount":205,"unpackedSize":3114078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhu1aZCRA9TVsSAnZWagAAyjsQAJFS+Udrah5MZEXB/5XU\npfmn8TRp9aXnYZW/LzSTch8JKRKEuHtPSKU/zS0FaOPfqBsNTGvSKRPN57fZ\n09vMMWtEvLjWUB8tVW/mkxoHYWnarN8Hhgqi62K1QbSCDU3xF6Pfs5fQXljZ\nZi8rDiTHHApWuDtq+xkqnE4leCGY7M/+GqDkJr0x2BvlAnX0ARfX4I3qbtT6\nIE1zZ9+8VEG/5vlaTxH/rK+LCwo6F1pCGOhSzhla/El8wWi3btp8c1uRxJLS\ndBjoek9YZZQQeo3KVyj5d/GPxeKxG9RMzFUzF9mrbOhTWI4MJYu/BtVrmvlU\nxuAszIk8Ez2LixcVFcoNEhxOkJrpkMK6lXN6h8FEEA/mXPqW7PhTRuWGMXwk\nJWEkk6aGh86x+a5JsREttLrDAnu/NpEpfkr7Bu1vdQhbyUGJbcUqa1ovi19P\n+P8hDCXJYzysUeuWG981Z+7TXV0IrEthzsXDRBmCZX2xK5hWZBCi9oVcLx5A\nD/VGVXDgGq08NUR29YztjNYjuG79QGXXmHqFuLjaTEwEHeD5vlm/NCSLGGxZ\nnB1livwVm4UatdjPAheYpRZvgg4r2atAuvY1qwJeV/56R3VaJ2Vu5SJ9SDG5\nf3LXeoiW0Zem/o7dS0by4E1fJmrsK+LRCG3w3jg3zzZWGgdVdZV/v8eB79BG\n61HP\r\n=Ji4M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCwlTIvb7MnEZw/dSt0SwANiPapZ5SolVC+3QfgMjf4AiAT8t2N7AJUOi9wSJ8nWsLySPONtlN1wMMQkTUP8yQi6w=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.40.2_1639667352589_0.6013083069933649"},"_hasShrinkwrap":false},"0.41.0":{"name":"minter-js-sdk","version":"0.41.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^11.1.0","minterjs-util":"^0.22.0","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.5.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.62.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"4d0d5d5c2b0d6ed019243a91c0415503dddc68a1","_id":"minter-js-sdk@0.41.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-xJWuj2ND0RQDMl5YjS9CmsRARsBWsdGOYxe6xhesxJ2neIxVn9CQLeiPSmDNXseoEATvP10Vnu6iNDvqZk6Htg==","shasum":"f2eca33f42f9a52a5c664f7a4eca4e42732ded87","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.41.0.tgz","fileCount":203,"unpackedSize":3133564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyfjBCRA9TVsSAnZWagAAJfwP/1OO6dvkJFSOgn7uF2oH\n7CzaJDyCJGHDtanzQ05lUHrwnxzLRm5Z/PvSMD3F0fDoMX5mnxaSl+Siw5QB\nVmu9Ustyj1pPUY6CgS1VshlbhhoucBsG/ZCWGj61jvjbMkpmHA9NkWFU7IRe\nsrmwd5D0NFXM9HN6lmmH8wDNnCU804qO6lL42PGrvd/Ad/a3I14kQCRdqNRK\nTccBMlpUrKAv8hIBTWE+2M+zOdgCyNBah9+7NIqbqbm7hAD/U9XNaVOLmROY\na0/sJQKN59Dn88yarzVZ3TK1SwubXFGDL926Qe70D20uhDbXggsAw+wm6tR/\nP4Gad2zdaQJKqnZZNY/kUdg8j2Pxey1/aEmO+HUaVrI6wRdyuUOORlVYN0ae\nJjsiRZ6vaNs7hW4C/t4vI65Ze+85S8KzmSkIAM23W8h3BjYlSmsY5BbZf8TP\nsFMun6XdV/MC6wEjpLJt5g+ibrfp4qr5ZQ7n0AXeU/axxVh0ACHIrbmoTJlb\nhamo5Hskppni3CMXepAB12r39cFX/mdUaMYgDfhoIDhPpUzYYINmi3GC7K0u\nl/fOQdsVAqlka0m+irJXPnXQMmApKuHMYznreTr1vOmObyklS28AWCDHxQOW\nbxv7OOpvcRQizxewqs5hjWy9+E9BU4RHGILOmsIG/fJYhQ7wCnFz0YJQk19P\ncUZt\r\n=imSv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGkldK56Nq4gAhE4alHWv9cQ1PLwJGpApSykWUbI+hyXAiB+D6ki6OSeU8M2m+0Qescd/0cFDiL1GNXj58XTKNFN4A=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.41.0_1640626369475_0.6337016980650636"},"_hasShrinkwrap":false},"0.42.0-alpha.0":{"name":"minter-js-sdk","version":"0.42.0-alpha.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0-alpha.1","minterjs-util":"^0.23.0-alpha.1","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.5.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.62.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [getCoinSymbol](#getcoinsymbol)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinId](#replacecoinid)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [replaceCoinIdByPath](#replacecoinidbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Add limit order](#add-limit-order)\n    - [Remove limit order](#remove-limit-order)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Lock stake](#lock-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Lock](#lock)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [getCoinSymbol](#getcoinsymbol)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinId](#replacecoinid)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [replaceCoinIdByPath](#replacecoinidbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 0\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((id) => {\n        console.log(id);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'MYCOIN'])\n    .then((ids) => {\n          console.log(ids);\n          // [0, 123]\n    });\n```\n\n\n### .getCoinSymbol()\nGet coin symbol by coin ID or array of IDs. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {number|string|Array<number|string>} id - coin ID or array of IDs\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<string|Array<string>>}\n */\nminter.getCoinSymbol(0)\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinSymbol(['0', '123'])\n    .then((symbols) => {\n          console.log(symbols);\n          // ['MNT', 'MYCOIN']\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinId()\nReplace coin IDs with coin symbols in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0,\n    },\n    gasCoin: 123,\n};\nminter.replaceCoinId(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 'BIP',\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinIdByPath()\nReplace coin IDs with coin symbols in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 0,\n        },\n    },\n    gasCoin: 1234,\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinIdByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 'BIP',\n        //         },\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasPrice]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `direct: true` (default mode) makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `direct: false` makes several requests for blockchain data and approximately calculates the fee relying on that data, but don't take limit orders into account.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: less accurate because don't consider limit orders and when caching is used, makes more requests for a single estimate.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `direct` field, `true` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.direct]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct with raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct with tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {direct: false,}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add limit order\n[Tx docs](https://www.minter.network/docs#add-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.ADD_LIMIT_ORDER,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 5, // coin id\n        valueToSell: 10,\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove limit order\n[Tx docs](https://www.minter.network/docs#remove-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIMIT_ORDER,\n    data: {\n        id: 123, // order id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Lock stake\n[Tx docs](https://www.minter.network/docs#lock-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK_STAKE,\n    /* data is empty, so not required */\n    data: {},\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n        failedTx: '12',\n        addLimitOrder: '12',\n        removeLimitOrder: '12',\n        moveStake: '12',\n        lockStake: '12',\n        lock: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Lock\n[Tx docs](https://www.minter.network/docs#lock-transaction)\nLock coins for certain period\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK,\n    data: {\n        dueBlock: 123,\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"aca2404ee5c61dca818d5fc5cdfca04f4773bf83","_id":"minter-js-sdk@0.42.0-alpha.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AbH8sZNJGyIQmSMiUmjfnbdInV0NS3lJa3VlnXtHAH3ma27Y5S9s6Atz+9dsqS/MegPv7qVuAExPWIpvPOMhkQ==","shasum":"2c004e7de247c9f0779454c5014ecf18ab354231","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0-alpha.0.tgz","fileCount":209,"unpackedSize":3159818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHgXSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSyw/9FRL8FI4ASB59rioFDS8fIAJ//09V1HpeZ4eWZXAMDKm8pvZj\r\nV4++xjvyGaNazucZvdM/g509V5FfdsLoxfiNAydR10HQigIbAtl42uZt8QVY\r\nvJFydi+dMwxNtoR7YDrJTzo9KuDpb4NdzVQ2lI2ric0HFi2ARrExnUXjiVVQ\r\nUQqeUa2tG7swIPh+tHTLD6So1ch5eG7c1SNf8itoFzFquG36lDk5nvT6tKk5\r\n58oZV8HCbLeDDuTduufUFvFnP6zmkd4Xp2l0qaTD63oN8fm38AmeLd5SZMZM\r\nDtO1NbmkxzYpKQ+M6GGzNCXa2WSKc3TIDl/v3ZvHTuk+fQWbXggI8XNW5Ocf\r\nxA4jRD0NGtdQX6TjISUBWN3tcXBGhjYt7H8BjLAclo4YOz88fYy+U+nQg+KR\r\nVpeIbwAH2uEb4ebgY1S475AO9Cmn3UV7zQnbOaVgrPbp1/yVL8rZGSr9K1ae\r\naR68W8Q53j+V3KI7RwpfuZnsJ5vDE1CHXVDiwSNkbvnewZI8HlD1GLWHhFwX\r\nEcEBDZm9BGQ+SHTHzKySdUiYL3qKF9W/XwtH/crYmA554pZyvoET0hT+y2xN\r\nTfFV+GduJQUNN/oVU7V2fCRTgy9zOTHBpq7cACWeIugJExEHiqQ8pWtzfEGJ\r\nvRW3H/M5QENqCwjBOqeEZdXT/BFP83ZL3vM=\r\n=r6YL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRrpgGfqmElVZnMvVIlGKx+w7+dYuuXOJ9y7m2T7JCAwIgB37KnliLYw8d4cLqBApkX1ExC61YRmWTpGPiZWcMF00="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0-alpha.0_1646134738741_0.31000108706176266"},"_hasShrinkwrap":false},"0.42.0-alpha.1":{"name":"minter-js-sdk","version":"0.42.0-alpha.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0-alpha.1","minterjs-util":"^0.23.0-alpha.1","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.5.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.62.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"82f43b70cc79461554ca037b2a7ac5892a66bb6f","_id":"minter-js-sdk@0.42.0-alpha.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-u5hQdbNIPkj1K4Vx2agtQbQXSSWFDwxkdOktxre3GdiftOL/YYHpnErY6YWXM1Zy91YZRTRyUcANU3KsNB6Wog==","shasum":"5e9fac92eb316c3d594c825a6f9305a81deacd56","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0-alpha.1.tgz","fileCount":209,"unpackedSize":3161227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJittACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiKA//VsYWSZVy5cZVn4WGCmo0BABERkCgo9wubU9VCIlS7CGq+Ynn\r\nZxO8hfQFrHuMZtvGvpgVWtyjFV3ae8t9MpnZS4PjyxhXD41cYfFbNvi/v/UQ\r\nWIJlGDo5iTT6rpux7Ohx70NpV5ct8+bbHkIVsdjmaiXP/6S2k+18Ol9UVka9\r\nYnLBx/qULFFbCnJrsL2ieEQnujKZGvRFyaGuPqTlEj4IGkCMCudLclHLJ19L\r\nTVK6cV8eh5xXNVLM2Eo+zkQf1ENVL7OTyxYflxX/nJg9WXmyM9IB6ouEhiyc\r\nYou2nP8EFXU8xZr5s6QqiMUXVUrJ1g1d2eVGTM3ytYuLy0xtFdJ8SoHuw4eD\r\nRQ32IKJcmOxZudF8B9QhenjKVgW9r6jDP+u0UZvF40j+r/LKpH2ZqiIxY2Z4\r\nYkhg4W4az+b4JxCd9u38jXalqGCug801IPgBxfRc/RM+L798pOjhtswyiVi5\r\nHP8xyqj9TVQGGEMgZgK8pzjR7IczsZChAsnam/LPPzz/OmH/RYsxNHZbAVmy\r\n8K7sraq/RawIeKMoQIpT+yJgNVr6owe+XUTcalwxRqUXTrKQwsezhoyvktwu\r\nTn0qIF0IycGX9K4QvbOS1wgfiJnSiz73qhz+hO7KUJvwchy9DLG0SEDQ954k\r\nJMlaZP3CTC3rp414EGNDO6v/0VS6hyMpnIA=\r\n=czCV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiktf7IWFZjk5KJgEeUr48ZnHbUHT5LSFo73l86yfqeAIhAJoSmvjnpv6mnwibdBJ9TXAdxiRo0DYnA8gVKNDLcDrX"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0-alpha.1_1646668653609_0.48819516174056066"},"_hasShrinkwrap":false},"0.42.0-alpha.2":{"name":"minter-js-sdk","version":"0.42.0-alpha.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.16.5","axios":"^0.24.0","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^7.1.3","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0-alpha.8","minterjs-util":"^0.23.0-alpha.6","minterjs-wallet":"^6.1.1","qs":"^6.10.2","rlp":"^2.2.7","secp256k1":"^4.0.2"},"devDependencies":{"@babel/cli":"^7.16.0","@babel/core":"^7.16.5","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.5","@babel/preset-env":"^7.16.5","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1","babel-jest":"^26.6.3","coveralls":"^3.1.1","eslint":"^8.5.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.3","eslint-plugin-jest":"^25.3.0","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^39.0.0","jest":"^26.6.3","jest-circus":"^26.6.3","jest-environment-jsdom":"^25","pre-commit":"^1.2.2","rollup":"^2.62.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [getCoinSymbol](#getcoinsymbol)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinId](#replacecoinid)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [replaceCoinIdByPath](#replacecoinidbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Add limit order](#add-limit-order)\n    - [Remove limit order](#remove-limit-order)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Lock stake](#lock-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Lock](#lock)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [getCoinSymbol](#getcoinsymbol)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinId](#replacecoinid)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [replaceCoinIdByPath](#replacecoinidbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 0\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((id) => {\n        console.log(id);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'MYCOIN'])\n    .then((ids) => {\n          console.log(ids);\n          // [0, 123]\n    });\n```\n\n\n### .getCoinSymbol()\nGet coin symbol by coin ID or array of IDs. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {number|string|Array<number|string>} id - coin ID or array of IDs\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<string|Array<string>>}\n */\nminter.getCoinSymbol(0)\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinSymbol(['0', '123'])\n    .then((symbols) => {\n          console.log(symbols);\n          // ['MNT', 'MYCOIN']\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinId()\nReplace coin IDs with coin symbols in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0,\n    },\n    gasCoin: 123,\n};\nminter.replaceCoinId(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 'BIP',\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinIdByPath()\nReplace coin IDs with coin symbols in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 0,\n        },\n    },\n    gasCoin: 1234,\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinIdByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 'BIP',\n        //         },\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasPrice]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `loose: false` (default mode) makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `loose: true` makes several requests for blockchain data and approximately calculates the fee relying on that data, but don't take limit orders into account.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: less accurate because don't consider limit orders and when caching is used, makes more requests for a single estimate.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `loose` field, `false` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.loose]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct from raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct from tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// calculated from tx params\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {loose: true}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add limit order\n[Tx docs](https://www.minter.network/docs#add-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.ADD_LIMIT_ORDER,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 5, // coin id\n        valueToSell: 10,\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove limit order\n[Tx docs](https://www.minter.network/docs#remove-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIMIT_ORDER,\n    data: {\n        id: 123, // order id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Lock stake\n[Tx docs](https://www.minter.network/docs#lock-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK_STAKE,\n    /* data is empty, so not required */\n    data: {},\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n        failedTx: '12',\n        addLimitOrder: '12',\n        removeLimitOrder: '12',\n        moveStake: '12',\n        lockStake: '12',\n        lock: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Lock\n[Tx docs](https://www.minter.network/docs#lock-transaction)\nLock coins for certain period\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK,\n    data: {\n        dueBlock: 123,\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"cb51069fbfc88dc952fedf724308f1de03d3d684","_id":"minter-js-sdk@0.42.0-alpha.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-RVctQHwr86fMKP+iGtMPaqeqVsATli79e+n0X59EvwvQqzhHsJbc7Cc5sOHXTegR82s7gIpX9t9GBT9JWwOy3A==","shasum":"12f2930511a05c6a78fcebfb3ec086cad71c0901","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0-alpha.2.tgz","fileCount":208,"unpackedSize":3177378,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuvcLlxhmHX6qOPR6S/Pjm/xdcXIMjsRVHAI8O0uSZgAiAilJid+P4TLT35HHds7p9GAoJpZGuv6r6BcVGNtl3nHg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTC5pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRRQ//ZSrsdhv+tgoAwpFnp0gUFadUDYsGdifeZTHHbR7pMtndV24N\r\nS7n7c1e32AX14IbcpRV11fTPbwOoQvpAXY/AahIsDQ58xdQr1wlU+aJKH099\r\n2zO98RRe5FoMSUjPu301ElVGglGtggUSxem3MYN2dOWMc01oXsnTdWqK0dYX\r\nvTlfQrcnDKvfANJOp024TGlgxIv+aTkQeUtXGLyyIYqDKbZigpq38QgJI+jU\r\nSzylI/RIo3lAAZvmQxLLXgBWQPmjhDCmXaLu8N93QisGFMQjdZB2FKbg0ccW\r\nmoCWi8WZytDL0mEePkXSI9WqGDhlxeSmJfFOjgVF7Sid1D3VnaWlCZUhq0w9\r\nuRCrXRgfaI2Bqy62LXCf3lKzyAC6Rt49r7E8YOnRLeC+RmTp1gq+HtS43jif\r\nc/+6BIEiAyXo5Te+LaGIFIcH/VW2+vRbWRashZBO2Hz8p+Gzje3/lubQatoo\r\nIMF2FIKIc9mC5fMA7BCOor0yhkFavRH1zSBlYWiZqsFgVCW89KlRrsLMZ/IT\r\n/E+U3Q+MOcs894xe/GpzBpND1Cbc5Dk2jl8dBdbHh0ZPifdInblgcNAHO0WL\r\ndMsqJT/ufAtf9RqDbAV272K6NP0OT4C685c/5dj9MENZaRDFyjKtBoXKaMpf\r\nUiLWpZ59AYm29/TexlidH4ZL+Xe/AjtRiS8=\r\n=K/kR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0-alpha.2_1649159785609_0.7404867200818595"},"_hasShrinkwrap":false},"0.42.0-alpha.3":{"name":"minter-js-sdk","version":"0.42.0-alpha.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"github:shrpne/buffer-es6#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0-alpha.8","minterjs-util":"^0.23.0-alpha.6","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [getCoinSymbol](#getcoinsymbol)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinId](#replacecoinid)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [replaceCoinIdByPath](#replacecoinidbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Add limit order](#add-limit-order)\n    - [Remove limit order](#remove-limit-order)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Lock stake](#lock-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Lock](#lock)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [getCoinSymbol](#getcoinsymbol)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinId](#replacecoinid)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [replaceCoinIdByPath](#replacecoinidbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 0\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((id) => {\n        console.log(id);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'MYCOIN'])\n    .then((ids) => {\n          console.log(ids);\n          // [0, 123]\n    });\n```\n\n\n### .getCoinSymbol()\nGet coin symbol by coin ID or array of IDs. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {number|string|Array<number|string>} id - coin ID or array of IDs\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<string|Array<string>>}\n */\nminter.getCoinSymbol(0)\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinSymbol(['0', '123'])\n    .then((symbols) => {\n          console.log(symbols);\n          // ['MNT', 'MYCOIN']\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinId()\nReplace coin IDs with coin symbols in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0,\n    },\n    gasCoin: 123,\n};\nminter.replaceCoinId(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 'BIP',\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinIdByPath()\nReplace coin IDs with coin symbols in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 0,\n        },\n    },\n    gasCoin: 1234,\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinIdByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 'BIP',\n        //         },\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasPrice]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `loose: false` (default mode) makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `loose: true` makes several requests for blockchain data and approximately calculates the fee relying on that data, but don't take limit orders into account.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: less accurate because don't consider limit orders and when caching is used, makes more requests for a single estimate.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `loose` field, `false` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.loose]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct from raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct from tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// calculated from tx params\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {loose: true}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add limit order\n[Tx docs](https://www.minter.network/docs#add-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.ADD_LIMIT_ORDER,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 5, // coin id\n        valueToSell: 10,\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove limit order\n[Tx docs](https://www.minter.network/docs#remove-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIMIT_ORDER,\n    data: {\n        id: 123, // order id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Lock stake\n[Tx docs](https://www.minter.network/docs#lock-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK_STAKE,\n    /* data is empty, so not required */\n    data: {},\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n        failedTx: '12',\n        addLimitOrder: '12',\n        removeLimitOrder: '12',\n        moveStake: '12',\n        lockStake: '12',\n        lock: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Lock\n[Tx docs](https://www.minter.network/docs#lock-transaction)\nLock coins for certain period\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK,\n    data: {\n        dueBlock: 123,\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"0da4863a770df6f78c6b48e1b564c94ee2a7388c","_id":"minter-js-sdk@0.42.0-alpha.3","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-v7uSyNa/q+moZPvEQLVo/3sPrBEtIVoijGod+hEmuK3y/GPWHBct+ta/mU4ewU3rppPW5pVFtzv+27wfUqozRw==","shasum":"2da6388d20b449a2f6ba4ae7f04029e82ee46ae7","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0-alpha.3.tgz","fileCount":208,"unpackedSize":3177142,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjWZ6qC+/KCkpn6C/AbxC+eUHqxjTmSEYpt1ZDNTj+6wIhAK3ZQjIy0BurMSkrKYBt+uLKK3/7NWArhWLerUJlFLiD"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTDMlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVBA//YeU/86QPYGQlTFECBDL/cXBWuZyzi7vebNyyPMKCiQBnG8mZ\r\nWy6UW6nmGKpHwSzyUcTf2O+sVk9P7olGupWTk8gIgvBY2Oa7gcaeiVAszxzE\r\n1goas2rmVv5kKmzoJeaW1+c8fcSF4N53ayQ5o2jUPkDQUJM3gWjhFrP1Fn9w\r\nymoB6SEy9KE2B9rJjjtliu6SXetkz2BSZEvTiGtAEScBjE6QLyEILbx+egqo\r\nj91TO47HOQwUG5EURxdgyLppWmkm41YEN5ss6SP3QSlHvUlS+PlmTMG/XuM1\r\nTymA2IqPSZfMaLF94Q8SkCw50HJYXRAG7jFWSqq+dwqYPZGwghMsIExcqLCO\r\nR+962RZyT7OmjhmWHOIRs0aKY+VRZNV24iVvNRLHO/o5bXNNeJ0M6Z0Ti/yW\r\nav0JnAP6qmOIcDddItzFkCc7pO3up8pibzMjhJQk4cNgMPMz1Md2MzDl3uXY\r\nUWJSeUirAu9G3Dx19x4BhwlELCoog+eEKQ02vuf7SjeZmWcuGZsc1W9Nwy/u\r\neriUqobRXYj1QJ+XNYnCeoPmkohUN1AS+WfZdOK5HnK59BCGfmJFA6E9cT3P\r\nO7ouUZxYs7kTkQjvwBM9k769hX1tU1rdxESS0rWeN203E6ewcPMFxHXPANJk\r\nP6fO77cy8xVwjLZ2escYGtf/bPHVa/q+lNM=\r\n=UNj8\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0-alpha.3_1649160997271_0.42875371770182924"},"_hasShrinkwrap":false},"0.42.0-alpha.4":{"name":"minter-js-sdk","version":"0.42.0-alpha.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0-alpha.8","minterjs-util":"^0.23.0-alpha.6","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-jsdoc":"^38.1.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/travis/MinterTeam/minter-js-sdk.svg?style=flat-square)](https://travis-ci.org/MinterTeam/minter-js-sdk)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [getCoinSymbol](#getcoinsymbol)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinId](#replacecoinid)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [replaceCoinIdByPath](#replacecoinidbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Add limit order](#add-limit-order)\n    - [Remove limit order](#remove-limit-order)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Lock stake](#lock-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Lock](#lock)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [getCoinSymbol](#getcoinsymbol)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinId](#replacecoinid)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [replaceCoinIdByPath](#replacecoinidbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 0\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((id) => {\n        console.log(id);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'MYCOIN'])\n    .then((ids) => {\n          console.log(ids);\n          // [0, 123]\n    });\n```\n\n\n### .getCoinSymbol()\nGet coin symbol by coin ID or array of IDs. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {number|string|Array<number|string>} id - coin ID or array of IDs\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<string|Array<string>>}\n */\nminter.getCoinSymbol(0)\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinSymbol(['0', '123'])\n    .then((symbols) => {\n          console.log(symbols);\n          // ['MNT', 'MYCOIN']\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinId()\nReplace coin IDs with coin symbols in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0,\n    },\n    gasCoin: 123,\n};\nminter.replaceCoinId(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 'BIP',\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinIdByPath()\nReplace coin IDs with coin symbols in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 0,\n        },\n    },\n    gasCoin: 1234,\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinIdByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 'BIP',\n        //         },\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasPrice]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee. This method can operate in two modes: \n- 1. `loose: false` (default mode) makes one direct request to the `estimate_tx_commission/{tx}` API.   \nPros: fewer requests, more accuracy. Cons: provides less data (only `commission` field).\n- 2. `loose: true` makes several requests for blockchain data and approximately calculates the fee relying on that data, but don't take limit orders into account.\nPros: returns more data (`commission`, `baseCoinCommission`, `priceCoinCommission`, `commissionPriceData`), some requests can be cached so that when users input payload, the fee could be calculated dynamically without extra requests for each payload character. Cons: less accurate because don't consider limit orders and when caching is used, makes more requests for a single estimate.\n     \nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `loose` field, `false` by default.\nResolves with object containing fee.\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {Object} [options]\n * @param {boolean} [options.loose]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// direct from raw tx string\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// direct from tx params\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// calculated from tx params\nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {loose: true}\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add limit order\n[Tx docs](https://www.minter.network/docs#add-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.ADD_LIMIT_ORDER,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 5, // coin id\n        valueToSell: 10,\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove limit order\n[Tx docs](https://www.minter.network/docs#remove-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIMIT_ORDER,\n    data: {\n        id: 123, // order id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Lock stake\n[Tx docs](https://www.minter.network/docs#lock-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK_STAKE,\n    /* data is empty, so not required */\n    data: {},\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n        failedTx: '12',\n        addLimitOrder: '12',\n        removeLimitOrder: '12',\n        moveStake: '12',\n        lockStake: '12',\n        lock: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Lock\n[Tx docs](https://www.minter.network/docs#lock-transaction)\nLock coins for certain period\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK,\n    data: {\n        dueBlock: 123,\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n\n// This method is also SDK-instance-available\nconst check = minter.issueCheck({...});\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n\n// This method is also SDK-instance-available\nconst check = minter.decodeCheck('...');\n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md","gitHead":"3f498701bbcfe64e7501b7b6646f40d876e2eea6","_id":"minter-js-sdk@0.42.0-alpha.4","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-gfcb0TcKnWErWOyLIrNkgGSDQUS08Kom1mHQkxrE8VR8hIbq2OpEnOQB5l3J2IJNGTCj63YJL6vvagqtXHFYeQ==","shasum":"da49b7856e10f079723d265df33b8420b972c1f9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0-alpha.4.tgz","fileCount":208,"unpackedSize":3197492,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSI3bFH8skbXB3kAw8l2cVcDjz6VdJHuEuau6h9E+ZtAIhAL3QN/IxTxp3HKBsWtO/L5aBRdxARhW8LwUAo53jaSNr"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUEl+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRyg/8DT+tp+q7EqX/NCRMLaW/HBaSH3omDy9m6zS7jUpnSY8MyG1N\r\nWpmsc1q+Xn8qAMaHTkcZRM+frUNsZ4JFvGpWYw+ZhlClfKe/CWnj7/fZ3D4O\r\nnln2CuitOmX9M65CJRaDwkGjSnEyx4tRpIy8ks4EtpgDTk+cWw78gLy99D/x\r\n489NBdKi6YnoqzAqTjXF+TI39+iIirPhxRfSesqHjtOwzkFCMLpGk7a922j9\r\n2DDEGltiZuXNQJOfTd23xPpQBW0YtepTXV6F/2mw2pxAkTLqvSgcDmc7kSjM\r\n7aocmsCo5QCpZXMA4Z1oXa5dMQkY/74L4NC2PxJBXAZ8hzbtmtTKZHn+fa/k\r\n7/bz0CAE5vpwPFURMqLVXte5qzv4i9CSyDAvax4wsPpPZGgx/ivRznDriMhI\r\nM47iTUO9sHmX3YNotMoLt1F388L3w3CPB/pKslIaQrnB6/+88T1S1vs1RWNJ\r\nA9RX0IdkNATppuBNmqADDv9quGqkrKQ+HZ2VA/GwEkuu8yK5pjRAzt6jftq7\r\nW4ySOFlUFLsa5InXc19MT/Kow+DVqxbx6dZYLT750OnpurpsddSSRutxjeVT\r\nkhX63tj5WE8gg7+Xn5IfM7czliw2RpyH3q/cE2KPIunauxd/qO6R9NJzZpi2\r\nSu83jsnf7d66w742K+YTDw60aXYraN4+wEs=\r\n=/BBc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0-alpha.4_1649428862234_0.6172431194024381"},"_hasShrinkwrap":false},"0.42.0":{"name":"minter-js-sdk","version":"0.42.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-jsdoc":"^38.1.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"622737113703d2a1f8a5e7ac4aa8c0e0d7b26909","_id":"minter-js-sdk@0.42.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-r9tjTohiuziqSJY0RCNZylF3LzQif8npZURPouGmD53V22SO+mqbNkyAMMwJ6Y+U/aMkUOiafgb6MlS1qOKzOA==","shasum":"fa47c06b16fa8ec2c94f6ea7a897878d86e69a59","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.0.tgz","fileCount":208,"unpackedSize":3197468,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5/D51Bt6Jbjtqz1mqLcIINtV0iwatE7CoM4IdksXF0AiBSQdtQ3gwx+HxRxhipiTq+aV0TwDgx/dwWr7xYquSkOQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVWj6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpL/w//R/HlSXNlOpcrK7flCMGf/5P0M7x0rjJtAexEpCRM6d/9imdU\r\nmhdYSQUjG4RZW23+vDn61lc6ZaOJBLkCWxngg+gzis7gYvqsUtCWgLTPgXjz\r\numSrrpWX5eVkazSH00OCZ5nUXcgtRrbQniWfPP7OVRF3crkUqiqTJdDmmQLa\r\nnySAsu951pmzXi4e6GZvbkD7+ddRxb31LdbCUOdxzzDtgENIA1r6dmH5Okal\r\n4ELGRqJGDiqFEmwzhCEdUdhE18gJ/spNkz941SYMEz1SFymXNOkh4rsru0aA\r\n0ipRfaYcpJo+jN/z4UUAh4FsDhXR/64EWOZDxB785u3C9q59CCtIpKguY6w5\r\n8j8BtofnY72+q9VdsQ81yVdygx/l0v+/SVx6Z4iZ9fBaQjKXVL9ryvSZkZ7a\r\n/d3CHcy7I/atc2KmGnLKLZfJBbtATt0bxgpKgnibqEyPkQ62YGi9uUPeGOpV\r\nEEG4RobvtmdZnTKc9uCCTkmAYjopjB+rl0R3EF2kKXbUTipMCsX2sjlfZVDU\r\n4PCw4QksYL5UnDcV2WPL4NpjGRjqtIpOJgkqOp/CH95n1TyRvR8jAzVwnGm1\r\nE/SpFQwfeZ3MtuXTT6zgxa10FGFC54VM47VQhgB4HQ+7ZX72XjDJwM0TCxdA\r\nupljV3BOnQwon+b2HPFhpeXZnzLZph63K70=\r\n=p6yF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.0_1649764602583_0.7958193762275296"},"_hasShrinkwrap":false},"0.42.1":{"name":"minter-js-sdk","version":"0.42.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-jsdoc":"^38.1.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"a179c27d0626c54655c475ce371eb4c4b5444381","_id":"minter-js-sdk@0.42.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-en9ukd6bM5/D0vKjnTEYdFX+VRymUd0gyJPR/qmNHuw3nk/cn1sx2upymOXjbcvm70e0LWhKOwNjBEifZdL8eQ==","shasum":"940c969e8485bcd45e732bf3b87ab2c902f71668","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.42.1.tgz","fileCount":208,"unpackedSize":3197592,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD85x6ITRPhLoR7U3tuitFz0SgPfCnkzVGZ5WwRdePAJwIgPQ33cYJbkUE7UYPtg3GBNLKGY3savcg4gn8WOKHfU4Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVbAKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1Ng//SuVxkIev95lqZq8MyNd6ueKZ8lTfc7IdPEJii6K0vjktt5v7\r\nEzwhhzcMXak51tbOr6WPiyV9FjzPoIWCrKY35zPkRGaTJG1+tN4YjWCM917r\r\n554uZGuo2cbL+rTgBilkOvs2PoqQhKr2jKU+60yUSEXlVbT6dzdX6sCpja4D\r\n6LFLinSO0HvCKaCWgwCv9Rv0Zon21JCwulqVlsBII2FF8Xpj0wK0mUrmjuOA\r\nJw9rK8dVI8KADDUokmBq6uH2Mm+bWOdoce16yWy1Jlvoh5VrIHzZRBh9eFWt\r\nrbH0SnDpmRZc06+CMVt1KHunQcppCIYu2cZIjQ7UJQh3FepgGBedl96QxlPt\r\n0824d5E71w8sItKBL0jcm9AWyUgTDgOP3sTtC1T5az/TbuoJ8SGZy2EJquJK\r\nsGUCyQ0IZweL4Q/gHVguDUdUnPKnQ++4/x9n1nERNB9icoah/iwv+hDgtufq\r\nbnhYXk4WxTpcG5ZKaNjSUGQUhztJfIzFCy8mI0eWCfKsj06DGnWaxzVBYgaM\r\nY90ZR3oYBkJos29KKtjWsFe1Fe8aWLwbiEnbGBrcaIxe7xSbTu0/17Tw24qc\r\nVhe/5FfOReLlYx7Atd1MgMjpFZybnleZA2AGaeKrVBa97Rt6nFI+CvT0spQW\r\nuDwE1GcToYZsaaycA+bHOYQdmZ1bTZBIFkE=\r\n=8Uu1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.42.1_1649782794074_0.3752800249812289"},"_hasShrinkwrap":false},"0.43.0":{"name":"minter-js-sdk","version":"0.43.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-jsdoc":"^38.1.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"18b33734570f4b17bc3d218a92c2e885b6b43d49","_id":"minter-js-sdk@0.43.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-rQ6/8Fn9Vye8cUtEco9AMp/5+2eOhcGjQ5kd9hXJtLSnGbF8ioim3fLb+tjzxub8957JQ5QpiqQJzWgV5e9cOQ==","shasum":"d63169f80d1ccc43361499dc832a27e9630de394","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.43.0.tgz","fileCount":208,"unpackedSize":3202498,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfrEiqfPIQLuS4/PKXsoUHOPYjHDl/0IodUrWiQCVURAiBcmM+CQSRWIWb8j2mhbYcSoWM45fBMy37eGV91QWa+uQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWY6hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDPQ//Sn4MkDYX2tYOaDEgcNX5Yj/lfPjLNwaN8XxmauAjsnhaBtCX\r\nti1e0hsmlC7tKiK9CddT5eDoTBirSQWcZhWhFQxrTCOgkLsasKOZ0dm0sIBS\r\nyOKtwFQR7Mmo+Q/0/+fymngDEoiZERJb/gn6bXseH4Huwhi7c2LAyeI36eo4\r\nlPT3245gOrMiZ8hTZQDCtf00xxPlrERktqrNdgN3k9mRbqkokYAh5FcZ4ODw\r\nvBlnZ92VYpBgRwecXJc97p0XDPjOqFip7YX8SZu2QsQyb9NW+86ngKkHOPht\r\n5gYT2sIl0QfQ59eebS6Y22Y3rCcUAA1rJbNsid2VbQvKVH0+mi3PuZAOMz0v\r\n2sw12nZUHMaAhlVsRyn/p4BTzVHX2C+dt+UlHX/ajmzb0VWFes5z2qbbWObA\r\nVdjhQ7hDiM3lyOnRkSgU4hyIArP+q5FaR9K/ENIAxbXOfVvJsUdM+XztF4Hy\r\nXiSHrSCIqUHOV3bhGaVzgDvQgQ44Wj+D7yIt7CQpxpPZytzMez8dp7G5oaRs\r\n/7H+l3jyw0xirDZzS1KDrZOXYad8H6XwpgeeNqH8hcnn8UEUJroKZtKu3ctd\r\n5d1a11c7gem0F5MUuyWwcjaKeCEZPtVNZnFWt9BsFrWL89SY53b/SJkZF5WU\r\n7zP2Ts0+QatVZ+W5z3X95N+Tmw3hmvAMvXU=\r\n=hdmE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.43.0_1650036385559_0.615111718392723"},"_hasShrinkwrap":false},"0.43.1":{"name":"minter-js-sdk","version":"0.43.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.8","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.1","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.8","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.0.3","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.12.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.4","eslint-plugin-jest":"^26.1.3","eslint-plugin-jsdoc":"^38.1.6","eslint-plugin-security":"^1.4.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"42bfe887df926fda68cde1a557d14c21d7dac990","_id":"minter-js-sdk@0.43.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-JJaOVUSvyGI8Yg8Un3ep2VVJOxelZrGCtZwPYX4YVOWmsvKt8mbulGjPi3K6dG6bj+XsenjJKYIOWeD3HF1umw==","shasum":"e503a0ce8d505dd7bd8c5fdb84261444f81ba9be","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.43.1.tgz","fileCount":208,"unpackedSize":3202820,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC83SFN+UYmxuU4caB8xrfcrpf3rY9Wm+NnwFYJQQCD+QIhAMbF4w0RltIx3h8DTDrBORcjuc7o2cp3ig9f6AiVTVvX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXUNVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqzzg//bTeufQye5RLY/MAMpfwB4DtL4FXAyUDFFwDW1SENxEa6ehTI\r\ngRUZHDHf59v6C+PE0gtv1KcCENautCYywv5oWzzDXTmAlHzzce2ey2wfSbV3\r\nsgZ7M0w3zsAqqD1NUdguP87oleMqJTkHWa5RbFE+j9OH/zBiSACajekDrN6+\r\nHOD04ONeSJ/OEbbNk8s5wstEXPv4dHy4MKZ8x0/v8JKOd4eeU6a6+TRd+llc\r\ny2kKNbY9SqieUkBp2posJX0Q8YMcVPWbvVVllNBR9hKP6yphnqWL9xRONH1a\r\n/AOCKT5w4pn4H+iTWnE2TYYnTJuvvog0rXtFdioD/kWAnDFuW3LY9b2SQbsB\r\nY8dPpz+VG5qiGfRKeRlkQ9vfPvU4hWVBh34X1Q8/7erBCQDLP/UDbw+BCJfR\r\n9UXiRvfZ7fmhU4Gz2wXX9DbvEplBm1PxHTV2Y7/MnW34Km3ZMLlZrahCfU8j\r\nFoI53BJx1crs9PMogmUBANjU+7aCK4gxg/khOFNgjZkrqw9YX138Q8wAB1Vg\r\nynlQmDnspT47QuzVBNCWnUS4DpoVGvHYrWIhvSBP22nGSrP8t8JXcskbJlbR\r\nRMr506dMrr02e+cxMmOSRMaHNG4wH+9NYYiiqAh+Y4/J8C7rezZw+xY2mCzS\r\n/WD8VThxVPdPtZYDmCltnkqWj8VPcj4GEGE=\r\n=7DFI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.43.1_1650279253087_0.1864239192334043"},"_hasShrinkwrap":false},"0.43.2":{"name":"minter-js-sdk","version":"0.43.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.9","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.2","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^21.1.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.2.1","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.13.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.1.4","eslint-plugin-jsdoc":"^39.2.7","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"7bcc980c9c708829a61b99cc7b7c14edc6c23477","_id":"minter-js-sdk@0.43.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-n783H0ynGce8K86DHLEhlxi9TJ4meEpamEvJ7vCoopXB/nIQPNmcr8mrlA+UHEtXuhEuwEVHb8MywYOoskhqPw==","shasum":"6e4efee053e478df13897e9363244a7748247e0b","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.43.2.tgz","fileCount":208,"unpackedSize":3192912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDi6N9NbTJkiHQ6DptbfkcbvtzX/SUprh/J96kJMlM6JQIhAJqXN9UzjyYLhJSV6a/vPxFOnohGbiAcd1o66FhUXvFX"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYwTwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprEw/9E0EMRp/DxhEtV5tlIKWj/d/dZIZrfn0k+8YfU1CCusjlO+nE\r\nxEIN9PR3YJUrRZk4sxzHbTZ2SmonYVTupe3uMJI4n875v+1qhDOGAYsZItEg\r\nAPF5m4b7WnbxNd4JhMrW6nUw8OoMIhxk0Qd9wKe30vy1gVgcYqqLNJU2mZ0o\r\nlXfgXkJjBlmIJSnQkiSicDUlha2ytsd1ELi7W/J545/gP1yAnMEGPgaajCul\r\nhXkGoJ3W+liOX0x/8Yd1a8MJdcR9N7VMQdAf3GfSn6OFpt2rZe9KHyhIIVuH\r\nOytgDMAaxyLxVQ6qnGqbbATm3mx8SAQC2EmUU/miq+Cndl19CagulWUh6H+c\r\ncDrotaGboIqkSonoswx20CaWgTb93LtuNRbbO+PDVekPzQEw9HaEM9lvjVTJ\r\nBPVjSmVMF8jBAhyBxxjuQA53YqTA7s59jRHKCJGkO0usxtVLFqKJBdBnIPaO\r\n2d4LVY1PRzl2m3JBNJ/XIyqQ7JQAxa6i5mfJgvNavwWCyQPBQdH21QZbqejr\r\nRRnniVDOCz5fVLrzjiw/rsDOSQmrc15QswQ2/23qkb0MJE4UuoBemSF5vKGT\r\nMdOFxAkUJyOb8ngM83eYNk8xYI2y+MFwJxTcmnHdEPM9ei4/PHyKhmEE8bXg\r\nbcLhM80b33xFQ+WbwUrKNiFq36ZYOc5vvLg=\r\n=nRS1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.43.2_1650656495633_0.3991037404266997"},"_hasShrinkwrap":false},"0.43.3":{"name":"minter-js-sdk","version":"0.43.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.9","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.2","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.2.1","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.14.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.1.5","eslint-plugin-jsdoc":"^39.2.8","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"85e338ee1453ccf4c17a221128cc46ad2893db84","_id":"minter-js-sdk@0.43.3","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-rgQlHHu7xjXlsTi3INSL1fK5QDQ8aUEs648SrPT6y2im6CPqUGrZLeI8ipnIRZOkNGyTKeu6vVUBu0rSHnxDOg==","shasum":"54ccc5723a728bd8d0a939d440f3715cc5f9383a","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.43.3.tgz","fileCount":208,"unpackedSize":3402687,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYnpskwi5S62Q7Rt3SQcmdNFNZmSWzXuS6koYUgdsQlQIgJtZTVC8KMLjcEn3aS5Gw1KuqNh9e3nPBULZ5vqMusE4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZ7NqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIsw/+JIyvQgUAWmehzKLVg24Q9NKLT3GxMFyTB2ozYX3FwvzivDRw\r\nxQQ/0MY5o3tp2f6nzsh/YD12RimzIZeYGrrioblthE7pJsQ2hIpc5xq6cetx\r\n9gsAW0PTtU8FCi2LYNFf+5BWG6qBdCCcIW9G1Hr55ABwrKRLsnMu6ftaNmAy\r\niaTl32Vbz6MGDCyUBZ2+JW8Gc/wG3+rH1HpTHeQVmBEt+0vfgCRkqvw9SVrj\r\n4iGrWwNvFi0v4bnP7QBvtCM8DjFPPLPlfv+BQ66x1VRPPZcEuGOdbsgeaCFy\r\ndLKvCe5rNqoEGZ6UhCM8bE9a+9ZHQ6YfQ3v+i03o7vf5J6IdRtgdFLhz1x+V\r\nXhEq9LYCyw9ksnoqTfZpRsnIVptMgCihESuTEuqjAkCWZJtVX0lsJbYfs2Pw\r\nztBvQBVI5zm98aIknD8MXywQ9HVuEFMbN67McpOzxMsL18diaIFWsFG1gp8E\r\nqhpCXVhx2xky5gJHqn8zbu7tE99yIyqfo3eCX7lgs+9rAZIXF1nRgj8XnVku\r\n8lssWRzZyK4foV7RePVUpieN9KHIqmJpEw55UdFIMV+0j35z2ss6jsEfwjmi\r\nvALn1ARHssEgkw2W0NMcRBYSrzGPypXntu8r3DsJJiCoKqpDqr1LSJzaiBQx\r\nhy0WqclTUppNcB/2DujZsEL1vs4kL54A/QM=\r\n=jFc2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.43.3_1650963306524_0.5072492685595273"},"_hasShrinkwrap":false},"0.44.0":{"name":"minter-js-sdk","version":"0.44.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.9","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.2","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.2.1","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.14.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.1.5","eslint-plugin-jsdoc":"^39.2.8","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"151eeb3c9f7b55c6fab64de2187133d136e456c3","_id":"minter-js-sdk@0.44.0","_nodeVersion":"16.14.2","_npmVersion":"8.9.0","dist":{"integrity":"sha512-c2V2pesxKzbQ05K4EN/WuU59R280/bK7ovGXtIeq+4aUp5g6/QRWOAo0FfPA0T4Eyc7qtpyyVWZfmn9iom9e2w==","shasum":"89cbc84bec51f30ce9fb3e49f789118fe063e2da","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.44.0.tgz","fileCount":208,"unpackedSize":3419659,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4lkQ8XLy2RMk21Mc9MawhVPUzu3/aoIOkFI6VQ9OuxAIgW7cuzOFgMtbOEGJMtKvyyjpoxJgEPx1QMcc+jfDYzxU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilImiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNVQ/+NWqGF1xPMi/E8ZUTmbxywLZJh1gHAF0QxYDNepTNg1GREGPP\r\nHFAhpcqywWmNdVGb4hK6tEPk663OgnDotVjoRIOpVCZ75ML+SI+W+4h2CQEv\r\nz/eMNWg4rYfTwDt2UsE7RAgnlb82dKgumL5LBb+gjoop+8c+zCa0BSEfJSwW\r\nMwUdBphL3PpPp5Ano/ANILIsdKo6/gr7aEvXDy9tGQu4KH68Sw9ucbbjm9s7\r\nroz/NogHmiVdExGRZqTWxFhYdxwe9brcq5l9tl0pQ1e02CCq9vOEkpyefjnr\r\nIr+2l/45e/ACRSGZgoVM57pOsdrsqGC1u5BXp3aJLkSC1fkzbD7vnJVyzZGP\r\n12/86EiEAd1Tm3sQBG5/TzM8JINk6zkCwByaxu+oum/9o/pvKcamp7vVWwyM\r\nsvERBq2XjODiHtlIwetxcLWAGolRCGTWysF+1wnhunFD1CjiScnECeQA0iCY\r\ne1TmRtFCPeppLNUuQwSNxNKP8JsjSBibpdj389qMLMuiFFQhvb0nHeET40j/\r\nzoiwJbOW9BePpiUecagv7F+BzE7iPj8c3/IDt5Kp6BzsmQyZosLcXmdexOLQ\r\n9/dYHlDumHIgFAAzNga2L9Pz0d5/F/mIasrOBsJMUl8vBsDFsAFfaiVNI2Va\r\njUTine/297XDA/f8iG+mpMgWbyVu5c+3t7I=\r\n=vqLd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.44.0_1653901729792_0.30774517417481695"},"_hasShrinkwrap":false},"0.45.0":{"name":"minter-js-sdk","version":"0.45.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.17.9","axios":"^0.26.1","big.js":"^6.1.1","bn.js":"^5.2.0","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.0","minterjs-util":"^0.23.0","minterjs-wallet":"^6.1.2","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.6","@babel/core":"^7.17.9","@babel/eslint-parser":"^7.17.0","@babel/plugin-transform-runtime":"^7.17.0","@babel/preset-env":"^7.16.11","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.2.1","babel-jest":"^27.5.1","coveralls":"^3.1.1","eslint":"^8.14.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.1.5","eslint-plugin-jsdoc":"^39.2.8","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^27.5.1","jest-environment-jsdom":"^27.5.1","pre-commit":"^1.2.2","rollup":"^2.70.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"4ffd1c8b462c73ad9ebc4c00f4463a902ca90e7a","_id":"minter-js-sdk@0.45.0","_nodeVersion":"16.14.2","_npmVersion":"8.9.0","dist":{"integrity":"sha512-Xjt097QIhTrkM4J/aEUOOJIKUr4Qf1+9O5x47t2iH0aksgAvePaSZelkwTyVMr8hur23gFIwpXpzbIJbuwu4fg==","shasum":"e07353742acc7a2322f7878cd0b82dba7e9a4be6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.0.tgz","fileCount":208,"unpackedSize":3448407,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkANdYn5lg1nPyBZ+4662DtSMFQAZlo7SJyt3plNheJAIgIasNacbwryAoAv3nPz+8lkBd5QZQJld/EHhYNPRpolU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiljUtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmonjg/+ICeES/6RmYxRpmeLb0pGdg4PkFtRsOBZJJGnvrA3aXc+Or4z\r\nxWCe5iaExAB9YfgzTwdUAWSlg5jdh01pRKMlMvjhETlhHw2jKpn/1QvLpYD7\r\nqrOQueJ9Tq7miUOHRAP2bE4eVdp+eDyWtgt27fB8WrfMrMP5on+mH6tlXvqa\r\nYKitbm5aLfR/TRwILkihXQyMt9a4tP1bcya8qRyq7makMpor+ijKCBLauXsT\r\nC7mwXqbUPqkrH4w0bav6BpZb0xqKbe/msnKdcRA/+0xGLBIMKib+duUTPfUj\r\nKTdFjfsaxuojlSIbAZSZC7pFSm/gFqTk/JC0zSroWqXoNNEf3rgr5WvyY+7s\r\nGVgaokCcykXN4cXL132175dPYri4Nxs/xZP/Iy9crVDohbgIBw+M9RIYMgeP\r\nZJ3wOqVe5JdqZY1GwdH+YHgJSTQaFUKboiEJpEecDXwX7/goxIvweoXUDPJ4\r\nos89bPRalp4NNcBpBAvEE/jX0HMSEB7e4Z8of+PumU4TOTrmqyVBqgIRul4S\r\nbC94NH+bTYXPspIcgffjkbUzch3m9BpLnMo9YEt+WtWTLOaWpOFzh25Rkp0X\r\nF5GtrXc1Dd4R64X6a7TERiwL25O1r3oISv4uZmO00IJLMaiUnam6qgl+eyvI\r\nVeZJ2ZD8lBIT1UE0wafS1Ps+bHNMEis6/L0=\r\n=7QN2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.0_1654011180999_0.9666641803048333"},"_hasShrinkwrap":false},"0.45.1":{"name":"minter-js-sdk","version":"0.45.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run test:bundle-browser && npm run test:bundle-cjs","test:light":"npm run test:src && npm run test:bundle-browser-unit && npm run test:bundle-cjs-unit","test:src":"npm run jest:src","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.18.3","axios":"^0.27.2","big.js":"^6.1.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.4","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.1","minterjs-util":"^0.24.0","minterjs-wallet":"^6.1.2","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.10","@babel/core":"^7.18.2","@babel/eslint-parser":"^7.18.2","@babel/plugin-transform-runtime":"^7.18.2","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^28.1.0","coveralls":"^3.1.1","eslint":"^8.16.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.4.6","eslint-plugin-jsdoc":"^39.3.2","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^28.1.0","jest-environment-jsdom":"^28.1.0","pre-commit":"^1.2.2","rollup":"^2.75.5","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"9ebd875d8139602caba88a716daf76f7be8042b5","_id":"minter-js-sdk@0.45.1","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-+bRaX3Eg5mOWE7DiCkgtkuFVEkLcEfRCXqXRytRRMqJ177kh5fdO5bmb27Ts9NLM02eLWvh5QcUIZM2zrO88Zg==","shasum":"2ca84a3eb7b8ac29dbc2c73fbe21e78677073fc6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.1.tgz","fileCount":208,"unpackedSize":3462271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFMLGiNo9qmKVDz1sc92aPT+JRbOTjQzR82+ra3MMGtiAiEA7KoSsiFSXodL/nPcbLS/gaF7JC7KxopKyQ8sTIX6sqI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimRzyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzPhAAjZnGDLvKpTskbgvmbGCG7XOY0OyEchD96XsRPzsuevaUCleW\r\nds980RsMxiUrXR6pz6Wn1ZP11XxnDh5BS6IcDnSq0GN/YIfg2tMi3W8rvIig\r\nC2v7ltC5ff7nbOOBxKbihTg1t5ms1JKtD7KROLacPQs2eSYnXx7WLwKh4f2C\r\nPTPo3gwvqmxcE7QdU9JQEele4rf9LS8GOb6bx0E30U2N8jEYcITED+aS/HEM\r\nSE5LOtQHgQPQTL7fcD0CEdfTxsjqQPc04KmEWbsjzLISNqzYV4lZtQ8I4/Pa\r\npb3PRUGnbMweGlqlRczwMBRSKCzeg7sPXXe18ZgkZQywRui7J06OxNYPKUQ2\r\ncFtRRc1QkN3OG3npr4ZFQs1SI2DEMb3DAooXjlx5A7yoIc6wZscJApAK8zaD\r\nOAoX/R6DSfWmomDQLeAa5sRh59E7iuKVr12YdRmGhfhoFeNfxG0iUKDArkEa\r\nD4PEl0ZKC0/hRevtqA1hxoAHT8EBe0ii0ansIlWsn8F2hmq6GUh88qrOnKNp\r\nZF+gEiNp1tBG6d4DL5Ldd7CGZ5s8ZjR/iEvcdWVCnI0lQVHyMu2gzghfGHrz\r\n1PK0SNYRjoYhvBoAU0BIC/e9Gh4LaPLSo1edPCaawaq4d5DdyN9SEoXt4V0o\r\nYUH+Xu/HHMgYGfnvJFVL8pSnIBPLsadM2S4=\r\n=klyE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.1_1654201585920_0.495023126903525"},"_hasShrinkwrap":false},"0.45.2":{"name":"minter-js-sdk","version":"0.45.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.18.3","axios":"^0.27.2","big.js":"^6.1.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.2","minterjs-util":"^0.24.1","minterjs-wallet":"^6.1.4","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.10","@babel/core":"^7.18.2","@babel/eslint-parser":"^7.18.2","@babel/plugin-transform-runtime":"^7.18.2","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^28.1.0","coveralls":"^3.1.1","eslint":"^8.16.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.4.6","eslint-plugin-jsdoc":"^39.3.2","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^28.1.0","jest-environment-jsdom":"^28.1.0","pre-commit":"^1.2.2","rollup":"^2.75.5","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"051841e8999bd7810cbf99df42efbae905e1cc6c","_id":"minter-js-sdk@0.45.2","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-FejVaM8rl8IYIalPnFeMl5+MQPTzvM/MCL8/35vLLjt2fnZELp3iHv0+8iq5ULLaTeCeSWM47Hg2xa01YmjHpA==","shasum":"864f082a2c6c0bb7fb4d8af2f1aeb535b7ecc036","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.2.tgz","fileCount":208,"unpackedSize":3451641,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEF3se49d2TYHpyRTyywHzGMjExsg+w0IIRbf6toAo9AiB63oo41g9hAyC6upEvnkRVaua7j+bMrj5P0/7VErtMDQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimfS0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcfhAAkWymgOwBmJAvLQtuh5/sdlRNA/ya2aR9GQjkphOKZhkScK+t\r\n2L5byrk8D+YkiKne5Vqp2vZJnYB30VjLwcT0yghlzALw/zdWVBaVzT05U7ov\r\ntcnsWfOaxvXqpqnQoLsjujKiK8p/QXo0KS+iO1+cf6FOzqYGIoUAz3gBxVHw\r\n6lQ2NL7ZKwT6pK5neg+4l2CIlDhigCDQ1dTN2MHIBhL3wR6ufBAc0LMer13N\r\nmdhvmyXvRy8PrQDBsz8cRkRi3Iv72WH1s31uP/uCqQTi+US9Z6W+hpxonVX7\r\nMnWCkTNSCB8oTlQtuAVaTQ0a7LuNFmzjDQ/Juz60H2EogafCsM7Ta48WxSXK\r\nYXV23Ydi8txpbAPDYXiIJSoGD7+AxIck86FisQqRA4Y4wj83okjLXCtio7gC\r\nM+zKQQQeE25XcKZ81WYslSxTAu+Sl69Byzs0qL+wPBdGZn51bov3uYpUbtg4\r\nocaraMMivoGbAfnvjuK00XL9hPeQUj+kGmqyHpJyY7wd6CKYWYd0LZpbw107\r\npYAHWNccrk4/sE2NeXPMCSuESGJoLhBcvyBgC8+pFz2BR9eV1Ok+AFQ2SDBy\r\n5jfwnM62E85P3Js9cvC7dTb90/KVv6GrPC2BzXW0r/Kaqu38AC5TL7iLHPej\r\nRSfK3HAHsJmtGjSJ7Q1iR1hRad+/ZUooL8g=\r\n=m54j\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.2_1654256820216_0.8451298350712959"},"_hasShrinkwrap":false},"0.45.3":{"name":"minter-js-sdk","version":"0.45.3","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.18.3","axios":"^0.27.2","big.js":"^6.1.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.2","minterjs-util":"^0.24.1","minterjs-wallet":"^6.1.4","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.10","@babel/core":"^7.18.2","@babel/eslint-parser":"^7.18.2","@babel/plugin-transform-runtime":"^7.18.2","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^28.1.0","coveralls":"^3.1.1","eslint":"^8.16.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.4.6","eslint-plugin-jsdoc":"^39.3.2","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^28.1.0","jest-environment-jsdom":"^28.1.0","pre-commit":"^1.2.2","rollup":"^2.75.5","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"553f09a3ee11de409c50229d0c39821d3e88cec4","_id":"minter-js-sdk@0.45.3","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-CUbItrqoD0pwzuyoFLdvmjcaTGhMEHD0SyFlG0gpZ0KI2fUFBpHTzG6g6L+FV99EniAeZcczdhO7hpQsLiUbVA==","shasum":"0b63e993b5b158ffb9d70738dedf7938d7a47b99","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.3.tgz","fileCount":208,"unpackedSize":3448890,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnpkxTVKj8yNVO6FztM4+t+Jtkf6TyENzkU+wP2ayAjwIgS+z1bHmscFG0ap8nv/zmziDdo/qgWQstaln51q9cU+0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinhEWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNlA/+L2EOTC8ypmHmp8y/K1OBXydE2GBpTYrOwRsRd5KuNNVQxHxI\r\nkXU6ZXFPH9jfXA412GXMybqLVCsCOcQOuOPAdWiTqGi9FA+rgc5fiXGWeIk6\r\n6AFJzz/EyZa6sTqAdeqw/V6iywyioH9h2LFQFi5/9fJ+f3MeHbcUJZc+mWIA\r\n1UBSO2ydskfzqsFCVf8k304rUqxye8mx8g+v8oXt56GR2JUjK8Q8eNZXX5pV\r\nlNuwKNuL90j3S5p6If+9FheilqyOBrqArU07VIbY9+drdZ2P6VyAAt2RKEhG\r\n6yjh5BZo3bJSw56I21FiiGzymTtND+5hrJ2S2BSF3d8ZdVzTP5zScITZOZY/\r\n01EbvYFepPKOWT8tNofzz4zSbmdpkvLTqBjC2Yu3t9SWzBiKKylXWjac0/iO\r\nCwpGroF+OE2prTCRZ9MNa/gxn6p2bo/4DbdxNZPvpgEcRpRJE9tRcBtH9EzJ\r\nrqvfPVGxEUVTUJA/QoNZs31xwBXUaYB6+jNSpP1jMVk677BtdrqP0ZEQhuHa\r\nzRNKzRzVlP7hKP8xsqKkBeFJK6mk+c6gR/j50conCh2kNCw95SbZA7A6BIb7\r\nj4wYbcr7Ri6e7XFhi5gbLb/vrA83QcGYg4YYHPE0OjLKH+kb8HI7oehWtxIG\r\nlbKrY6kOpDiaVd3fME/QeYQBDV5EW1Cc+zs=\r\n=qMfh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.3_1654526230368_0.34273596823881114"},"_hasShrinkwrap":false},"0.45.4":{"name":"minter-js-sdk","version":"0.45.4","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.18.3","axios":"^0.27.2","big.js":"^6.1.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.2","minterjs-util":"^0.24.1","minterjs-wallet":"^6.1.4","qs":"^6.10.3","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.17.10","@babel/core":"^7.18.2","@babel/eslint-parser":"^7.18.2","@babel/plugin-transform-runtime":"^7.18.2","@babel/preset-env":"^7.18.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^28.1.0","coveralls":"^3.1.1","eslint":"^8.16.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.4.6","eslint-plugin-jsdoc":"^39.3.2","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^42.0.0","jest":"^28.1.0","jest-environment-jsdom":"^28.1.0","pre-commit":"^1.2.2","rollup":"^2.75.5","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"e20861287a508cf510fa09960497316849defe65","_id":"minter-js-sdk@0.45.4","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-5eHpiGvissmMpxckSMNfAi9AixDbptQUJhEno1YC/b/DVfnbK2zI8uQk9JX4NgOYD0QVpSfHQCM2fRPKg0UtSQ==","shasum":"b4bd958aa56130b0e35329d02a3bc92464d90080","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.4.tgz","fileCount":208,"unpackedSize":3449328,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC2OvVIThlvbqM549HUAEgjnrqsuk3cISSQluGaTrLANAiBR1zQMXAO6VAPRL154R7Wd/36/hVBE4igZC0SRdocHgQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizUL5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMvA//fL03FWgtZPiZhKeAaCdA7RifZAj7FvBNAp8AbJ2u2wORnLo3\r\nMazmdi+XDczx+8PIbZQbvXAu7xnQ3E3FbhUXUGBZ8F/kVr4bWgfZjdeRmVz+\r\nmvEFsmGCUAu48/sXqhWjbTM4ZFTztXmgh58QlDDWx0qMkSjGctKpTwYfambQ\r\nnHZpUSM4wj5vRP13rWx5VNx7MaqU4re6B6PIjE7DbTLht3SK9W3IGetR7XPS\r\nfEB3KvB/AU1fspzx6MGp5nlhzebwvOM0XSZLyL9WBlukgLqMh2QQLrLMUOeT\r\nPE/bYHMlwKlWvbTcNjkob+iXeRjMroVmFI+h0QY+/36RbNAPm87hQYn/B/yM\r\n1e/ioisUHoqRux7VkrDg2g/MawoNHRxHmt1/4fLyM0TijeEcbGSDIm9O1DYJ\r\nDWQxSGob+OL4bdDNu8b2uYClPxTBoHqTnU924TAB53xD3ODt7G/IJNj+GWf0\r\njVevz890pCGOZ2pI0RNqDfD0PNqtSQLSGW4K703E6bEUZ5SP0ewTNR7u9zOi\r\n850DGF7bPDZjMv2yRj5Fl4OMvmWwaiIdqo7f/0cNSHckDGFYYyfWPTzlkFzT\r\nSG2HE8dTDdWglH0GIaYWg/NXxhV24aBrOjfJA5QgTlwdbTaZZ469lC4aDO9a\r\nR+PJdHzI3q0R/vwhQuTux9bU3diAyJ4k63M=\r\n=WiWf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.4_1657619193188_0.6238508638201927"},"_hasShrinkwrap":false},"0.45.5":{"name":"minter-js-sdk","version":"0.45.5","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.18.9","axios":"^0.27.2","big.js":"^6.2.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.2","minterjs-util":"^0.24.1","minterjs-wallet":"^6.1.4","qs":"^6.11.0","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.18.9","@babel/core":"^7.18.9","@babel/eslint-parser":"^7.18.9","@babel/plugin-transform-runtime":"^7.18.9","@babel/preset-env":"^7.18.9","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^28.1.3","coveralls":"^3.1.1","eslint":"^8.20.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.6.0","eslint-plugin-jsdoc":"^39.3.3","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^43.0.2","jest":"^28.1.3","jest-environment-jsdom":"^28.1.3","pre-commit":"^1.2.2","rollup":"^2.77.2","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"5582dd6afb10d1ef5291eddc58b99b394b678bb3","_id":"minter-js-sdk@0.45.5","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-XX+eoZR0LkyjorXlzPXmCo7+a/U+MrRRWOZrjV/H128eLuZ/0SN8Tod4Gos7/fY8Oak0Vikt8IXUBHgBxzxKzQ==","shasum":"5c758ff7ae09bb6062dfdc0dd334efed64cb95d9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.5.tgz","fileCount":208,"unpackedSize":3448920,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwbs16lu12DwwRYdCx10pr98IF3VuDL9vadLX7UHdLGAiBIU7GwfeKpAjQsNTAN1a5DpDA2GYyLtMaxyUy9+q7tPQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5AchACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKuQ/7BTV6jxYG4T8/ItoKSHZJZVEGaAnmV5H8PRNnEtwqnWwEbDxq\r\ndFSEx7C2p99P088okby19YEjM2s1pcP02zAADIv784gH1dPpJkY9YCLwuQH+\r\n2zGiJxDkefL1wIJ9tsSGW8JWLjyQmKWm5SIvA0JaLNgTe0OtB2Y2fuSNxhbJ\r\nL95S2ZcGDerI/eKJoJpbegKzC/6vCpnV3dI1WtGRkR3Ln0OkILm81poN4y+z\r\nfBsaSeE7QsZktwBll9CkciihQBk1x6hXzcpTFEvQAGBZS6wvPKQ4ZldjcIt0\r\nBNQv6v4jq39nxNz0U9G1OdNtFBWXHAkfZ+oBI2TWpYDPloAVXZ56qbB174bs\r\nI98quHO0hLh5pdJeSvdTDxRxgzw8bswRJp35ehdORV6CuhP7/kURWinGsSS9\r\nWdeVRRemp5lJezRJ/bUxvStB5i1VOo/wD9AxgJEbnj1a/XqPZrFcBgeiXmRL\r\nkxqWf85QS7e3VNQqxVzYXW9SpTNTtt/CMLARfaB++5v1Q88b3A4mfQxuEAxt\r\nR1RkCSR/I+9imUmsd1p2NIGi75JkKWWKoY6IoP0e5L0TNqT0BnmEVP77EBWN\r\n9j80lE162E1KpSP1NZD7L8cozqvtXFMID2VJTpgw0DVX31IzhmCx0eXpPJaO\r\nBumki4YHoaoV8YUop3r406OV9xYT2JHpkfQ=\r\n=DczB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.5_1659111200863_0.8603565627171792"},"_hasShrinkwrap":false},"0.45.6":{"name":"minter-js-sdk","version":"0.45.6","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.20.1","axios":"^0.27.2","big.js":"^6.2.1","bn.js":"^5.2.1","buffer-es6":"git+https://git@github.com/shrpne/buffer-es6.git#fix-internal-is-buffer","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.3","minterjs-util":"^0.24.2","minterjs-wallet":"^6.2.0","qs":"^6.11.0","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.19.3","@babel/core":"^7.20.2","@babel/eslint-parser":"^7.19.1","@babel/plugin-transform-runtime":"^7.19.6","@babel/preset-env":"^7.20.2","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-commonjs":"^22.0.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","babel-jest":"^29.3.1","coveralls":"^3.1.1","eslint":"^8.27.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^27.1.5","eslint-plugin-jsdoc":"^39.6.2","eslint-plugin-security":"^1.5.0","eslint-plugin-unicorn":"^44.0.2","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","pre-commit":"^1.2.2","rollup":"^2.79.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-builtins":"^2.1.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-terser":"^7.0.2"},"gitHead":"2fac8e3f508b1b6331b04dc73cea4d68efb0aba4","_id":"minter-js-sdk@0.45.6","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-PUpRsa4z4kA8nZV0nVP1626AorQomIJyXvSgHBq4wvAMjcuzQE3n0DIEqyHJcM/kyp0utNR0ZLI5uCR+62aG/w==","shasum":"341b6258ca0efe22f9b3c9de97fec860e4a4acb6","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.45.6.tgz","fileCount":208,"unpackedSize":3458099,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZlxdQJYbvJA3dNlMtYD1KFz0zpcArDjHOw7xmrDMbcgIhAJ20aznWtZHpiqw07U/siFV6FDer7i4p7UhmJXd7rflW"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdnpgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvSxAAhIgY0Wjtj+rHSlIkn2YdULPRUKfRtYDOj82jsWyOuu/ldt9C\r\niLXeFfBZU4fAvba89tzBNH/pDr37Igge8xsymevLMfHXtZmnXdHrURA9wY4Z\r\nKI/eCBgbgOHHJurY3tQFK4xfQ88+5jMRoQF/l+LEg1peAl+ZxotgP6qfhDqu\r\nZ5OPv0d4tUORC+ccIQTH+h00hi1fjJVYatZJfqJKl5NZe8m16yv6TjAPOHWy\r\nzJiGzjQ0Uk61RTIjQEb0xbeas/ZOHmLIYgiiwnsYNaB62WpzvJzFYzk+K6qt\r\nLPTv9IFRGAYgN/D6qKXxKYc62MSnXespejyuHOAJXOk2LQk4mHv16YS6Sy7K\r\nE2tj/UtzXCS109ID3irQOqziGowKo3YkrpIwllC9COX3oNFthAkBTWsDy37N\r\nWGEJq/T6r3w5LPaHgPz+EBQAJZ5vnCojjYEUOn9Qif8vbYIaSoHtWvSw3NfH\r\nHWmgCrLV/THtJ934orlzndeFhkt93Gf/4ZWvVOD0UIv5DLzqGDcg+Y8Ge71z\r\ngDk797IX4bDekS1bTBc2TGEU/6Xvrbjd178kDyT0u81h9uDVywgcZZwbqaJY\r\npREojgxrPqErXU4iCz9prEFy3IGW2jSEIXqNrotXjzQJK72+B9PhlR+1FDdt\r\nytcQRBZyYh4WkIRbGVF73ueD2wtG7WcHV+Y=\r\n=Ctf2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.45.6_1668708960568_0.3658995907317961"},"_hasShrinkwrap":false},"0.46.0":{"name":"minter-js-sdk","version":"0.46.0","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","tsc":"tsc --project tsconfig.json","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.22.3","axios":"^1.4.0","big.js":"^6.2.1","bn.js":"^5.2.1","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.3","minterjs-util":"^0.25.1","minterjs-wallet":"^6.2.0","qs":"^6.11.2","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.22.1","@babel/eslint-parser":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.4","@babel/preset-env":"^7.22.4","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.3","babel-jest":"^29.5.0","coveralls":"^3.1.1","eslint":"^8.41.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.1","eslint-plugin-jsdoc":"^45.0.0","eslint-plugin-security":"^1.7.1","eslint-plugin-unicorn":"^47.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","pre-commit":"^1.2.2","rollup":"^3.23.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-polyfill-node":"^0.12.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-visualizer":"^5.9.0","typescript":"^5.0.4"},"gitHead":"c3cffa861ea9b45a7bf6de61c279a935b8182c30","_id":"minter-js-sdk@0.46.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-YxXCBPfg4xWcAoKzEbQ8OTnmjOlfWCIqLLdq8q7Klr+c8ha4Re1V7bpyPJwz34n7Q+YJcYfISIf2VPF1a73UHg==","shasum":"563ebb37ee0faa649ee844024908cc2f50e40bc9","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.46.0.tgz","fileCount":211,"unpackedSize":5631399,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJEVXwVZj9AAPhXE1kzllNn/DthzXsl0+UGGrHt24BpwIgc4kqvETJ59eEOuGwSQ/9QpdvgAAN+y8MkDhxN/ZvFPE="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.46.0_1685452765551_0.9626313538747764"},"_hasShrinkwrap":false},"0.46.1":{"name":"minter-js-sdk","version":"0.46.1","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","tsc":"tsc --project tsconfig.json","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.22.3","axios":"^1.4.0","big.js":"^6.2.1","bn.js":"^5.2.1","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.3","minterjs-util":"^0.25.1","minterjs-wallet":"^6.2.0","qs":"^6.11.2","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.22.1","@babel/eslint-parser":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.4","@babel/preset-env":"^7.22.4","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.3","babel-jest":"^29.5.0","coveralls":"^3.1.1","eslint":"^8.41.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.1","eslint-plugin-jsdoc":"^45.0.0","eslint-plugin-security":"^1.7.1","eslint-plugin-unicorn":"^47.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","pre-commit":"^1.2.2","rollup":"^3.23.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-polyfill-node":"^0.12.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-visualizer":"^5.9.0","typescript":"^5.0.4"},"gitHead":"c68c0d42a95eb23f3ff73bc900997cb088120cc7","_id":"minter-js-sdk@0.46.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-p8OGlB8xmQgvRKhRFTJTi15ZK4Bmw5d8kyfAxo6lT57XiRUWIHabqay7WRbVVX/gSGPxqC+V49Zv16d5uqnlgw==","shasum":"28e38bda85b6a5a8ae72d0b74133cba8ae145ddc","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.46.1.tgz","fileCount":211,"unpackedSize":5636460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSOdZ65EQ56UehoQBX52X63w4Umn5BmmkR0gZh6NhSKgIhAPtgkBbSrh1dbA4+4Opz/KjuRx9du+X3Wyvdp2LD1fg2"}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.46.1_1685709973360_0.6552678029310071"},"_hasShrinkwrap":false},"0.46.2":{"name":"minter-js-sdk","version":"0.46.2","description":"JS SDK for Minter Blockchain","main":"dist/cjs/index.js","module":"src/index.js","browser":{"./dist/cjs/index.js":"./dist/index.js"},"unpkg":"dist/index.min.js","scripts":{"build":"npm run build:browser && npm run build:browser-minify && npm run build:cjs","build:browser":"rollup -c build/rollup.config.js","build:browser-minify":"rollup -c build/rollup.uglify.config.js","build:cjs":"rollup -c build/rollup.cjs.config.js","prepublishOnly":"npm run lint && npm run test:light","lint":"eslint --ext .js ./src ./test","lint:fix":"eslint --ext .js ./src ./test --fix","tsc":"tsc --project tsconfig.json","test":"npm run test:src && npm run build && npm run jest:bundle-browser && npm run jest:bundle-cjs","test:light":"npm run test:src && npm run build && npm run jest:bundle-browser-unit && npm run jest:bundle-cjs-unit","test:src":"npm run jest-coverage","test:bundle-browser":"npm run build:browser && npm run jest:bundle-browser","test:bundle-cjs":"npm run build:cjs && npm run jest:bundle-cjs","test:bundle-browser-unit":"npm run build:browser && npm run jest:bundle-browser-unit","test:bundle-cjs-unit":"npm run build:cjs && npm run jest:bundle-cjs-unit","jest:src":"jest","jest:src-unit":"jest --testPathIgnorePatterns='<rootDir>/test/api'","jest:src-e2e":"jest --testPathPattern='api/'","jest:bundle-browser":"jest --config jest-bundle-browser.config.js","jest:bundle-cjs":"jest --config jest-bundle-cjs.config.js","jest:bundle-browser-unit":"jest --config jest-bundle-browser.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest:bundle-cjs-unit":"jest --config jest-bundle-cjs.config.js --testPathIgnorePatterns='<rootDir>/test/api'","jest-coverage":"jest --coverage","precommit":"echo 'Pre-commit checks...' && npm run lint"},"pre-commit":["precommit"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"keywords":["minter","blockchain","sdk"],"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"license":"MIT","bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","dependencies":{"@babel/runtime":"^7.22.3","axios":"^1.4.0","big.js":"^6.2.1","bn.js":"^5.2.1","ethereum-cryptography":"0.1.3","ethereumjs-util":"^7.1.5","ethjs-util":"^0.1.6","lodash-es":"^4.17.21","minterjs-tx":"^12.0.3","minterjs-util":"^0.25.1","minterjs-wallet":"^6.2.0","qs":"^6.11.2","rlp":"^2","secp256k1":"^4.0.3"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.22.1","@babel/eslint-parser":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.4","@babel/preset-env":"^7.22.4","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.2","@rollup/plugin-terser":"^0.4.3","babel-jest":"^29.5.0","coveralls":"^3.1.1","eslint":"^8.41.0","eslint-config-airbnb-base":"^15.0.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.27.5","eslint-plugin-jest":"^27.2.1","eslint-plugin-jsdoc":"^45.0.0","eslint-plugin-security":"^1.7.1","eslint-plugin-unicorn":"^47.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","pre-commit":"^1.2.2","rollup":"^3.23.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-polyfill-node":"^0.12.0","rollup-plugin-rename":"^1.0.1","rollup-plugin-visualizer":"^5.9.0","typescript":"^5.0.4"},"gitHead":"3e07fea17d0bde988f85ab90eb4552e76434097c","_id":"minter-js-sdk@0.46.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-ESQeMRHkUeNPVv2frsVbQWUvU91qUpSDmnQaJLvCGUWVq8gH2CNNOPZnMPjwGhLEskuIbBbt4kvjzqn8BhEq1Q==","shasum":"778ab3017b8905f9a1941b4d2972973a8c1bd19c","tarball":"https://registry.npmjs.org/minter-js-sdk/-/minter-js-sdk-0.46.2.tgz","fileCount":211,"unpackedSize":5518495,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJ/pil02gPDt3UjcNaRCChXiVIsl2hwoUFJdVL6vcpxAiBTeKyc4vZMIY9/nJ1a4pmK7pK7EBoRlDo750UtBC6QUQ=="}]},"_npmUser":{"name":"shrpne","email":"shrpne@gmail.com"},"directories":{},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minter-js-sdk_0.46.2_1691918803808_0.9565349740652638"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-23T15:44:37.581Z","0.0.1":"2018-06-23T15:44:37.672Z","modified":"2023-08-13T09:26:44.255Z","0.0.2":"2018-07-13T09:39:24.070Z","0.0.3":"2018-07-13T09:51:27.950Z","0.0.4":"2018-07-13T13:08:35.578Z","0.0.5":"2018-07-13T17:51:09.293Z","0.0.6":"2018-07-16T11:41:38.129Z","0.0.7":"2018-07-16T12:39:11.803Z","0.0.8":"2018-07-20T16:15:18.547Z","0.0.9":"2018-07-23T16:39:57.217Z","0.1.0":"2018-07-23T18:02:57.197Z","0.1.1":"2018-07-23T18:15:44.655Z","0.1.2":"2018-08-06T21:20:08.800Z","0.1.3":"2018-08-09T11:14:32.683Z","0.2.0":"2018-08-11T16:02:10.372Z","0.2.1":"2018-08-11T16:56:03.025Z","0.2.2":"2018-08-11T17:42:25.428Z","0.3.0":"2018-09-14T20:34:11.866Z","0.4.0":"2018-10-15T15:04:31.878Z","0.4.1":"2018-10-18T14:32:17.055Z","0.5.0":"2018-11-26T22:14:19.479Z","0.5.1":"2018-11-27T03:28:46.178Z","0.5.2":"2018-11-27T03:34:23.778Z","0.5.3":"2018-11-27T04:29:14.067Z","0.5.4":"2018-11-30T14:59:40.375Z","0.5.5":"2018-12-06T15:37:12.852Z","0.6.0":"2018-12-10T10:50:29.912Z","0.7.0":"2018-12-12T15:57:38.954Z","0.8.0":"2019-01-17T16:22:59.121Z","0.8.1":"2019-01-17T16:41:34.955Z","0.9.0":"2019-01-22T11:36:55.112Z","0.9.1":"2019-01-22T11:55:28.647Z","0.10.0":"2019-01-24T10:38:33.268Z","0.11.0":"2019-01-31T12:20:14.109Z","0.11.1":"2019-02-06T21:34:23.699Z","0.11.2":"2019-02-18T14:31:13.252Z","0.12.0":"2019-02-20T12:58:47.104Z","0.13.0":"2019-02-28T15:25:56.232Z","0.14.0":"2019-04-08T16:12:40.004Z","0.14.1":"2019-04-09T15:07:46.209Z","0.15.0":"2019-04-17T14:47:41.383Z","0.15.1":"2019-04-17T15:07:31.905Z","0.15.2":"2019-04-17T17:16:27.419Z","0.16.0":"2019-04-23T16:02:18.081Z","0.16.2":"2019-06-06T13:38:47.346Z","0.17.0":"2019-06-17T10:40:44.623Z","0.17.1":"2019-07-08T14:54:19.200Z","0.18.0":"2019-07-31T13:13:27.446Z","0.18.1":"2019-07-31T15:33:12.186Z","0.19.0":"2019-08-01T17:52:02.100Z","0.19.1":"2019-08-15T11:17:05.908Z","0.20.0":"2019-08-21T11:40:08.717Z","0.20.1":"2019-09-06T13:28:03.413Z","0.20.2":"2019-10-01T21:04:54.851Z","0.20.3":"2019-11-06T16:14:43.878Z","0.21.0":"2019-11-11T18:52:19.391Z","0.22.0":"2019-11-13T16:13:58.526Z","0.0.0-texas.0":"2019-11-26T17:10:50.200Z","0.23.0-texas.1":"2019-12-02T18:28:30.682Z","0.23.0":"2019-12-10T18:19:22.390Z","0.24.0-texas.2":"2019-12-11T16:50:48.215Z","0.24.0":"2019-12-23T21:32:43.584Z","0.24.0-texas.3":"2019-12-24T14:59:07.874Z","0.24.1":"2019-12-24T18:36:11.885Z","0.25.0-texas.4":"2019-12-24T18:44:53.060Z","0.25.0-texas.5":"2019-12-25T11:56:24.400Z","0.25.0":"2019-12-26T15:35:57.679Z","0.26.0-texas.6":"2019-12-26T16:13:15.170Z","0.26.0":"2020-01-15T14:46:11.755Z","0.26.1":"2020-01-20T12:39:09.685Z","0.28.0-texas.7":"2020-01-20T17:34:49.991Z","0.27.2":"2020-01-30T12:33:41.383Z","0.27.3":"2020-01-30T18:40:56.495Z","0.27.4":"2020-01-31T13:58:49.982Z","0.28.0":"2020-02-03T21:09:07.331Z","0.29.0":"2020-02-17T11:00:52.139Z","0.30.0-texas.8":"2020-02-28T18:25:11.938Z","0.30.0-texas.9":"2020-03-03T11:14:18.315Z","0.30.0-texas.10":"2020-03-03T15:03:32.842Z","0.30.0-texas.11":"2020-03-04T12:22:42.438Z","0.30.0-texas.12":"2020-03-05T14:12:00.195Z","0.30.0-texas.13":"2020-03-05T14:23:55.574Z","0.30.0":"2020-03-06T06:46:01.861Z","0.30.1":"2020-03-10T15:44:34.558Z","0.30.2":"2020-03-12T15:46:38.310Z","0.30.3":"2020-03-13T11:21:27.180Z","0.31.0":"2020-03-24T19:35:23.407Z","0.32.0":"2020-05-30T23:04:20.575Z","0.32.1":"2020-05-31T17:29:45.093Z","0.33.0":"2020-08-12T12:57:19.102Z","0.34.0-alpha.2":"2020-09-16T16:52:16.416Z","0.34.0-alpha.3":"2020-09-18T12:37:32.573Z","0.34.0-alpha.4":"2020-09-18T17:23:45.413Z","0.34.0":"2020-09-22T13:39:50.539Z","0.34.1":"2020-09-23T17:33:20.107Z","0.34.2":"2020-09-23T22:14:17.221Z","0.34.3":"2020-09-24T13:44:57.353Z","0.35.0":"2020-09-26T15:31:21.491Z","0.35.1":"2020-10-13T21:00:25.051Z","0.35.2":"2020-10-14T15:21:04.791Z","0.35.3":"2020-10-18T17:36:42.709Z","0.35.4":"2020-10-18T21:25:33.694Z","0.35.5":"2020-11-05T16:27:47.239Z","0.35.6":"2020-11-13T21:13:26.309Z","0.36.0-alpha.0":"2020-12-14T17:22:46.770Z","0.36.0-alpha.1":"2020-12-14T20:50:24.983Z","0.36.0-alpha.2":"2020-12-17T14:16:00.141Z","0.36.0":"2020-12-22T14:58:05.214Z","0.37.0":"2020-12-30T21:16:29.452Z","0.38.0-alpha.3":"2021-01-14T20:43:06.538Z","0.38.0-alpha.4":"2021-01-18T17:14:11.295Z","0.38.0-alpha.5":"2021-01-22T15:57:07.598Z","0.38.0-alpha.6":"2021-01-29T16:26:48.161Z","0.38.0-alpha.7":"2021-01-29T20:11:37.826Z","0.38.0-alpha.8":"2021-02-01T15:20:32.515Z","0.38.0-alpha.9":"2021-02-01T16:17:51.826Z","0.38.0-alpha.10":"2021-02-04T14:31:33.328Z","0.38.0-alpha.11":"2021-02-04T19:30:11.159Z","0.38.0-alpha.12":"2021-02-04T20:05:54.892Z","0.38.0-alpha.13":"2021-02-11T18:33:50.514Z","0.38.0-alpha.14":"2021-02-12T19:37:15.458Z","0.38.0-alpha.15":"2021-02-16T11:15:03.592Z","0.38.0-alpha.16":"2021-02-16T21:15:55.831Z","0.38.0-alpha.17":"2021-02-17T14:24:44.710Z","0.38.0-alpha.18":"2021-02-17T16:08:11.093Z","0.38.0-alpha.19":"2021-02-17T21:56:14.649Z","0.38.0-alpha.20":"2021-02-18T20:14:08.097Z","0.38.0-alpha.21":"2021-02-24T17:15:39.635Z","0.38.0-alpha.22":"2021-03-05T12:39:50.783Z","0.38.0-alpha.23":"2021-03-08T10:53:43.690Z","0.38.0-alpha.24":"2021-03-08T13:36:42.430Z","0.38.0-alpha.25":"2021-03-08T17:07:07.596Z","0.38.0-alpha.26":"2021-03-08T17:36:39.881Z","0.38.0-alpha.27":"2021-03-10T16:02:44.172Z","0.38.0-alpha.28":"2021-03-26T14:39:18.452Z","0.38.0-alpha.29":"2021-03-26T16:53:18.914Z","0.38.0-alpha.30":"2021-03-29T15:35:39.423Z","0.38.0-alpha.31":"2021-03-30T18:34:41.690Z","0.38.0-alpha.32":"2021-04-01T14:40:43.617Z","0.38.0-alpha.33":"2021-04-02T17:01:41.153Z","0.38.0-alpha.34":"2021-04-07T16:25:00.298Z","0.38.0":"2021-04-09T14:30:55.969Z","0.38.1":"2021-04-12T15:15:14.830Z","0.38.2":"2021-04-13T13:26:34.974Z","0.38.3":"2021-05-31T16:19:28.479Z","0.39.0-alpha.0":"2021-06-11T23:42:48.555Z","0.39.0-alpha.1":"2021-08-18T17:06:58.647Z","0.39.0-alpha.2":"2021-08-20T20:51:10.552Z","0.39.0":"2021-12-01T11:48:29.626Z","0.40.0":"2021-12-15T16:06:11.752Z","0.40.1":"2021-12-16T11:10:57.492Z","0.40.2":"2021-12-16T15:09:13.023Z","0.41.0":"2021-12-27T17:32:49.666Z","0.42.0-alpha.0":"2022-03-01T11:38:58.925Z","0.42.0-alpha.1":"2022-03-07T15:57:33.923Z","0.42.0-alpha.2":"2022-04-05T11:56:25.809Z","0.42.0-alpha.3":"2022-04-05T12:16:37.745Z","0.42.0-alpha.4":"2022-04-08T14:41:02.477Z","0.42.0":"2022-04-12T11:56:42.825Z","0.42.1":"2022-04-12T16:59:54.336Z","0.43.0":"2022-04-15T15:26:25.961Z","0.43.1":"2022-04-18T10:54:13.294Z","0.43.2":"2022-04-22T19:41:36.028Z","0.43.3":"2022-04-26T08:55:06.814Z","0.44.0":"2022-05-30T09:08:50.044Z","0.45.0":"2022-05-31T15:33:01.454Z","0.45.1":"2022-06-02T20:26:26.174Z","0.45.2":"2022-06-03T11:47:00.498Z","0.45.3":"2022-06-06T14:37:10.579Z","0.45.4":"2022-07-12T09:46:33.511Z","0.45.5":"2022-07-29T16:13:21.236Z","0.45.6":"2022-11-17T18:16:00.777Z","0.46.0":"2023-05-30T13:19:25.817Z","0.46.1":"2023-06-02T12:46:13.656Z","0.46.2":"2023-08-13T09:26:44.082Z"},"maintainers":[{"name":"shrpne","email":"shrpne@gmail.com"},{"name":"danil-lashin","email":"danil-lashin@ya.ru"}],"description":"JS SDK for Minter Blockchain","homepage":"https://github.com/MinterTeam/minter-js-sdk#readme","keywords":["minter","blockchain","sdk"],"repository":{"type":"git","url":"git+https://github.com/MinterTeam/minter-js-sdk.git"},"author":{"name":"MinterTeam","url":"https://github.com/MinterTeam"},"bugs":{"url":"https://github.com/MinterTeam/minter-js-sdk/issues"},"license":"MIT","readme":"![Logo](minter-logo.svg)\n\n[![NPM Package](https://img.shields.io/npm/v/minter-js-sdk.svg?style=flat-square)](https://www.npmjs.org/package/minter-js-sdk)\n[![Build Status](https://img.shields.io/github/workflow/status/MinterTeam/minter-js-sdk/Test?label=test&style=flat-square)](https://github.com/MinterTeam/minter-js-sdk/actions/workflows/test-with-coverage.yml)\n[![Coverage Status](https://img.shields.io/coveralls/github/MinterTeam/minter-js-sdk/master.svg?style=flat-square)](https://coveralls.io/github/MinterTeam/minter-js-sdk?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square&label=license)](https://github.com/MinterTeam/minter-js-sdk/blob/master/LICENSE)\n\nThis package aims to provide an easy-to-use JS helping developers communicate with the Minter blockchain through its API.\n\nThis package should aid any developer building JS applications on top of the Minter blockchain.\n\nPlease note that this SDK is under active development and subject to change.\n\n**NOTE:** since 0.34.0, SDK supports only v2 versions of node and gate APIs\n\nIt is complemented by the following packages:\n- [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) for BIP39 mnemonic phrases, private keys, and addresses\n- [minterjs-util](https://github.com/MinterTeam/minterjs-util) for utility functions\n\nContents:\n- [Installation](#installation)\n- [Usage](#usage)\n  - [SDK API instance](#sdk-instance)\n    - [postTx](#posttx)\n    - [postSignedTx](#postsignedtx)\n    - [getNonce](#getnonce)\n    - [ensureNonce](#ensurenonce)\n    - [getMinGasPrice](#getmingasprice)\n    - [getCoinInfo](#getcoininfo)\n    - [getCoinId](#getcoinid)\n    - [getCoinSymbol](#getcoinsymbol)\n    - [replaceCoinSymbol](#replacecoinsymbol)\n    - [replaceCoinId](#replacecoinid)\n    - [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n    - [replaceCoinIdByPath](#replacecoinidbypath)\n    - [estimateCoinBuy](#estimatecoinbuy)\n    - [estimateCoinSell](#estimatecoinsell)\n    - [estimateCoinSellAll](#estimatecoinsellall)\n    - [estimateTxCommission](#estimatetxcommission)\n  - [Tx params constructors](#tx-params)\n    - [Send](#send)\n    - [Multisend](#multisend)\n    - [Buy](#buy)\n    - [Sell](#sell)\n    - [Sell all](#sell-all)\n    - [Buy from pool](#buy-from-swap-pool)\n    - [Sell to pool](#sell-to-swap-pool)\n    - [Sell all to pool](#sell-all-to-swap-pool)\n    - [Add limit order](#add-limit-order)\n    - [Remove limit order](#remove-limit-order)\n    - [Create pool](#create-pool)\n    - [Add liquidity to pool](#add-liquidity-to-pool)\n    - [Remove liquidity from pool](#remove-liquidity-from-pool)\n    - [Create coin](#create-coin)\n    - [Recreate coin](#recreate-coin)\n    - [Create token](#create-token)\n    - [Recreate token](#recreate-token)\n    - [Edit ticker owner](#edit-ticker-owner)\n    - [Mint token](#mint-token)\n    - [Burn token](#burn-token)\n    - [Declare candidacy](#declare-candidacy)\n    - [Edit candidate](#edit-candidate)\n    - [Edit candidate public key](#edit-candidate-public-key)\n    - [Edit candidate commission](#edit-candidate-commission)\n    - [Delegate](#delegate)\n    - [Unbond](#unbond)\n    - [Move stake](#move-stake)\n    - [Lock stake](#lock-stake)\n    - [Set candidate on](#set-candidate-on)\n    - [Set candidate off](#set-candidate-off)\n    - [Set halt block](#set-halt-block)\n    - [Vote for commission price](#vote-for-commission-price)\n    - [Vote for network update](#vote-for-network-update)\n    - [Redeem check](#redeem-check)\n    - [Lock](#lock)\n    - [Create multisig](#create-multisig)\n    - [Edit multisig](#edit-multisig)\n  - [Transaction](#transaction)\n    - [Prepare transaction](#prepare-transaction)\n    - [Prepare single-signed transaction](#prepare-single-signed-transaction)\n    - [Make signature](#make-signature)\n    - [Multi-signatures](#multi-signatures)\n    - [Decode transaction](#decode-transaction)\n  - [Minter check](#minter-check)\n    - [issueCheck](#issuecheck)\n    - [decodeCheck](#decodecheck)\n  - [Minter link](#minter-link)\n    - [prepareLink](#preparelink)\n    - [decodeLink](#decodelink)\n  - [Minter wallet](#minter-wallet)\n- [License](#license)\n\n\n# Installation\n\n```bash\nnpm install minter-js-sdk\n```\n\n```js\nimport {Minter, prepareLink} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ...options, see Usage */});\nconst link = prepareLink(/* ... */)\n```\n\nor from browser\n\n```html\n<script src=\"https://unpkg.com/minter-js-sdk\"></script>\n<script>\nconst minter = new minterSDK.Minter({/* ...options, see Usage */});\nconst link = minterSDK.prepareLink(/* ... */)\n</script>\n```\n\n\n# Usage\n\nPost transaction full example\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n};\n\nminter.postTx(txParams, {seedPhrase: 'exercise fantasy smooth enough ...'})\n    .then((txHash) => {\n        // WARNING\n        // If you use minter-node api, successful response would mean that tx just got in mempool but is not on the blockchain yet\n        // You have to wait for it to be included in the upcoming block\n        // You can use gate api instead, which returns successful response only after tx has appeared on the blockchain\n        // WARNING #2 \n        // If tx has been included in the block, it may still have failed status\n        // Verify that tx.code is `0` to ensure its success\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\nPost transaction using SDK features\n\n```js\nimport {Minter, TX_TYPE} from \"minter-js-sdk\";\n\nconst minter = new Minter({apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\nconst txParams = {\n    // no `nonce` specified, it will be fetched automatically\n    // no `gasPrice` specified, \"1\" will be used by default and in case of error, request will be retried with auto-corrected value\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP', // coin symbol\n    },\n    gasCoin: 'MYCOIN', // coin symbol\n};\n\n// coin symbols in txParams will be replaced automatically with coin ids\nminter.postTx(newTxParams, {\n    // seedPhrase can be used to sign transaction instead of privateKey\n    seedPhrase: 'air model item valley auction bullet crisp always erosion paper orient fog',\n})\n    .then((txHash) => {\n      // WARNINGs for minter-node api users:\n      // #1\n      // Successful response would mean that tx just got in mempool but is not on the blockchain yet\n      // You have to wait for it to be included in the upcoming block\n      // #2 \n      // If tx has been included in the block, it may still have failed status\n      // Verify that tx.code is `0` to ensure its success\n      // Gate api users not affected:\n      // Gate will return successful response only after tx has appeared on the blockchain\n      // Gate also returns tx data in the response, so SDK will check tx.code automatically and reject promise for non-zero codes\n        alert(`Tx created: ${txHash}`);\n    }).catch((error) => {\n        const errorMessage = error.response.data.error.message\n        alert(errorMessage);\n    });\n```\n\n\n## SDK instance\n\nCreate `minter` SDK instance from `Minter` constructor. It contains methods to communicate with API.\n`Minter` will accept [axios config](https://github.com/axios/axios#config-defaults) as params and return [axios instance](https://github.com/axios/axios#creating-an-instance).\n\nOne extra field of options object is `apiType`, which takes either [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api). It is used to determine which type of API to use.\n\n```js\n// specify gate url\nconst minterGate = new Minter({chainId: 2, apiType: 'gate', baseURL: 'https://gate-api.minter.network/api/v2/'});\n// specify node url\nconst minterNode = new Minter({chainId: 2, apiType: 'node', baseURL: 'https://node-api.testnet.minter.network/v2/'});\n```\n\n`Minter` constructor has the following options:\n- `apiType`: [`'gate'`](https://minterteam.github.io/minter-gate-docs/) or [`'node'`](https://www.minter.network/docs#node-api)\n- `baseURL`: API URL\n- `chainId`: default chain ID, used if no chainId is specified in tx params. 1 = mainnet, 2 = testnet\n\n`minter` SDK instance has the following methods:\n- [postTx](#posttx)\n- [postSignedTx](#postsignedtx)\n- [getNonce](#getnonce)\n- [ensureNonce](#ensurenonce)\n- [getMinGasPrice](#getmingasprice)\n- [getCoinInfo](#getcoininfo)\n- [getCoinId](#getcoinid)\n- [getCoinSymbol](#getcoinsymbol)\n- [replaceCoinSymbol](#replacecoinsymbol)\n- [replaceCoinId](#replacecoinid)\n- [replaceCoinSymbolByPath](#replacecoinsymbolbypath)\n- [replaceCoinIdByPath](#replacecoinidbypath)\n- [estimateCoinBuy](#estimatecoinbuy)\n- [estimateCoinSell](#estimatecoinsell)\n- [estimateCoinSellAll](#estimatecoinsellall)\n- [estimateTxCommission](#estimatetxcommission)\n\n\n### .postTx()\n\nPost new transaction to blockchain.  \nAccepts the [tx params](#tx-params) object and makes an asynchronous request to the blockchain API.  \n- `txParams.nonce` - optional, if no nonce is given, it will be requested by `getNonce` automatically\n- `txParams.gasPrice` - fee multiplier, 1 by default. Should be equal to or greater than mempool's current min gas price\n- `gasRetryLimit` - count of repeating request, 2 by default. If the first request fails because of low gas, it will be repeated with an updated `gasPrice`\n- `mempoolRetryLimit` - count of repeating request, 0 by default. If the first request fails because of the \"Tx from address already exists in mempool\" error, it will be repeated in 5 seconds (average block time), trying to put it into the new block\n\nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n*Please note: always verify that transactions you send have no errors (tx in a block should have `code: 0`). Otherwise, they will not be executed.*\n\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce] - can be omitted, will be received by `getNonce`\n * @property {number} [chainId=1] - 1 = mainnet, 2 = testnet\n * @property {number} [gasPrice=1] - can be updated automatically on retry if gasRetryLimit > 0\n * @property {string} [gasCoin='BIP']\n * @property {string|TX_TYPE|Buffer} type\n * @property {Object|Buffer|TxData} data\n * @property {string} [payload]\n * @property {number} [signatureType=1]\n * @property {number} [signatureData] - can be signed automatically if `privateKey` or `seedPhrase` passed\n */\n\n/**\n* @param {TxParams} txParams\n* @param {PostTxOptions} txOptions\n* @param {number} [txOptions.gasRetryLimit=2] - number of retries if request failed because of low gas\n* @param {number} [txOptions.nonceRetryLimit=0] - number of retries if request failed because of invalid nonce\n* @param {number} [txOptions.mempoolRetryLimit=0] - number of retries if request failed with error \"Tx from address already exists in mempool\"\n* @param {string|Buffer} [txOptions.seedPhrase] - alternative to txOptions.privateKey\n* @param {string|Buffer} [txOptions.privateKey] - to sign tx or get nonce or to make proof for redeemCheck tx\n* @param {string} [txOptions.address] - to get nonce (useful for multi-signatures) or to make proof for redeemCheck tx\n* @param {ByteArray} [txOptions.password] - to make proof for RedeemCheckTxData\n* @param {AxiosRequestConfig} [axiosOptions] - for main request (send tx hash)\n* @param {AxiosRequestConfig} [extraAxiosOptions] - for secondary requests (nonce and coin IDs)\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postTx(txParams, {seedPhrase: '...', gasRetryLimit: 2, mempoolRetryLimit: 0})\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n        // Check here that tx in block has no errors (code === 0)\n    });\n```\n\n### .postSignedTx()\n\nPost new transaction to blockchain.  \nAccepts signed tx string or Buffer and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with:\n - sent transaction data included in a **block** (from gate), \n - or transaction hash included in **mempool** (from node). \n\n```js\n/**\n* @param {string|Buffer} signedTx\n* @param {AxiosRequestConfig} [axiosOptions]\n* @return {Promise<NodeTransaction|{hash: string}>}\n*/\nminter.postSignedTx('0xf8920102018a4d4e540000000000000001aae98a4d4e5400000000...')\n    .then((tx) => {\n        console.log(tx.hash);\n        // 'Mt...'\n    });\n```\n\n### .getNonce()\n\nGet nonce for the new transaction from a given address.  \nAccepts address string and makes an asynchronous request to the blockchain API.  \nReturns promise that resolves with nonce for the new tx (current address tx count + 1).\n\n```js\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .ensureNonce()\nEnsure nonce for the tx params. You should provide an address for which you want to get nonce. Accepts `seedPhrase` or `privateKey` as well—the address will be derived from either of them.\n\n```js\n/**\n * @param {MinterApiInstance} apiInstance\n * @param {TxParams} txParams\n * @param {Object} txOptions\n * @param {string} [txOptions.seedPhrase]\n * @param {ByteArray} [txOptions.privateKey]\n * @param {string} [txOptions.address]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number>}\n */\nminter.ensureNonce(txParams, {seedPhrase: '...'})\n    .then((nonce) => {\n        console.log(nonce);\n        // 123\n    });\n```\n\n\n### .getMinGasPrice()\nGet current minimum gas price.\n\n```js\nminter.getMinGasPrice()\n    .then((gasPrice) => {\n        console.log(gasPrice);\n        // 1\n    });\n```\n\n\n### .getCoinInfo()\nGet coin info by coin ID or symbol.\n\n```js\n/**\n * @param {string|number} coin - coind ID or symbol \n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<CoinInfo>}\n */\nminter.getCoinInfo(coin)\n    .then((coinInfo) => {\n        console.log(coinInfo.id, coinInfo.symbol);\n    });\n```\n\n\n### .getCoinId()\nGet coin ID by coin symbol or array of symbols. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {string|Array<string>} symbol - coin symbol or array of symbols\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<number|Array<number>>}\n */\nminter.getCoinId('MNT')\n    .then((id) => {\n        console.log(id);\n        // 0\n    });\n\nminter.getCoinId(['MNT', 'MYCOIN'])\n    .then((ids) => {\n          console.log(ids);\n          // [0, 123]\n    });\n```\n\n\n### .getCoinSymbol()\nGet coin symbol by coin ID or array of IDs. Uses `getCoinInfo()` under the hood.\n\n```js\n/**\n * @param {number|string|Array<number|string>} id - coin ID or array of IDs\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<string|Array<string>>}\n */\nminter.getCoinSymbol(0)\n    .then((symbol) => {\n        console.log(symbol);\n        // 0\n    });\n\nminter.getCoinSymbol(['0', '123'])\n    .then((symbols) => {\n          console.log(symbols);\n          // ['MNT', 'MYCOIN']\n    });\n```\n\n\n### .replaceCoinSymbol()\nReplace coin symbols with coin IDs in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 'BIP',\n    },\n    gasCoin: 'MYCOIN',\n};\nminter.replaceCoinSymbol(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 0,\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinId()\nReplace coin IDs with coin symbols in txParams object. Mutates original object.\n\n```js\n/**\n * @param {TxParams} txParams\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nconst txParams = {\n    type: 1,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0,\n    },\n    gasCoin: 123,\n};\nminter.replaceCoinId(txParams)\n    .then((newTxParams) => {\n        console.log(newTxParams);\n        // {\n        //     type: 1,\n        //     data: {\n        //         to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        //         value: 10,\n        //         coin: 'BIP',\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .replaceCoinSymbolByPath()\nReplace coin symbols with coin IDs in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 'BIP',\n        },\n    },\n    gasCoin: 'MYCOIN',\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinSymbolByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 0,\n        //         },\n        //     },\n        //     gasCoin: 1234,\n        // }\n    });\n```\n\n\n### .replaceCoinIdByPath()\nReplace coin IDs with coin symbols in arbitrary object by path list.\n\n```js\nconst params = {\n    foo: {\n        bar: {\n            coin: 0,\n        },\n    },\n    gasCoin: 1234,\n};\n/**\n * @param {Object} params\n * @param {Array<string>} pathList\n * @param {number} [chainId]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<TxParams>}\n */\nminter.replaceCoinIdByPath(params, ['gasCoin', 'foo.bar.coin'])\n    .then((newParams) => {\n        console.log(newParams);\n        // {\n        //     foo: {\n        //         bar: {\n        //             coin: 'BIP',\n        //         },\n        //     },\n        //     gasCoin: 'MYCOIN',\n        // }\n    });\n```\n\n\n### .estimateCoinBuy()\nEstimate how many coins you will pay to buy some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {string|number} params.valueToBuy\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate from pool, bancor, or optimal\n * @param {Array<number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateBuyResult>}\n */\n\n/**\n * @typedef {Object} EstimateBuyResult\n * @property {number|string} will_pay - amount of coinToSell\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinBuy({\n    coinToBuy: 'MYCOIN',\n    valueToBuy: 10,\n    coinToSell: 'BIP',\n})\n    .then((result) => {\n        console.log(result.will_pay, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n\n### .estimateCoinSell()\nEstimate how many coins you will get for selling some other coins.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasCoin]\n * @param {string|number} [params.coinCommission] - gasCoin alias\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {number|string} commission - amount of coinToSell to pay fee\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSell({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.commission, result.swap_from);\n        // 123, 0.1, 'pool'\n    });\n```\n\n### .estimateCoinSellAll()\nEstimate how many coins you will get for selling some other coins by SellAll transaction.\n\n```js\n/**\n * @param {Object} params\n * @param {string|number} params.coinToSell - ID or symbol of the coin to sell\n * @param {string|number} params.valueToSell\n * @param {string|number} params.coinToBuy - ID or symbol of the coin to buy\n * @param {ESTIMATE_SWAP_TYPE} [params.swapFrom] - estimate pool swap\n * @param {Array<string|number>} [params.route] - IDs of intermediate coins for pool swaps\n * @param {string|number} [params.gasPrice]\n * @param {AxiosRequestConfig} [axiosOptions]\n * @return {Promise<EstimateSellAllResult>}\n */\n\n/**\n * @typedef {Object} EstimateSellAllResult\n * @property {number|string} will_get - amount of coinToBuy\n * @property {\"pool\"|\"bancor\"} swap_from\n */\n\nminter.estimateCoinSellAll({\n    coinToSell: 'BIP',\n    valueToSell: 10,\n    coinToBuy: 'MYCOIN',\n})\n    .then((result) => {\n        console.log(result.will_get, result.swap_from);\n        // 123, 'pool'\n    });\n```\n\n\n### .estimateTxCommission()\nEstimate transaction fee.\n\nFirst argument `txParams` can be a `TxParams` object or raw signed tx hex string.  \nSecond options argument accepts `needGasCoinFee`, `needBaseCoinFee`, and `needPriceCoinFee` fields to customize estimate behaviour.\nResolves with object containing fee.\n\n`needGasCoinFee`\n- `FEE_PRECISION_SETTING.PRECISE` (default) - make direct call to `estimate_tx_commission/{tx}` api method and return `commission` field\n- `FEE_PRECISION_SETTING.IMPRECISE` - if gasCoin same as baseCoin and baseCoinFee is defined (otherwise upgrades to `PRECISE`), then it makes several requests for blockchain data and approximately calculates the fee relying on that data, but don't take limit orders into account.  \nPros: if used with request caching then when users input payload, the fee could be calculated dynamically without extra requests for each payload character.  \nCons: less accurate because don't consider limit orders, makes more requests for a single estimate.\n- `FEE_PRECISION_SETTING.OMIT` - omits `commission` field\n\n\n`needBaseCoinFee`\n- `FEE_PRECISION_SETTING.IMPRECISE` - works only if priceCoinFee is defined, calculates basing on pool data, inaccurate because don't consider limit orders\n- ` FEE_PRECISION_SETTING.OMIT` (default) - omits `baseCoinComission` field\n\n`needPriceCoinFee`\n- `FEE_PRECISION_SETTING.PRECISE` - make an API call to the `price_commissions` method and returns `priceCoinCommission` and `commissionPriceData` fields\n- `FEE_PRECISION_SETTING.OMIT` (default) - omits `priceCoinCommission`\n\nSee also [Minter commissions docs](https://www.minter.network/docs#commissions)\n\n```js\n/**\n * @param {TxParams|string} txParams\n * @param {object} [options]\n * @param {FEE_PRECISION_SETTING} [options.needGasCoinFee]\n * @param {FEE_PRECISION_SETTING} [options.needBaseCoinFee]\n * @param {FEE_PRECISION_SETTING} [options.needPriceCoinFee]\n * @param {AxiosRequestConfig} [axiosOptions] - for main request (estimation)\n * @param {AxiosRequestConfig} [extraAxiosOptions] - for secondary requests (commission price data, coin IDs, and pool info)\n * @return {Promise<{commission: (number|string), baseCoinCommission: (number|string), priceCoinCommission: (number|string), commissionPriceData: CommissionPriceData}>|Promise<{commission: (number|string)}>}\n */\n\n// from raw tx string: one direct api call\nminter.estimateTxCommission('0xf8920101028a4d4e540000000000000001aae98a4d4e...')\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// from tx params: one direct api call\nminter.estimateTxCommission({\n    type: TX_TYPE.SEND,\n    data: {to: 'Mx...', value: 10, coin: 'BIP'},\n    gasCoin: 'BIP',\n}, {\n    needGasCoinFee: FEE_PRECISION_SETTING.PRECISE,\n    needBaseCoinFee: FEE_PRECISION_SETTING.OMIT,\n    needPriceCoinFee: FEE_PRECISION_SETTING.OMIT,\n})\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1 }\n    });\n\n// from tx params: calculated on fee price info and pool data\n// with caching enabled can save api calls when \nminter.estimateTxCommission(\n    {\n        type: TX_TYPE.SEND,\n        data: {to: 'Mx...', value: 10, coin: 'BIP'},\n        gasCoin: 'BIP',\n    }, {\n        needGasCoinFee: FEE_PRECISION_SETTING.IMPRECISE,\n        needBaseCoinFee: FEE_PRECISION_SETTING.IMPRECISE,\n        needPriceCoinFee: FEE_PRECISION_SETTING.PRECISE,\n    }\n)\n    .then((feeData) => {\n        console.log(feeData);\n        // { commission: 0.1, baseCoinCommission: 0.1, priceCoinCommission: 0.1, commissionPriceData: {coin: {id: 0, symbol: 'BIP'}, /*...*/} }\n    });\n```\n\n\n\n## Tx params\n\nTx params object that is passed to `postTx` or `prepareSignedTx` methods to post transaction to blockchain.\n\n- nonce - unique number for each address, used to prevent transaction replication, starts from 1\n- chainId - id of the network (1 = mainnet, 2 = testnet)\n- gasPrice - fee multiplier, should be equal to or greater than current mempool min gas price\n- gasCoin - coin to pay fee\n- type - type of transaction (see below)\n- data - data of transaction (depends on transaction type)\n- payload (arbitrary bytes) - arbitrary user-defined bytes\n- serviceData - reserved field\n- signatureType - 1 = single-signed, 2 = multi-signed\n- signatureData - digital signature of transaction\n\n```js\n/**\n * @typedef {Object} TxParams\n * @property {number} [nonce]\n * @property {number} [chainId=1]\n * @property {number} [gasPrice=1]\n * @property {number|string} [gasCoin='0']\n * @property {string|Buffer|TX_TYPE} type\n * @property {Buffer|TxData|Object} data\n * @property {string} [payload]\n * @property {number} [signatureType]\n * @property {ByteArray|{multisig: ByteArray, signatures: Array<ByteArray>}} [signatureData]\n */\n```\n\n## Transaction types\n\n### Send\n[Tx docs](https://www.minter.network/docs#send-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx376615B9A3187747dC7c32e51723515Ee62e37Dc',\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Multisend\n[Tx docs](https://www.minter.network/docs#multisend-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MULTISEND,\n    data: {\n        list: [\n            {\n                value: 10,\n                coin: 0, // coin id\n                to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n            },\n            {\n                value: 2,\n                coin: 0, // coin id\n                to: 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99',\n            }\n        ],\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Buy\n[Tx docs](https://www.minter.network/docs#buy-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell\n[Tx docs](https://www.minter.network/docs#sell-coin-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL,\n    data: {\n        coinToSell: 0,\n        coinToBuy: 123,\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all\n[Tx docs](https://www.minter.network/docs#sell-all-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.SELL_ALL,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 123, // coin id\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Buy from swap pool\n[Tx docs](https://www.minter.network/docs#buy-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BUY_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToBuy: 10,\n        maximumValueToSell: 1234 // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Sell to swap pool\n[Tx docs](https://www.minter.network/docs#sell-from-swap-pool-transaction)\n```js\nconst txParams = {\n    type: TX_TYPE.SELL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        valueToSell: 10,\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Sell all to swap pool\n[Tx docs](https://www.minter.network/docs#sell-all-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as coin to spend (`coins[0]`) automatically\n    type: TX_TYPE.SELL_ALL_SWAP_POOL,\n    data: {\n        coins: [0, 123, 15], // route of coin IDs from spent to received\n        minimumValueToBuy: 0, // optional, 0 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add limit order\n[Tx docs](https://www.minter.network/docs#add-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    // `gasCoin` will be set as `coinToSell` automatically\n    type: TX_TYPE.ADD_LIMIT_ORDER,\n    data: {\n        coinToSell: 0, // coin id\n        coinToBuy: 5, // coin id\n        valueToSell: 10,\n        valueToBuy: 10,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove limit order\n[Tx docs](https://www.minter.network/docs#remove-limit-order-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIMIT_ORDER,\n    data: {\n        id: 123, // order id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create pool\n[Tx docs](https://www.minter.network/docs#create-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_SWAP_POOL,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      volume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Add liquidity to pool\n[Tx docs](https://www.minter.network/docs#add-liquidity-to-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.ADD_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      volume0: 123,\n      maximumVolume1: 456,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Remove liquidity from pool\n[Tx docs](https://www.minter.network/docs#remove-liquidity-from-swap-pool-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REMOVE_LIQUIDITY,\n    data: {\n      coin0: 12,\n      coin1: 34,\n      liquidity: 123, // amount of LP tokens\n      minimumVolume0: 0,\n      minimumVolume1: 0,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create coin\n[Tx docs](https://www.minter.network/docs#create-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate coin\n[Tx docs](https://www.minter.network/docs#recreate-coin-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_COIN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        constantReserveRatio: 10,\n        initialReserve: 20,\n        maxSupply: 10000, // optional, 10^15 by default\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Create token\n[Tx docs](https://www.minter.network/docs#create-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Recreate token\n[Tx docs](https://www.minter.network/docs#recreate-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.RECREATE_TOKEN,\n    data: {\n        name: 'My Coin',\n        symbol: 'MYCOIN',\n        initialAmount: 5,\n        maxSupply: 10000, // optional, 10^15 by default\n        mintable: true,\n        burnable: true,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit ticker owner\n[Tx docs](https://www.minter.network/docs#edit-ticker-owner-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_TICKER_OWNER,\n    data: {\n        symbol: 'MYCOIN',\n        newOwner: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Mint token\n[Tx docs](https://www.minter.network/docs#mint-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MINT_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Burn token\n[Tx docs](https://www.minter.network/docs#burn-token-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.BURN_TOKEN,\n    data: {\n        coin: 1, // coin id\n        value: 123,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Declare candidacy\n[Tx docs](https://www.minter.network/docs#declare-candidacy-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DECLARE_CANDIDACY,\n    data: {\n        address: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n        coin: 0, // coin id\n        stake: 100, // amount\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate\n[Tx docs](https://www.minter.network/docs#edit-candidate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        rewardAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        ownerAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        controlAddress: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate public Key\n[Tx docs](https://www.minter.network/docs#edit-candidate-public-key-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_PUBLIC_KEY,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        newPublicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Edit candidate commission\n[Tx docs](https://www.minter.network/docs#edit-candidate-commission-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_CANDIDATE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        commission: 10, // percentage\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Delegate\n[Tx docs](https://www.minter.network/docs#delegate-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.DELEGATE,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Unbond\n[Tx docs](https://www.minter.network/docs#unbond-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.UNBOND,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Move stake\n[Tx docs](https://www.minter.network/docs#move-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.MOVE_STAKE,\n    data: {\n        from: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        to: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a4',\n        coin: 0, // coin id\n        stake: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Lock stake\n[Tx docs](https://www.minter.network/docs#lock-stake-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK_STAKE,\n    /* data is empty, so not required */\n    data: {},\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate on\n[Tx docs](https://www.minter.network/docs#set-candidate-online-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_ON,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set candidate off\n[Tx docs](https://www.minter.network/docs#set-candidate-offline-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_CANDIDATE_OFF,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Set halt block\n[Tx docs](https://www.minter.network/docs#set-halt-block-transaction)\nVote for halt block.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.SET_HALT_BLOCK,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for commission price\n[Tx docs](https://www.minter.network/docs#vote-for-commission-price-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_COMMISSION,\n    data: {\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n        coin: 0, // coin id\n        payloadByte: '12',\n        send: '12',\n        buyBancor: '12',\n        sellBancor: '12',\n        sellAllBancor: '12',\n        buyPoolBase: '12',\n        sellPoolBase: '12',\n        sellAllPoolBase: '12',\n        buyPoolDelta: '12',\n        sellPoolDelta: '12',\n        sellAllPoolDelta: '12',\n        createTicker3: '12',\n        createTicker4: '12',\n        createTicker5: '12',\n        createTicker6: '12',\n        createTicker7to10: '12',\n        createCoin: '12',\n        createToken: '12',\n        recreateCoin: '12',\n        recreateToken: '12',\n        declareCandidacy: '12',\n        delegate: '12',\n        unbond: '12',\n        redeemCheck: '12',\n        setCandidateOn: '12',\n        setCandidateOff: '12',\n        createMultisig: '12',\n        multisendBase: '12',\n        multisendDelta: '12',\n        editCandidate: '12',\n        setHaltBlock: '12',\n        editTickerOwner: '12',\n        editMultisig: '12',\n        editCandidatePublicKey: '12',\n        addLiquidity: '12',\n        removeLiquidity: '12',\n        editCandidateCommission: '12',\n        burnToken: '12',\n        mintToken: '12',\n        voteCommission: '12',\n        voteUpdate: '12',\n        createSwapPool: '12',\n        failedTx: '12',\n        addLimitOrder: '12',\n        removeLimitOrder: '12',\n        moveStake: '12',\n        lockStake: '12',\n        lock: '12',\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Vote for network update\n[Tx docs](https://www.minter.network/docs#vote-for-network-update-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.VOTE_UPDATE,\n    data: {\n        version: 'v2.1',\n        publicKey: 'Mpf9e036839a29f7fba2d5394bd489eda927ccb95acc99e506e688e4888082b3a3',\n        height: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Price vote\nDisabled\n[Tx docs](https://www.minter.network/docs#price-vote-transaction)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.PRICE_VOTE,\n    data: {\n        price: 1234,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Redeem check\n[Checks docs](https://www.minter.network/docs#minter-check)  \n[Tx docs](https://www.minter.network/docs#redeem-check-transaction)  \nSee also [how to issue check](#issuecheck)\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.REDEEM_CHECK,\n    data: {\n        check: 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027',\n    },\n};\n\n// password and seedPhrase will be used to generate check's proof\nminter.postTx(txParams, {seedPhrase: '...', password: 'pass'});\n// combination of password and address can also be used for proof generation\nminter.postTx(txParams, {seedPhrase: '...', address: '...', password: 'pass'});\n```\n\n### Lock\n[Tx docs](https://www.minter.network/docs#lock-transaction)\nLock coins for certain period\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.LOCK,\n    data: {\n        dueBlock: 123,\n        value: 10,\n        coin: 0, // coin id\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n### Create multisig\n[Multisig docs](https://www.minter.network/docs#multisignatures)  \n[Tx docs](https://www.minter.network/docs#create-multisig-address)\n\nAddresses count must not be greater than 32.  \nWeights count must be equal to addresses count.  \nWeight value must fall within the range 0–1023.\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.CREATE_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n### Edit multisig\n[Tx docs](https://www.minter.network/docs#edit-multisig-transaction)\nMust be sent from a multisig address.\n\n```js\nimport {TX_TYPE} from \"minter-js-sdk\";\nconst txParams = {\n    type: TX_TYPE.EDIT_MULTISIG,\n    data: {\n        addresses: ['Mx7633980c000139dd3bd24a3f54e06474fa941e00', 'Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99'],\n        weights: [40, 80],\n        threshold: 100,\n    },\n};\n\nminter.postTx(txParams, {seedPhrase: '...'});\n```\n\n\n## Transaction\n### Prepare transaction\nPrepare `Tx` object from txParams, used under the hood of PostTx. Accepts arguments:\n - `txParams` object\n - `options.seedPhrase` - optional, can be passed to txData constructor for redeem check transaction and used to sign transaction with single signature\n - `options.privateKey` - optional, can be used instead of `seedPhrase` directly\n```js\nimport {prepareTx} from 'minter-js-sdk';\nconst tx = prepareTx(txParams, {seedPhrase: '...'});\nconsole.log('signed tx', tx.serialize().toString('hex'));\n\n// get actual nonce first\nminter.getNonce('Mx...')\n    .then((nonce) => {\n        const tx = prepareTx({...txParams, nonce}, {seedPhrase: '...'});\n        console.log('signed tx', tx.serialize().toString('hex'));\n    });\n```\n\n### Prepare single-signed transaction\n`prepareSignedTx` is an alias for `prepareTx` but with `signatureType: 1`. Hence, no support for multi-signatures.\n```js\nimport {prepareSignedTx, prepareTx} from 'minter-js-sdk';\n\nlet tx = prepareSignedTx(txParams, {seedPhrase: '...'});\n// is the same as\ntx = prepareTx({...txParams, signatureType: 1}, {seedPhrase: '...'})\n```\n\n### Make signature\nMake signature buffer for `Tx` with `privateKey`. Useful to create signatures for transactions with multiple signatures.\n```js\nimport {makeSignature} from 'minter-js-sdk';\n\nmakeSignature(tx, privateKey);\n```\n\n### Multi-signatures\nUsually, you should collect signatures from other multisig participants who can make them with `makeSignature`.  \nThen you should construct `signatureData` for `TxParams` object and pass such `TxParams` to `postTx` or `prepareTx`.\n```js\nimport {Minter, TX_TYPE, prepareTx, makeSignature} from \"minter-js-sdk\";\n\nconst minter = new Minter({/* ... */});\nconst txParams = {\n    nonce: 1,\n    chainId: 1,\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id    \n    },\n    gasCoin: 0, // coin id\n    gasPrice: 1,\n    payload: 'custom message',\n    signatureType: 2, // multiple-signature type\n};\nconst tx = prepareTx(txParams);\n\nconst signature1 = makeSignature(tx, privateKey1);\nconst signature2 = makeSignature(tx, privateKey2);\n\nminter.postTx({\n    ...txParams,\n    signatureData: {\n        multisig: multisigAddress,\n        signatures: [signature1, signature2],\n    },\n})\n```\n\n### Decode transaction\nDecode RLP-serialized tx into params object.\n\nParams:\n- `tx` - string, RLP-decoded tx\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n```js\nimport {decodeTx} from 'minter-js-sdk';\ndecodeTx('0xf87e818102018a42414e414e415445535402a3e28a42414e414e41544553548a067d59060c9f4d7282328a4d4e540000000000000080808001b845f8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be');\n//  {\n//      nonce: '129',\n//      chainId: '2',\n//      gasPrice: '1',\n//      gasCoin: '0',\n//      type: '0x02',\n//      data: { \n//          coinToSell: '123',\n//          valueToSell: '30646.456735029139767858',\n//          coinToBuy: '0',\n//          minimumValueToBuy: '0',\n//      },\n//      payload: '',\n//      signatureType: '1',\n//      signatureData: '0xf8431ca01d568386460de1dd40a7c73084a84be68bbf4696aea0208530d3bae2ccf47e4ba059cb6cbfb12e56d7f5f4f8c367a76a867aff09afca15e8d61a7ef4cf7e0d26be',\n//  }\n```\n\n\n## Minter Check\n\n[Minter Check](https://www.minter.network/docs#minter-check) is like an ordinary bank check. Each user of the network can issue a check with any amount of coins and pass it to another person. Receiver will be able to claim the check from an arbitrary account.\n\n### `issueCheck()`\n\nChecks are issued off-line and do not exist on blockchain until “redemption.”\n\nParams:\n- `seedPhrase`- seed phrase of the issuer to sign check. Type: string\n- `privateKey` - private key of the issuer to sign check. Type: string, Buffer\n- `password` - password to protect check. Type: string\n- `nonce` - unique string to allow issuance of identical checks. Type: string\n- `chainId` - network type to prevent using the same check on different networks. Type: number. Default: `1`\n- `coin` - coin to transfer. Type: string\n- `value` - amount to transfer. Type: number\n- `gasCoin` - coin to pay fee that will be charged from issuer once the RedeemCheck tx has been sent by the recipient. Type: string. Default: network's base coin (`'BIP'` (mainnet) or `'MNT'` (testnet))\n- `dueBlock` - block height at which the check expires. Type: number. Default: `999999999`\n\n```js\n// Since check issuance happens off-line, you can use it standalone without instantiating SDK\nimport {issueCheck} from \"minter-js-sdk\";\nconst check = issueCheck({\n    seedPhrase: 'air model item valley ...',\n    password: 'pass',\n    nonce: '1',\n    chainId: 1,\n    coin: 0, // coin id\n    value: 10,\n    gasCoin: 0, // coin id\n    dueBlock: 999999,\n});\nconsole.log(check);\n// => 'Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027'\n```\n\n### `decodeCheck()`\n\nDecode raw check.\n\n```js\nimport {decodeCheck} from \"minter-js-sdk\";\nconst check = decodeCheck('Mcf8ab3101830f423f8a4d4e5400000000000000888ac7230489e800008a4d4e5400000000000000b841f69950a210196529f47df938f7af84958cdb336daf304616c37ef8bebca324910910f046e2ff999a7f2ab564bd690c1102ab65a20e0f27b57a93854339b60837011ba00a07cbf311148a6b62c1d1b34a5e0c2b6931a0547ede8b9dfb37aedff4480622a023ac93f7173ca41499624f06dfdd58c4e65d1279ea526777c194ddb623d57027');\nconsole.log(check);\n// =>\n// {\n//   nonce: '1',\n//   chainId: 1,\n//   coin: '0',\n//   value: '10',\n//   gasCoin: '0',\n//   dueBlock: 999999,\n// } \n```\n\n\n## Minter Link\n[Minter Link Protocol](https://github.com/MinterTeam/minter-link-protocol) describes how to represent transaction data into a simple link, which can be easily consumed by user as a URL or QR code. The link is processed by [bip.to](https://bip.to) web app or any associated mobile app. The app retrieves data from the link, generates a valid transaction using logged user's private key, and sends it.\n\nSo everything a user needs to send a transaction is click/tap on the link or scan a QR code.\n\n### `prepareLink()`\nCreate link from transaction params.\n\nOptions:\n- `txParams` - object with [params](https://github.com/MinterTeam/minter-link-protocol#params) of transaction\n- `txParams.type`\n- `txParams.data`\n- `txParams.payload` - optional\n- `txParams.nonce` - optional\n- `txParams.gasPrice` - optional\n- `txParams.gasCoin` - optional\n- `linkHost` - optional, custom hostname of the link, leave undefined to use the default 'https://bip.to' \n\n```js\nimport {prepareLink, TX_TYPE} from 'minter-js-sdk';\n\nconst txParams = {\n    type: TX_TYPE.SEND,\n    data: {\n        to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n        value: 10,\n        coin: 0, // coin id\n    },\n    gasCoin: 0, // coin id\n    payload: 'custom message',\n};\nprepareLink(txParams);\n// => 'https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA'\n```\n\n### `decodeLink()`\nDecode link into transaction params.\n\nParams:\n- `url` - string with link\n- `options` - object with extra options\n- `options.decodeCheck` - boolean, adds `checkData` field next to `check` field for redeemCheck tx data\n- `options.privateKey` - links with `password` and no `proof` require privateKey to generate valid `proof`\n- `options.seedPhrase` - alternative to `options.privateKey`\n\n\n```js\nimport {decodeLink} from 'minter-js-sdk';\n\ndecodeLink('https://bip.to/tx/-EgBqumKTU5UAAAAAAAAAJR2M5gMAAE53TvSSj9U4GR0-pQeFoiKxyMEiegAAI5jdXN0b20gbWVzc2FnZYCAikFTRAAAAAAAAAA');\n// =>\n// {\n// gasCoin: 0,\n// type: '0x01',\n// data: {\n//    to: 'Mx7633980c000139dd3bd24a3f54e06474fa941e16',\n//    coin: '0',\n//    value: '10',\n// },\n// payload: 'custom message',\n// }\n\nconst LINK_CHECK = 'https://bip.to/tx?d=f8f009b8e9f8e7b8a2f8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75b8410497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d0180808080'; \ndecodeLink(LINK_CHECK, {decodeCheck: true})\n// { \n//     type: '0x09',\n//     data: { \n//         proof: '0x0497ea588f0fc2bd448de76d03a74cf371269e10ac1a02765fb5fa37c29f67e0348fb3faacd3370b8809401e7d562d8943f3642ce96667188d3c344e8e5bff6d01',\n//         check: 'Mcf8a03101830f423f8a4d4e5400000000000000888ac7230489e80000b84149eba2361855724bbd3d20eb97a54ea15ad7dc28c1111b8dcf3bb15db26f874f095803cad9f8fc88b2b4eec9ba706325a7929be31b6ccfef01260791a844cb55011ba06c63ad17bfe07b82be8a0144fd4daf8b4144281fdf88f313205ceacf37fd877fa03c243ad79cab6205f4b753bd402c4cfa5d570888659090b2f923071ac52bdf75',\n//         checkData: {\n//            nonce: '1',\n//            chainId: '1',\n//            coin: '0',\n//            value: '10',\n//            dueBlock: '999999',\n//         },\n//     },\n//     payload: '',\n// }\n\n```\n\n\n\n\n\n\n## Minter Wallet\nGet private key from seed phrase and address from private key.\n\nUse [minterjs-wallet](https://github.com/MinterTeam/minterjs-wallet) package.\n\n\n# License\n\nMIT License\n","readmeFilename":"README.md"}