{"_id":"@chainup-custody/js-wapi-sdk","name":"@chainup-custody/js-wapi-sdk","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@chainup-custody/js-wapi-sdk","version":"1.0.1","description":"chainup custody wapi service. node sdk tool for calling wapi service","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/HiCoinCom/js-wapi-sdk.git"},"keywords":["waas","wapi"],"author":{"name":"chainup-custody"},"license":"MIT","bugs":{"url":"https://github.com/HiCoinCom/js-wapi-sdk/issues"},"homepage":"https://github.com/HiCoinCom/js-wapi-sdk#readme","dependencies":{"node-rsa":"^1.1.1","request":"^2.88.2","urlsafe-base64":"^1.0.0"},"gitHead":"528eb84bf750e78b4d044247d18e4e9c9865b0f9","_id":"@chainup-custody/js-wapi-sdk@1.0.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-vW49Dti4O7eXcQimqaZfVqMHDe7HDtck+gcCCWtgXUY5zVHcdQ5A4T4jD6hZ3U2R/Eoxl/XPeG3ToaJk6Vgfrw==","shasum":"1ee394f47a1d92f2a1f9ea2d4cbf0a421c98256f","tarball":"https://registry.npmjs.org/@chainup-custody/js-wapi-sdk/-/js-wapi-sdk-1.0.1.tgz","fileCount":10,"unpackedSize":15488,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGx1yi1clwiOA4NhI7k5AS/wgknm6FzFayvclaux0nsWAiEAwahHTDdey/o+TrGI4JSqS3cA55TcP86rUu9u7Qk3BMs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj+IOpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3gg//dn1MYivR9NOnFqQYnVkpnMtOwmHpDB+UQ5tDQ+p9f1hyS84z\r\nshdU5FbVTkK1OyWuJF7KCIDN/GHYTatz4Q3Ek9fWwKhPjhjD3r+L2MeyNCTF\r\n+JTBIlNvxipscR4ZfNvVl4xjzdk1qnItwD9k3HTgf3WEw7eW+dB35C0MbHN1\r\nvwLTtxRuEx+AbwKvUvEPjRg/zb7CC6arwD/6/HbIWfU2NfLi/7/cxAbbJJzH\r\nm22RY8NoR2qUNvDhNPX6Q+M4TkrWfGpXLo21z3dhQisjJ9RDYeNyLj5073kM\r\nVUayuxzGYvdrtaAAl/uiUGY2IhQg30km2ZlTA5z0EmmfneAkHRxWJXUNh56o\r\nF6jxdyIpc3DMGNEXPfV2v5q9gVK4W/Hv2MFM1TcDZcwwxCXWeu1/AONS+JA8\r\nIsBbp7oziFB4e4PMEKqI2fhQWsJQWnUiKaVdwcQY3h/Pxi8M2Sf2zjzGmjg7\r\nBV1/V5JkICuOl5b+EErWS0/OuZUjcDWco37Uxe3ScE9D+5LGCu6Bq7G4L5Jt\r\nHIxBBdZOdH0zAF3dQkikcuoJAY3Ltgq5reyg+ONDeOCSeI1N7gCXDhgZNgg/\r\npV4NRGqPs2IJHMgd4chDn5GbxRMCeXTrkXxpxq9oBdqZiJoZa+wUelsnY0JL\r\nBR1F1LRAoaS4S/sjNlcRPH6zVTsPHM9Mrow=\r\n=3NTH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"custody-admin","email":"zhp12543@gmail.com"},"directories":{},"maintainers":[{"name":"zhangpeizheng","email":"1126074644@qq.com"},{"name":"custody-admin","email":"zhp12543@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-wapi-sdk_1.0.1_1677231017388_0.7486793895548196"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-24T09:30:17.261Z","1.0.1":"2023-02-24T09:30:17.576Z","modified":"2023-02-24T09:30:17.848Z"},"maintainers":[{"name":"zhangpeizheng","email":"1126074644@qq.com"},{"name":"custody-admin","email":"zhp12543@gmail.com"}],"description":"chainup custody wapi service. node sdk tool for calling wapi service","homepage":"https://github.com/HiCoinCom/js-wapi-sdk#readme","keywords":["waas","wapi"],"repository":{"type":"git","url":"git+https://github.com/HiCoinCom/js-wapi-sdk.git"},"author":{"name":"chainup-custody"},"bugs":{"url":"https://github.com/HiCoinCom/js-wapi-sdk/issues"},"license":"MIT","readme":"# js-wapi sdk\nwapi api client sdk\n\nDependency package installation：\n\n```\nnpm install @chainup-custody/js-wapi-sdk@1.0.1\n```\n\nHow to use:\n\n```\nconst Cons = require('@chainup-custody/js-wapi-sdk/utils/Constants');\nconst addrApi = require('@chainup-custody/js-wapi-sdk/apidao/AddressRegisterApi');\nconst depositNotify = require('@chainup-custody/js-wapi-sdk/apidao/DepositNotifyApi');\nconst withdraw = require('@chainup-custody/js-wapi-sdk/apidao/WithdrawApi');\n\n\nCons.setAppId('baaceb1e506e1b5d7d1f0a3b1622583b');//app id\nCons.setHost('http://awstestopenapi.hiwallet.pro');//interface domain name\nCons.setPubKey('wass public key');\nCons.setPrivateKey('Merchant private key');\n\n//1.registered address\naddrApi.registerAddress({symbol: 'VLX', addresses: 'aaaaabbbbb',memo:false}).then(function (data) {\n    console.debug(\"Registered address results：-----\" + JSON.stringify(data));\n});\n\n//2.obtain the number of available address\naddrApi.checkAvailableAddress({symbol: 'VLX'}).then(function (data) {\n    console.debug(\"obtain the number of available address：------\" + JSON.stringify(data));\n});\n\n//3.deposit notification interface\ndepositNotify.depositNotify({\n        \"address_to\": \"LZC5G3rWkzsDDRRJnMD9mfdefe2ncEFnNH\",\n        \"amount\": 123,\n        \"balance\": 12,\n        \"confirm\": 1000,\n        \"request_id\": \"2343423242452\",\n        \"status\": 1,\n        \"symbol\": \"VLX\",\n        \"txid\": \"adb936e24130c3fffer294d607a865f467a906b96850e02c1a2771c759f0bfdsf\"\n    }\n).then(function (data) {\n    console.debug(\"notification result：------\" + JSON.stringify(data));\n});\n\n//4.internal notification\ndepositNotify.internalNotify({\n    \"address_to\": \"aaaaabbbbb\",\n    \"amount\": 234234,\n    \"balance\": 12,\n    \"confirm\": 1,\n    \"fee\": 12,\n    \"symbol\": \"VLX\",\n    \"txid\": \"adb936e24130c3fff9a6294d607a865f467a906b96850e02c1a2771c759ewwe\"\n}).then(function (data) {\n    console.debug(\"internal notification result：------\" + JSON.stringify(data));\n});\n\n//5.Get the withdrawal list\nwithdraw.withdrawConsume({symbol: \"VLX\"}).then(function (data) {\n    console.debug(\"obtain the result of the withdrawal list：------\" + JSON.stringify(data));\n});\n\n//6.Withdrawal notification interface\nwithdraw.withdrawNotify({\n    \"address_to\": \"L111ZC5G3rWkzsDDRRJnMD9mfdefe2ncEF\",\n    \"amount\": 234234.234,\n    \"balance\": 0,\n    \"confirm\": 1000,\n    \"fee\": 12,\n    \"symbol\": \"VLX\",\n    \"trans_id\": 50021,\n    \"txid\": \"adb936e243fa6294d607a865f467a906b96850e02c1a2771c759ewrweD\"\n}).then(function (data) {\n    console.debug(\"Withdrawal notification interface result：------\" + JSON.stringify(data));\n});\n\n//7. Withdrawal Cancellation\nwithdraw.withdrawCancel({\"symbol\": \"VLX\", \"trans_id\": 49560,\"msg\":\"tesst\"}).then(function (data) {\n    console.debug(\"Withdrawal Cancellation Result：------\" + JSON.stringify(data));\n});\n\n```\n","readmeFilename":"README.md"}