{"_id":"@b2binpay/defi-sdk","_rev":"8-6cc0ca1051d547561c07bf6f5873c6cd","name":"@b2binpay/defi-sdk","dist-tags":{"latest":"1.6.0"},"versions":{"1.0.0":{"name":"@b2binpay/defi-sdk","version":"1.0.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.0.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"6b4e9baa1fc3dc59ba95c05dddb22720c67979ed","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.0.0.tgz","fileCount":479,"integrity":"sha512-9aCze0V1Y/bXeJlw59VA3Ba/wJ6trhfd9RuqnkGwrj7HLfcR63B5A+Laebt5YlxBqDo+2LvQMqxKwYqYYAjrHg==","signatures":[{"sig":"MEUCIHfziz2rBzuI3IhMqqjhq8Wxlmr+Ju9DgdHuCzFMwCLEAiEAjJd+EElhBpATMuXk16IrpYICSCM9Q5OowPnMUV9mkFI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1067413},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"470fb7c8490e277d5a15f132baf943b91c4e7053","private":false,"scripts":{"lint":"biome check","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.4","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.40.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","dotenv":"^17.2.3","typescript":"^5.9.3","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.25.2"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.0.0_1770996009984_0.08382122819725413","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@b2binpay/defi-sdk","version":"1.1.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.1.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"beb4e5b700c40832107e7566311553e6eb5fb833","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.1.0.tgz","fileCount":347,"integrity":"sha512-DP0kp5eQ5TKa3UYnHKBLcKVzPRh/94PwwG/yZLup4oU/edGJWu9W4tdEl6uU0DQy0RwqXN5gL5eWrHQYqKhlIg==","signatures":[{"sig":"MEYCIQCelkh9EtACVQGhk62BePgoW9CyDnFKmBcy6MQWpLFMMwIhALHtuwcznJyXQQCOaebnuWZ2pP9Y8dWSrl2sbia1btXR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":836646},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"2d132c6f640883e0825a242bafaa7c8b5997f092","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.7","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.22.2","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.25.2"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.1.0_1776350384026_0.5977321112415328","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@b2binpay/defi-sdk","version":"1.2.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.2.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"f1214468030dedca5cd71213398d9f88bd6b9bdd","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.2.0.tgz","fileCount":355,"integrity":"sha512-DENFItF1j+xrisBA/1tK+Trw6tL1xKgRYykpwzD+yZ866SxqX+hCqa5OLfgCl2Z9ckf2Ld+qSb1WfDaDaGs2Gw==","signatures":[{"sig":"MEUCIQDMocukCDNXGWTl3cmtkjfHtRttvx3Sy66xTM2NNileVwIgRApeIe91a9lMAnN2jp5xv3e3BwePTythxkMQMt+J9+w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":873445},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"ed1280065fe1ba51f5e2e4be6175c7c7f999cb11","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.8","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.22.3","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.34.0"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.2.0_1780392053917_0.8809431891241446","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@b2binpay/defi-sdk","version":"1.3.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.3.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"9ecca1e39e88033777230a9bca2fceec4c361f58","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.3.0.tgz","fileCount":375,"integrity":"sha512-3DUP+kC64siSh8kv+MzAXmXTCzzbF6GqyOUKD0dbNBHdTYemLRP2qdGfIvMEK5Bwy+HgkNtPoO3aBLdYOuECQQ==","signatures":[{"sig":"MEQCIHkE209luPuNXDzIHa8tAdr9VVk/wvlSqN37zKYx2kLYAiBDW2Cvub9ACf0KHTe5uCPAJAyXgmvsRiv3nabm102DmA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":929978},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"4ba7f5cbe2295e76468a04e80f078f7f13d276ac","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.8","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.22.3","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.34.0"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.3.0_1780567340535_0.6239827816246648","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@b2binpay/defi-sdk","version":"1.4.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.4.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"401db6b23688f4ab8d6296525dbadbfc5f61e6c9","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.4.0.tgz","fileCount":695,"integrity":"sha512-52QDHOC2aeSCK19Lz5wK9Ntc3YdPZUiUFaWTcizORO8poX207Pe9CG+0uPfoOvPGlpp2Qaee0dSvBjWWvIJxXw==","signatures":[{"sig":"MEUCID6X+3XCxfL6aqwOVVycEEwYNTSySdxipbCSnshiRkNoAiEA8L3GUZqRSsTjMejq8i3DGDCBlkGcGaF7xhhq49zX+uI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2339764},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"6bbd78690970fdafee3d01a3b4b20886f7cb1ae6","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.8","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.23.1","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.34.0"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.4.0_1782977612180_0.20914875844988146","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@b2binpay/defi-sdk","version":"1.4.1","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.4.1","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"522dbd97872273642369bbe5efe5891e8d5c1af8","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.4.1.tgz","fileCount":695,"integrity":"sha512-HkJTJ/B/PfnzSMyFr9IqKwKB9639AkypAJkbVMt5lMyG5mDftb1NPPHauFoU8TgN+NE4luwplEa8SeKgQcfARA==","signatures":[{"sig":"MEYCIQDENyBrqwUIr9Sz+/uahp8YIHfzPJ/RHD7ISDsK67G7mgIhALVg9XsSqoVtpC3zxa8ScsApAnmeEzobCRANc8Zf/BR9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2339784},"main":"./dist/src/index.js","types":"./dist/src/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js","require":"./dist/src/index.js"},"./package.json":"./package.json"},"gitHead":"b32c886d0ac39239921c97f015e11b215935fae0","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.8","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.23.1","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.34.0"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.4.1_1784552980036_0.08764094153590274","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@b2binpay/defi-sdk","version":"1.5.0","author":{"url":"https://b2binpay.com","name":"B2BinPay"},"license":"MIT","_id":"@b2binpay/defi-sdk@1.5.0","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"dist":{"shasum":"d7c5b4fca98d31553d863f1ed939161508ce5e77","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.5.0.tgz","fileCount":731,"integrity":"sha512-fZzFu71gnhKd3Zp3/14AOlHzdqIwdT9uUuhMGIuzQZmKCVxXsiOQbFJIsbwQpdKDd7C5+8BH5L8O8kauk0/RRw==","signatures":[{"sig":"MEQCIHDRXlwGp+83JFqzgeaHij2MCUdl+XP5LKwQIBnFrAOcAiAA7U8ANjgsNzpXqyQusZ+0DEP90QbcS/ky9+blOToO9A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2640568},"main":"./dist/src/index.js","types":"./dist/src/index.d.ts","engines":{"npm":"^10.9.2","node":"^22.16.0"},"exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js","require":"./dist/src/index.js"},"./package.json":"./package.json"},"gitHead":"69a2013c95fe71cc2c758dffbb1a618f1f5205b5","private":false,"scripts":{"lint":"biome check","test":"jest","build":"tsc -p tsconfig.build.json","lint:fix":"biome check --fix","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","prepublishOnly":"npm run build","example:queue-sign":"tsx examples/queue-sign.ts","example:create-payout":"tsx examples/create-payout.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:get-account-info":"tsx examples/get-account-info.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts"},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"repository":{"url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git","type":"git"},"_npmVersion":"10.9.8","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","directories":{},"_nodeVersion":"22.23.1","dependencies":{"viem":"^2.40.3","tronweb":"^6.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","jest":"^30.2.0","dotenv":"^17.2.3","ts-jest":"^29.4.6","typescript":"^5.9.3","@types/jest":"^30.0.0","@types/node":"^24.10.1","@biomejs/biome":"2.3.2","@openapitools/openapi-generator-cli":"^2.34.0"},"_npmOperationalInternal":{"tmp":"tmp/defi-sdk_1.5.0_1786437082350_0.8906917278737643","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"@b2binpay/defi-sdk","version":"1.6.0","description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","private":false,"license":"MIT","author":{"name":"B2BinPay","url":"https://b2binpay.com"},"repository":{"type":"git","url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git"},"homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","lint":"biome check","lint:fix":"biome check --fix","prepublishOnly":"npm run build","generate:api":"rm -rf ./generated-contracts && openapi-generator-cli generate --openapitools ./openapitools.json && node scripts/fix-generated-imports.mjs","example:get-account-info":"tsx examples/get-account-info.ts","example:create-invoice":"tsx examples/create-invoice.ts","example:get-invoice-details":"tsx examples/get-invoice-details.ts","example:create-payout":"tsx examples/create-payout.ts","example:claim-deposits":"tsx examples/claim-deposits.ts","example:queue-sign":"tsx examples/queue-sign.ts","example:queue-execute":"tsx examples/queue-execute.ts","example:queue-execute-batch":"tsx examples/queue-execute-batch.ts","example:evm-full-flow":"tsx examples/evm-full-flow.ts","example:tron-get-account-info":"tsx examples/tron-get-account-info.ts","example:tron-create-invoice":"tsx examples/tron-create-invoice.ts","example:tron-create-payout":"tsx examples/tron-create-payout.ts","example:tron-claim-deposits":"tsx examples/tron-claim-deposits.ts","example:tron-queue-sign":"tsx examples/tron-queue-sign.ts","example:tron-queue-execute":"tsx examples/tron-queue-execute.ts","example:tron-queue-execute-batch":"tsx examples/tron-queue-execute-batch.ts","example:tron-full-flow":"tsx examples/tron-full-flow.ts","example:tron-staking-flow":"tsx examples/tron-staking-flow.ts","example:get-operations-v2":"tsx examples/get-operations-v2.ts","example:get-blockchain-transactions":"tsx examples/get-blockchain-transactions.ts"},"dependencies":{"tronweb":"^6.2.0","viem":"^2.53.1"},"devDependencies":{"@biomejs/biome":"2.4.13","@openapitools/openapi-generator-cli":"^2.34.0","@types/jest":"^30.0.0","@types/node":"^24.10.1","dotenv":"^17.2.3","jest":"^30.2.0","ts-jest":"^29.4.6","tsx":"^4.21.0","typescript":"^5.9.3"},"main":"./dist/src/index.js","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","require":"./dist/src/index.js","default":"./dist/src/index.js"},"./package.json":"./package.json"},"engines":{"node":"^24.16.0","npm":"^11.0.0"},"gitHead":"607148fed3ae4fafd0281562d20d478b7ebbf946","_id":"@b2binpay/defi-sdk@1.6.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-gn49kKh9L3AnRACHz1CStKCDpVl2xEOsQOkSZNGVn3TAc3Wu0kGjh2DiUVSimda28ED1PXRkDQEwX4E6xsBykQ==","shasum":"0920a5d469d53b1c2bfe9acf23d6e830c56ac003","tarball":"https://registry.npmjs.org/@b2binpay/defi-sdk/-/defi-sdk-1.6.0.tgz","fileCount":744,"unpackedSize":2710283,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b2binpay%2fdefi-sdk@1.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDTnoexCOaDo9GRAfvNH9R/O+nZngzw2qxhWdFeTKewngIhAOE1hYBiPtrj/Cl3wyfOUG1ewfKP08MuKw45/caQdciI"}]},"_npmUser":{"name":"b2binpay","email":"ok@b2binpay.com"},"directories":{},"maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/defi-sdk_1.6.0_1788338502534_0.8978062660397061"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-13T15:20:09.876Z","modified":"2026-09-02T08:41:43.085Z","1.0.0":"2026-02-13T15:20:10.210Z","1.1.0":"2026-04-16T14:39:44.186Z","1.2.0":"2026-06-02T09:20:54.148Z","1.3.0":"2026-06-04T10:02:20.715Z","1.4.0":"2026-07-02T07:33:32.345Z","1.4.1":"2026-07-20T13:09:40.247Z","1.5.0":"2026-08-11T08:31:22.523Z","1.6.0":"2026-09-02T08:41:42.686Z"},"bugs":{"url":"https://github.com/b2binpay/defi-sdk-nodejs/issues"},"author":{"name":"B2BinPay","url":"https://b2binpay.com"},"license":"MIT","homepage":"https://github.com/b2binpay/defi-sdk-nodejs#readme","repository":{"type":"git","url":"git+https://github.com/b2binpay/defi-sdk-nodejs.git"},"description":"TypeScript SDK for the B2BinPay DeFi API with blockchain transaction utilities built on viem","maintainers":[{"name":"b2binpay","email":"ok@b2binpay.com"}],"readme":"# @b2binpay/defi-sdk\n\n[![npm version](https://img.shields.io/npm/v/@b2binpay/defi-sdk.svg)](https://www.npmjs.com/package/@b2binpay/defi-sdk)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%5E24.16.0-brightgreen)](https://nodejs.org)\n\nTypeScript SDK for the [B2BinPay DeFi](https://defi.b2binpay.com) platform — authenticated REST API access and blockchain transaction utilities for building non-custodial payment flows with multisig smart contracts.\n\n## Features\n\n- **Multi-chain** — EVM-compatible networks (Ethereum, BSC, Sepolia, …) and TRON (Mainnet, Shasta)\n- **Invoices & Payouts** — full lifecycle management: create, query, update, cancel\n- **Multisig operations** — EIP-712 / TIP-712 typed-data signing, signature packing, on-chain execution\n- **TRON staking** — Stake 2.0 freeze/unfreeze, resource delegation, and Super Representative voting\n- **Cross-chain transfers** — quote and create transfers between chains\n- **Operation & transaction history** — logical operations (v2) and on-chain blockchain transactions\n- **Claims** — enumerate claimable deposits and build claim calldata\n- **Address validation** — checksum + network + currency compatibility checks before write operations\n- **Type-safe** — complete TypeScript types from the OpenAPI spec plus handcrafted blockchain types\n- **Built on viem** — EVM blockchain interactions powered by [viem](https://viem.sh)\n\n## Requirements\n\n- Node.js `^24.16.0`\n- npm `^11.0.0`\n\n## Installation\n\n```sh\nnpm install @b2binpay/defi-sdk\n```\n\nTRON support (`TronMultisigBlockchainClient`) is included out of the box — `tronweb` is bundled as a dependency.\n\n## Quick Start\n\n```ts\nimport { DefiClient, FiatCurrency } from '@b2binpay/defi-sdk';\n\nconst client = new DefiClient({\n  baseUrl: 'https://api.defi.b2binpay.com',\n  apiKey: process.env.API_KEY!,\n});\n\n// Select the active chain (caches the deployment for subsequent calls)\nawait client.selectChain(1); // Ethereum Mainnet\n\n// Query balance\nconst balance = await client.getAccountBalanceSummary({\n  chainId: 1,\n  baseCurrency: FiatCurrency.Usd,\n});\nconsole.log('Total balance (USD):', balance.totalBalance);\n\n// Resolve a currency and create an invoice\nconst usdt = await client.findCurrencyBySymbol({ symbol: 'USDT', chainId: 1 });\nconst invoice = await client.createInvoice({\n  requestedAmount: '100',\n  currencyIds: [usdt.id],\n  trackingId: 'order-42',\n});\nconsole.log('Invoice ID:', invoice.id);\n```\n\n## Authentication\n\nAll requests use an API key sent as the `x-api-key` header. Pass it once at construction — the SDK attaches it to every request automatically. No token exchange or refresh is required.\n\nEach API key is scoped to a single account. The SDK resolves the account and deployment IDs internally; you never need to pass `accountId` explicitly.\n\n## EVM — Multisig Operation Flow\n\nPayouts are executed on-chain through a multisig wallet. The typical flow is:\n\n1. **Create a payout** — the API enqueues a multisig operation\n2. **Fetch the queue** — retrieve the pending operation\n3. **Build EIP-712 typed data and sign** — produce the off-chain approval\n4. **Submit the signature** — the API records approval; once the signing threshold is met the operation becomes executable\n5. **Execute on-chain** — broadcast the `execute` transaction\n\n```ts\nimport { createPublicClient, http } from 'viem';\nimport {\n  DefiClient,\n  MultisigBlockchainClient,\n  getEvmChainById,\n  QueueOperationStatus,\n} from '@b2binpay/defi-sdk';\nimport { privateKeyToAccount } from 'viem/accounts';\n\nconst CHAIN_ID = 11155111; // Sepolia\n\nconst client = new DefiClient({\n  baseUrl: 'https://api.defi.b2binpay.com',\n  apiKey: process.env.API_KEY!,\n});\n\n// Step 1: resolve deployment and ABI\nconst deployment = await client.selectChain(CHAIN_ID);\nconst contractAbi = await client.getContractAbi();\n\n// Step 2: create payout\nconst currency = await client.getNativeCurrency(CHAIN_ID);\nawait client.createPayout({\n  currencyId: currency.id,\n  amount: '0.001',\n  recipient: '0xRecipientAddress',\n});\n\n// Step 3: set up viem and the multisig client\nconst chain = getEvmChainById(String(CHAIN_ID), process.env.RPC_URL!);\nconst publicClient = createPublicClient({ chain, transport: http(process.env.RPC_URL!) });\n\nconst multisig = new MultisigBlockchainClient({ chainId: String(CHAIN_ID), publicClient, contractAbi });\n\n// Step 4: sign\nconst { items } = await client.getDeploymentQueue({});\nconst operation = items.find((op) => op.status === QueueOperationStatus.Pending);\n\nconst typedData = await multisig.createExecuteTypedData({\n  contractAddress: deployment.contract as `0x${string}`,\n  operation,\n});\n\nconst account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);\nconst rawSignature = await account.signTypedData(typedData);\n\nawait client.submitOperationSignature({\n  operationId: operation.executeOperationId,\n  signature: rawSignature,\n  signerAddress: account.address,\n});\n\n// Step 5: execute (once ready)\nconst readyQueue = await client.getDeploymentQueue({});\nconst readyOp = readyQueue.items.find((op) => op.status === QueueOperationStatus.Ready);\n\nconst tx = multisig.buildExecuteTransaction({\n  contractAddress: deployment.contract as `0x${string}`,\n  operations: [readyOp],\n});\n\n// Broadcast with a viem WalletClient\nimport { createWalletClient } from 'viem';\nconst walletClient = createWalletClient({ account, chain, transport: http(process.env.RPC_URL!) });\nconst hash = await walletClient.sendTransaction(tx);\n```\n\nSee [`examples/evm-full-flow.ts`](examples/evm-full-flow.ts) for a complete runnable walkthrough including automatic deposit and confirmation polling.\n\n## TRON — Multisig Operation Flow\n\nThe TRON flow mirrors EVM but uses `TronMultisigBlockchainClient` and `tronweb` for signing and broadcasting.\n\n```ts\nimport TronWeb from 'tronweb';\nimport { DefiClient, TronMultisigBlockchainClient, QueueOperationStatus } from '@b2binpay/defi-sdk';\n\nconst CHAIN_ID = 728126428; // TRON Mainnet (2494104990 for Shasta)\n\nconst client = new DefiClient({\n  baseUrl: 'https://api.defi.b2binpay.com',\n  apiKey: process.env.API_KEY!,\n});\n\nconst deployment = await client.selectChain(CHAIN_ID);\nconst contractAbi = await client.getContractAbi();\n\nconst tronWeb = new TronWeb({\n  fullHost: process.env.RPC_URL!,\n  privateKey: process.env.WALLET_PRIVATE_KEY,\n});\n\nconst multisig = new TronMultisigBlockchainClient({\n  chainId: String(CHAIN_ID),\n  tronWeb,\n  contractAbi,\n  defaultFeeLimit: 150_000_000, // 150 TRX in SUN\n});\n\n// Sign\nconst { items } = await client.getDeploymentQueue({});\nconst operation = items.find((op) => op.status === QueueOperationStatus.Pending);\n\nconst typedData = await multisig.createExecuteTypedData({\n  contractAddress: deployment.contract,\n  operation,\n});\n\nconst rawSignature = await tronWeb.trx.signMessageV2(typedData.message);\nawait client.submitOperationSignature({\n  operationId: operation.executeOperationId,\n  signature: rawSignature,\n  signerAddress: tronWeb.defaultAddress.base58,\n});\n\n// Execute\nconst readyOp = (await client.getDeploymentQueue({})).items.find(\n  (op) => op.status === QueueOperationStatus.Ready,\n);\nconst tx = await multisig.buildExecuteTransaction({\n  contractAddress: deployment.contract,\n  callerAddress: tronWeb.defaultAddress.base58,\n  operations: [readyOp],\n});\nconst broadcast = await tronWeb.trx.sendRawTransaction(tx.raw);\n```\n\nSee [`examples/tron-full-flow.ts`](examples/tron-full-flow.ts) for the complete TRON walkthrough.\n\n## Claims\n\nDeposits received to the multisig wallet must be explicitly claimed on-chain.\n\n```ts\n// List claimable deposits grouped by currency\nconst claims = await client.getClaims({});\nconst depositIds = claims.items.map((c) => c.invoiceNonce);\n\nconst claimable = await client.getClaimableCurrencies();\n\n// Build calldata\nconst calldata = multisig.buildClaimCalldata({\n  erc20: claimable[0].address as `0x${string}`,\n  depositAccountIds: depositIds,\n  to: recipientAddress, // optional — omit to claim to the multisig contract itself\n});\n\n// Broadcast using walletClient\nconst hash = await walletClient.sendTransaction({\n  to: deployment.contract as `0x${string}`,\n  data: calldata,\n});\n```\n\nFor TRON, use `multisig.buildClaimTransaction(...)` and broadcast with `tronWeb.trx.sendRawTransaction(tx.raw)`.\n\n## Address Validation\n\nUse `validateAddress` before submitting payouts or invoices to catch format and network mismatches early.\n\n```ts\nimport { validateAddress } from '@b2binpay/defi-sdk';\n\nconst { isValid, errors, normalizedAddress } = validateAddress({\n  address: recipientAddress,\n  networkChainId: CHAIN_ID,\n  currency: selectedCurrency,\n});\n\nif (!isValid) {\n  console.error('Invalid address:', errors);\n}\n```\n\nThe helper validates:\n- EVM checksum (EIP-55) and format\n- TRON Base58Check format and T-prefix\n- Network / chain compatibility\n- Currency match against the provided asset list\n\n## Running the Examples\n\nClone the repository, install dependencies, and create a `.env` file:\n\n```sh\ngit clone https://github.com/b2binpay/defi-sdk-nodejs.git\ncd defi-sdk-nodejs\nnpm install\ncp .env.example .env\n# Edit .env with your API_BASE_URL, API_KEY, CHAIN_ID, RPC_URL, WALLET_PRIVATE_KEY\n```\n\nAvailable scripts:\n\n| Script                                    | Description                                                         |\n| ----------------------------------------- | ------------------------------------------------------------------- |\n| `npm run example:get-account-info`        | List deployments and per-chain balances                             |\n| `npm run example:create-invoice`          | Create an invoice with currency lookup                              |\n| `npm run example:get-invoice-details`     | Filter invoices, inspect deposits, show claimable assets            |\n| `npm run example:create-payout`           | Create a payout and surface the queued operation                    |\n| `npm run example:queue-sign`              | Build EIP-712 typed data, sign, and submit the signature            |\n| `npm run example:queue-execute`           | Build and broadcast an execute transaction                          |\n| `npm run example:queue-execute-batch`     | Execute the backend-reported batch candidates in a single transaction |\n| `npm run example:claim-deposits`          | Build and broadcast a claim transaction                             |\n| `npm run example:evm-full-flow`           | End-to-end EVM flow: invoice → payout → sign → execute → claim     |\n| `npm run example:tron-get-account-info`   | TRON account info and balances                                      |\n| `npm run example:tron-create-invoice`     | Create a TRON invoice with currency lookup                          |\n| `npm run example:tron-create-payout`      | Create a TRON payout and surface the queued operation               |\n| `npm run example:tron-claim-deposits`     | Build and broadcast a TRON claim transaction                        |\n| `npm run example:tron-queue-sign`         | Build TIP-712 typed data, sign, and submit the signature            |\n| `npm run example:tron-queue-execute`      | Build and broadcast a TRON execute transaction                      |\n| `npm run example:tron-queue-execute-batch`| Execute the backend-reported TRON batch candidates in one transaction |\n| `npm run example:tron-full-flow`          | End-to-end TRON flow                                                |\n| `npm run example:tron-staking-flow`       | Read staking summary, create a TRON stake, sign and execute it on-chain |\n| `npm run example:get-operations-v2`       | List v2 operations and fetch typed operation details                |\n| `npm run example:get-blockchain-transactions` | List blockchain transactions and fetch one by id                |\n\n## Documentation\n\n| Document                                   | Contents                                                          |\n| ------------------------------------------ | ----------------------------------------------------------------- |\n| [`docs/overview.md`](docs/overview.md)     | Architecture overview and high-level workflow                     |\n| [`docs/api-client.md`](docs/api-client.md) | `DefiClient` configuration, all methods, error handling           |\n| [`docs/transactions.md`](docs/transactions.md) | Transaction helpers, EIP-712/TIP-712, signature packing       |\n| [`docs/contributing.md`](docs/contributing.md) | Repository setup, coding guidelines, release process          |\n\n## Contributing\n\nSee [`docs/contributing.md`](docs/contributing.md) for repository conventions, build setup, and how to run the examples locally.\n\nBug reports and pull requests are welcome at [github.com/b2binpay/defi-sdk-nodejs](https://github.com/b2binpay/defi-sdk-nodejs/issues).\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","readmeFilename":"README.md"}