{"_id":"@caishen/sdk","_rev":"10-2dfbe489c3ce1dd966b9cae25cd892f0","name":"@caishen/sdk","dist-tags":{"latest":"1.0.9"},"versions":{"1.0.0":{"name":"@caishen/sdk","version":"1.0.0","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.0","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"1922d466d562e0e2c20eae4001ad190194dc87df","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.0.tgz","fileCount":33,"integrity":"sha512-u6t8qmtWetCGvbAAshPhNi/Gfib8iBRQyMRN1J4kb+aZkRXtapwVMS3puyAoeUR2HNEHRTDRDmG9Mri89+KIYw==","signatures":[{"sig":"MEQCIHVcbweQf8s0PZ2EZ1ZnDCnSpth/Uva6mzz6ERNUyUmrAiBrbTrVwvVZOa5+WqpWyRKb8ieuZlFxUHBP6pCVMafp1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58887},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"340011e81ddc9099c0d3cd4e53243836e4479eee","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1744771663505_0.31930529730810364","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@caishen/sdk","version":"1.0.1","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.1","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"ab770bfcd9441f16860d303e50dde0bb1a36cfcd","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.1.tgz","fileCount":8,"integrity":"sha512-iazH2Pzu3H2zgP/f+7TyVLdfghHwvY3LQUhr/+L5CH3YFdmCsC0zqmHiGhuyqEe5YRaUqR+C9y7V1RdXChwSHg==","signatures":[{"sig":"MEUCIA+Ifq6/L6SdVRmC6theKHLmBAI5oYhz6kKv9RrBBXj7AiEA7IaSVVnGu6cl87Ia9rPJlQDjKPz2fLNMer8k7CRLHKs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143095},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"8ea5a525cf819baec41fabdf1816965b11fc16ba","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.1_1744826272951_0.8660073749472046","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@caishen/sdk","version":"1.0.2","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.2","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"4198c9a9a2d5e4e325ce2486823797e8b51f5ad6","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.2.tgz","fileCount":8,"integrity":"sha512-F7dFFEQyP59ZOrywc1716pKaBw76CDEfI9gwxaFoTLSkw7EAraAMV+e03V+9oD4KSiqghpavkTZvE96GJO7ZtA==","signatures":[{"sig":"MEYCIQCNrLmh47SOzioqdv3usziD5glq9WCAZxZ88tJByaZ5bAIhAPzLD8g94MeXauRSkrpnXrcvtcXVqRMGXMKJZvqhiD6M","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143111},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"e9dacbf36211854635c3a867386963e444110ffc","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.2_1744826505810_0.9916971935515684","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@caishen/sdk","version":"1.0.3","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.3","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"fe89a5e3613087a6067b6b54a0d12bc3268f6fec","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.3.tgz","fileCount":8,"integrity":"sha512-9mOUz8TAy4ZmcSjSdHfkmUUvbLa0+aJgYneHogNM5sf9Cp5x85COSbsjtfmmlUI3JSkyMQCwo5GY2+517r+voQ==","signatures":[{"sig":"MEUCIQCZod7+8mpny9/bM00tF80gLX07yU2U9ho5bN4ZCM6VpQIgbTUs6k5I7pcvQricZ9PlKE84MPjVVPNPZ3kjUHXKqe4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143115},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"ef0378e03e31adf5d51971549d4a347f03759562","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.3_1744826656860_0.9151244394415454","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@caishen/sdk","version":"1.0.4","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.4","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"72df6aa55cf94621e10f731488b7bbb2e8fea311","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.4.tgz","fileCount":8,"integrity":"sha512-/Ly2pRiCat5rFu6kH1/SaXbl7Kg1hfLWcC+YUpdKYClHVjx3PtpAq3AFyDXmLfWeCfv+iNskmOa8amjrGWw7VA==","signatures":[{"sig":"MEQCIHt7L4OIKU2czFtX9wyHSyQWmuQ3qxxaTgJOAEwYnsbtAiAdWoE1hm69V/Gn+5LCSh2nRwsnhbNDBgCSBZH4fI4cuw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143280},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"0deb7949bbb4ce4255b3f41acd4263ed355168a7","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.4_1744908736916_0.8248192370253076","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@caishen/sdk","version":"1.0.5","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.5","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"2cce7462d559dfc6923469218f184099c67b5598","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.5.tgz","fileCount":8,"integrity":"sha512-S17ghJKQJmdVP/pZSM+XIQFDskChqJDa6+csm9mmyE3FjzUV+bn/A2+Q7oObGEQyDKhbH3S3pewDzNz84ujNQQ==","signatures":[{"sig":"MEYCIQCPRoAnXapoD2cKw+5S1hXjg3/2OWsEuLQND8+D7OvgqAIhAPLFoTrf8f9QCZtl1UD+bnOzvcR8heKQwIAwj4UbSjBp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":206574},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"eb80d64c24e2b0287668c270eea0a46947f7d8ad","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"ai":"^4.3.9","zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44","reflect-metadata":"^0.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.5_1746528584690_0.587363887066608","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@caishen/sdk","version":"1.0.6","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.6","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"77cd8be45cac63b34d94cfd0132fdbb2b081081a","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.6.tgz","fileCount":8,"integrity":"sha512-Ms0ZCK8oMjfSUH9bPaZUK4tAlQx/I4+BQFf3/1jyh927nnRakaWa1AnjG7iSmyzzGOvtYsNk8jTIEz+ziMxaxw==","signatures":[{"sig":"MEYCIQDAdw7jtClDhs0S96gRLHktwLN4JRW0XC8wR5a8ndubrgIhAMEzasT30yGdJETtXMh9pJ2CoE/tcPJy1bLbytzAZGiu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":252500},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"9d7a036b6006f852bbb196f199ead91273db534b","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"11.3.0","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"22.14.0","dependencies":{"ai":"^4.3.9","zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44","reflect-metadata":"^0.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.6_1747238086536_0.9901661283513279","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@caishen/sdk","version":"1.0.7","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.7","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"a95d36a4f6d063b62326c5ca6db09552b7704c62","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.7.tgz","fileCount":8,"integrity":"sha512-7z5JxPm2QlswlcHgKdj0JSICxGoO/Pg/Cr5hEpxYljm2gE6DgYiDEcdtNubdv/oK95Y0Urzv2Hm4EY8E/EUhaw==","signatures":[{"sig":"MEYCIQCPcBPKXRdn3TzHFVq5IVH+sMR6M6wlOQzdaciQko+KoQIhAPNY9wq/xbwmej3nekeUxR2/RT+WDtIagH4lShSi1cDc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":256155},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"51c8da2d2c1e71704a49164c4dcc8f5bb6c52520","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"ai":"^4.3.9","zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44","reflect-metadata":"^0.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.7_1747885611125_0.3555775920041462","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@caishen/sdk","version":"1.0.8","keywords":["crypto","wallet","sdk","caishen"],"author":{"url":"https://caishen.tech","name":"Caishen","email":"hello@caishen.tech"},"license":"MIT","_id":"@caishen/sdk@1.0.8","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"dist":{"shasum":"5ee888cce4676e6c2c985845733a5924f33649bd","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.8.tgz","fileCount":8,"integrity":"sha512-Tf7xmvVwOPGHLSgqMpUqtisSnq796xHL7040XwWwR4wEqbmzTWWNQCr0CsF0AFCyX2XG161jA0WgZU9O4F0Tyg==","signatures":[{"sig":"MEYCIQCholYp9Obgl8QfrvW1uWXQ6SdqKCiH70laOm1AY41Z/wIhALYwyKvbcWhz6126QARB8rFZC/lp52y4WlJJRITkf+N9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":276378},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"gitHead":"b104c5a81b28ff322f9f854f011c319f730751db","scripts":{"dev":"tsup src/index.ts --watch","test":"mocha --timeout 30000 --import=tsx","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'"},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com"},"repository":{"url":"git+https://github.com/CaishenTech/caishen-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","directories":{},"_nodeVersion":"20.19.0","dependencies":{"ai":"^4.3.9","zod":"3.x","uuid":"^11.1.0","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","@types/axios":"^0.14.4","@langchain/core":"^0.3.44","reflect-metadata":"^0.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","jest":"^29.7.0","tsup":"^8.0.2","mocha":"^10.2.0","terser":"^5.37.0","env-var":"^7.5.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","prettier":"^3.0.0","typescript":"^5.6.2","@types/jest":"^29.5.14","@types/node":"^22.5.5","@types/mocha":"^7.0.2","axios-mock-adapter":"^2.1.0","mocha-junit-reporter":"^2.2.1"},"peerDependencies":{"zod":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.8_1748399815527_0.8461678181713239","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@caishen/sdk","version":"1.0.9","type":"module","description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"import":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup src/index.ts --watch","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","test":"mocha --timeout 30000 --import=tsx","test:all":"mocha --timeout 30000 --import=tsx 'test/**/*.spec.ts'","build":"tsup src/index.ts --format cjs,esm --dts --clean --sourcemap --minify"},"publishConfig":{"access":"public"},"author":{"name":"Caishen","email":"hello@caishen.tech","url":"https://caishen.tech"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/CaishenTech/caishen-sdk.git"},"homepage":"https://github.com/CaishenTech/caishen-sdk#readme","bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"keywords":["crypto","wallet","sdk","caishen"],"peerDependencies":{"zod":"3.x"},"dependencies":{"@langchain/core":"^0.3.44","@types/axios":"^0.14.4","ai":"^4.3.9","axios":"^1.8.1","crypto":"^1.0.1","dotenv":"^16.5.0","langchain":"^0.3.21","reflect-metadata":"^0.2.2","uuid":"^11.1.0","zod":"3.x"},"devDependencies":{"@types/jest":"^29.5.14","@types/mocha":"^7.0.2","@types/node":"^22.5.5","axios-mock-adapter":"^2.1.0","env-var":"^7.5.0","jest":"^29.7.0","mocha":"^10.2.0","mocha-junit-reporter":"^2.2.1","prettier":"^3.0.0","terser":"^5.37.0","ts-jest":"^29.3.1","ts-node":"^10.9.1","tsup":"^8.0.2","tsx":"^4.19.3","typescript":"^5.6.2"},"_id":"@caishen/sdk@1.0.9","gitHead":"f44f8b23e43b6059ba2bfdab459106e123d910ed","_nodeVersion":"22.14.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-eZX1BVzOJa0vKVySAj7VLMSogwKTrAqmp0484ucO1UGMTHplSt7fzJBdJwGQO4PmpKP60frL/YUJ9ZOui4OhQA==","shasum":"b3ca75cf60f3208b457b501dea84ec03a8d875d8","tarball":"https://registry.npmjs.org/@caishen/sdk/-/sdk-1.0.9.tgz","fileCount":8,"unpackedSize":277310,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF0Q7sDFZflXxCWChV9vCwGRbXUvC60cE/MbYglyIwrFAiEAqM+HJSYq/+U8kje6s+3uHgBBQ+/pk97ajFeSjoUkVBs="}]},"_npmUser":{"name":"tskweres","email":"tskweres@gmail.com","actor":{"name":"tskweres","email":"tskweres@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.9_1751381254692_0.1667343974122668"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-16T02:47:43.407Z","modified":"2025-07-01T14:47:35.081Z","1.0.0":"2025-04-16T02:47:43.691Z","1.0.1":"2025-04-16T17:57:53.211Z","1.0.2":"2025-04-16T18:01:46.039Z","1.0.3":"2025-04-16T18:04:17.055Z","1.0.4":"2025-04-17T16:52:17.142Z","1.0.5":"2025-05-06T10:49:44.926Z","1.0.6":"2025-05-14T15:54:46.756Z","1.0.7":"2025-05-22T03:46:51.348Z","1.0.8":"2025-05-28T02:36:55.752Z","1.0.9":"2025-07-01T14:47:34.907Z"},"bugs":{"url":"https://github.com/CaishenTech/caishen-sdk/issues"},"author":{"name":"Caishen","email":"hello@caishen.tech","url":"https://caishen.tech"},"license":"MIT","homepage":"https://github.com/CaishenTech/caishen-sdk#readme","keywords":["crypto","wallet","sdk","caishen"],"repository":{"type":"git","url":"git+https://github.com/CaishenTech/caishen-sdk.git"},"description":"The Caishen SDK gives every agent or user access to unlimited multi-chain crypto wallets","maintainers":[{"name":"tskweres","email":"tskweres@gmail.com"}],"readme":"# Caishen SDK\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm version](https://badge.fury.io/js/caishen-sdk.svg)](https://badge.fury.io/js/caishen-sdk)\n\n> The Caishen SDK provides developers with seamless access to unlimited multi-chain crypto wallets. It offers a unified interface for interacting with various blockchain networks and managing crypto assets.\n\n---\n\n## ✨ Features\n\n- 🔗 Multi-chain wallet support\n- 🌐 Supports major blockchains:\n  - Ethereum (via `ethers.js`)\n  - Bitcoin (via `bitcoinjs-lib`)\n  - Solana (via `@solana/web3.js`)\n  - Cardano (via `@emurgo/cardano-serialization-lib`)\n  - Sui, NEAR, Ripple, Tron, TON, Aptos\n- 🔒 Secure wallet management\n- ⚙️ Type-safe TypeScript APIs\n- 💸 Token operations: Send, Balance, Swap, Deposit, Withdraw\n- Cash operations: Send, Deposit, Withdraw\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install @caishen/sdk\n# or\nyarn add @caishen/sdk\n# or\npnpm add @caishen/sdk\n```\n\n> ⚠️ Requires Node.js ≥ 14.x and TypeScript ≥ 4.x\n\n---\n\n## 🔗 Links\n\n- 🌐 [Website](https://caishen.tech)\n- 🛠️ [Developer Dashboard](https://dashboard.caishen.tech)\n- 📚 [Docs](https://docs.caishen.tech)\n\n---\n\n## 🚀 Quick Start\n\n```ts\nimport { CaishenSDK, createAgentTools } from \"@caishen/sdk\";\n\nconst sdk = new CaishenSDK({ projectKey: \"your-project-key\" });\nconst tools = createAgentTools(sdk);\n```\n\n---\n\n## 🔑 Authentication\n\nYou can authenticate as either a **user** or an **agent**.\n\n### Connect as User\n\n```ts\nawait sdk.connectAsUser({\n  token: 'USER TOKEN',\n  provider: 'USER PROVIDER',\n});\n```\n\n#### ✅ Supported Providers\n\n- `google`, `facebook`, `twitter`, `discord`, `github`, `linkedin`\n- `reddit`, `line`, `kakao`, `weibo`, `farcaster`, `custom`\n\n---\n\n### 🔐 Custom Authentication\n\nIf you want to authenticate users **from your own backend**, you can use the `custom` provider.\n\nIn this case:\n\n- You must **encrypt a JWT** on your backend using your `projectSecret` (found in your Caishen developer dashboard).\n- That encrypted token must contain an object like `{ id: string }`, where `id` is the user identifier in your system.\n- You then pass this encrypted token into `connectAsUser`.\n\n#### 💡 Example\n**Backend-side (Node.js):**\n\n```ts\nimport jwt from 'jsonwebtoken';\n\nconst payload = { id: 'user-123' };\nconst token = jwt.sign(payload, projectSecret);\n```\n\n**Frontend-side:**\n\n```ts\nawait sdk.connectAsUser({\n  provider: 'custom',\n  token: 'ENCRYPTED_JWT_TOKEN',\n});\n```\n\nOn the Caishen backend, this token is decrypted with your `projectSecret` using:\n\n```ts\njwt.verify(token, projectSecret); // -> { id: string }\n```\n\n> ⚠️ Never share your `projectSecret` publicly. Only your server should have access to it.\n\n---\n\n\n### Issue authorization token\n\nSimple way to issue an authorization token for the Caishen API without storing it in the CaishenSDK instance.\n\nAs because you cannot call `connectAsUser` or `connectAsAgent` twice, this method provides you an ability to get authorization token (of a user or agent) based on your credentials.\n\nUseful primarily for authorizing multiple users independently on your back-end side and managing it without.\n\n\n##### Example:\n```ts\nconst authToken = await sdk.issueAuthToken({\n  connectAs: 'user',\n  provider: 'custom',\n  token: 'ENCRYPTED_JWT_TOKEN',\n});\n\nconst balance = await sdk.crypto.getBalance({\n  wallet: {\n    account: 1,\n    chainId: 1,\n    chainType: 'ETHEREUM',\n  },\n  authToken,\n});\n\nconsole.log(`Balance ETH: ${balance}`)\n```\n\nHere is a basic real-world example of how you can use it:\n```ts\n// Create a global SDK instance with project key provided\nconst caishenSDK = new CaisenSDK({ projectKey });\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n  constructor(private jwtService: JwtService) {}\n\n  async canActivate(context: ExecutionContext): Promise<boolean> {\n    const request = context.switchToHttp().getRequest();\n    const token = this.extractTokenFromHeader(request);\n\n    if (!token) {\n      throw new UnauthorizedException('Missing JWT token');\n    }\n\n    try {\n      // Verify main JWT token\n      const payload = await this.jwtService.verifyAsync(token, {\n        secret: jwtConstants.secret,\n      });\n\n      // Extract and verify the encrypted Caishen auth token from payload\n      const encryptedCaishenToken = payload.caishenAuthTokenEncrypted;\n\n      let decryptedCaishenToken = await this.jwtService.verifyAsync(\n        encryptedCaishenToken,\n        {\n          secret: jwtConstants.caishenSecret,\n        },\n      );\n\n      // Optional: validate token expiration or structure\n      \n      if (!decryptedCaishenToken) {\n        // Fallback: generate a new token via SDK if decryption fails\n        decryptedCaishenToken = await caishenSDK.issueAuthToken({\n          provider: 'custom',\n          token: payload.userId, // Replace with actual user ID if available\n          connectAs: 'user',\n        });\n      }\n\n      // Attach the decrypted token to the request for later use\n      request.caishenAuthTokenDecrypted = decryptedCaishenToken;\n\n      return true;\n    } catch (error) {\n      console.error('AuthGuard error:', error);\n      throw new UnauthorizedException('Invalid token or authorization failed');\n    }\n  }\n\n  // Extracts JWT token from Authorization header\n  private extractTokenFromHeader(request: Request): string | undefined {\n    const [type, token] = request.headers.authorization?.split(' ') ?? [];\n    return type === 'Bearer' ? token : undefined;\n  }\n}\n\n@Controller('my-api')\nexport class MyApiController {\n  constructor(private readonly caishenSDK: CaisenSDK) {}\n\n  @UseGuards(AuthGuard)\n  @Get('balance')\n  async getMyBalance(@Request() req) {\n    const caishenUserAuthToken = req.caishenAuthTokenDecrypted;\n    const balance = await this.caishenSDK.crypto.getBalance({\n      wallet: { account: 1, chainType: ChainType.SUI },\n      authToken: caishenUserAuthToken,\n    });\n\n    return balance;\n  }\n}\n```\n\n### Connect as Agent\n\n```ts\nawait sdk.connectAsAgent({\n  agentId: 'AGENT ID',\n  userId: 'USER ID', // NOTE: userId cannot be provided without an agentId\n});\n```\n\n> Different values for `agentId` and `userId` will generate different wallet scopes.\n\n---\n\n## 👛 Wallets\n\n### 🔍 Get Wallet Info\n\n> ⚠️ The `privateKey` is only returned if `allowPrivateKeyAccess` is enabled in your developer dashboard.  \n> You do **not** need to send the private key back to the server. All you need is `{ account, chainType }`.\n\n#### 📥 Parameters\n\n| Name        | Type     | Required | Description |\n|-------------|----------|----------|-------------|\n| `chainType` | string   | ✅        | Blockchain type (`ETHEREUM`, `SOLANA`, etc.) |\n| `account`   | number   | ✅        | Account index or identifier |\n\n\n#### ✅ Supported chainTypes\n\n- `BITCOIN`, `LITECOIN`, `DASHCOIN`, `DOGECOIN`\n- `ETHEREUM` (and other EVM-based, such as, `Arbitrum`, `Polygon`, `Optimism`, etc.)\n- `SUI`, `SOLANA`,  `APTOS`, `TON`, `TRON`, `NEAR`, `XRP`, `CARDANO`, `COSMOS`\n\n---\n\n#### 📘 Example\n```ts\nconst wallet = await sdk.crypto.getWallet({\n  chainType: 'ETHEREUM',\n  account: 1,\n});\n```\n\n#### 📚 Type: `IWalletAccount`\n```ts\ninterface IWalletAccount {\n  address: string;\n  chainType: string;\n  account: number;\n  publicKey: string;\n  privateKey?: string; // Only returned if access is enabled in the dashboard\n}\n```\n\n### MinimalWalletInput\n\n```ts\ninterface MinimalWalletInput {\n  account: number;\n  chainType: string;\n  address: string;\n}\n```\n\nUsed for all `cash` and `swap` functions to avoid sending sensitive data.\n\n---\n\n## 💸 Token Operations\n\n> 🚫 Use `MinimalWalletInput` when possible to reduce sensitive data exposure.\n\n### ➕ Send Token\n```ts\nconst txHash = await sdk.crypto.send({\n  wallet: {\n    account: 1,\n    chainType: \"ETHEREUM\",\n    /**\n     * If not provided, our Caishen's rpc will be used. \n     * NOTE: currently custom RPC feature is not supported for Bitcoin based blockchains \n     * (such as Bitcoin, Litecoin, Dogecoin, Dashcoin)\n     * \n     * Specify ws rpc for Cardano & Ripple,  \n     */\n    rpc: 'your_rpc_url'\n  },\n  payload: {\n    token: '0xTokenAddress...', // omit for native\n    amount: '1000000000000000000', // amount in base units\n    toAddress: '0xRecipient...',\n  },\n});\n```\n\n### 📊 Get Balance\n```ts\nconst native = await sdk.crypto.getBalance({ wallet, payload: {} });\nconst dai = await sdk.crypto.getBalance({\n  wallet,\n  payload: { token: '0x6B1754...' },\n});\n```\n\n### ✍️ Sign and Send transaction\n\n```ts\nimport { serializeTransaction, parseGwei, parseEther } from 'viem'\n\nconst serializedTransaction = serializeTransaction({\n  chainId: 1,\n  gas: 21001n,\n  maxFeePerGas: parseGwei('20'),\n  maxPriorityFeePerGas: parseGwei('2'),\n  nonce: 69,\n  to: \"0x1234512345123451234512345123451234512345\",\n  value: parseEther('0.01'),\n})\n\nconst transactionHash = await sdk.crypto.signAndSend({\n  wallet,\n  payload: {\n    serializedTransaction,\n  }\n});\n```\n\n> NOTE: You can provide your custom URL API endpoint to fetch UTXOs for BTC-based chains like BTC, LTC, etc.\n> Pass `utxoUrl` parameter as an option. The endpoint MUST return an array structure like\n> ```\n> Array<{\n>  vout: number;\n>  value: number; // satoshi\n>  txId: string;\n> }>\n> ```\n\n### ✍️ Sign transaction\n\n```ts\nimport { serializeTransaction, parseGwei, parseEther } from 'viem'\n\nconst serializedTransaction = serializeTransaction({\n  chainId: 1,\n  gas: 21001n,\n  maxFeePerGas: parseGwei('20'),\n  maxPriorityFeePerGas: parseGwei('2'),\n  nonce: 69,\n  to: \"0x1234512345123451234512345123451234512345\",\n  value: parseEther('0.01'),\n})\n\nconst transactionHash = await sdk.crypto.sign({ \n  wallet, \n  payload: {\n    transactionData: serializedTransaction,\n  }\n});\n```\n\n---\n\n## 🔁 Token Swap\n\n> 🚫 Do not send the full wallet object. Use only `{ account, chainType }`.\n\n### 🔍 Get Swap Route\n```ts\nconst route = await sdk.crypto.getSwapRoute({\n  wallet: { account: 0 },\n  payload: {\n    amount: '1000000000000000000',\n    from: { tokenAddress: '0x...', chainType: 'ETHEREUM' },\n    to: { tokenAddress: '0x...', chainType: 'ETHEREUM' },\n  },\n});\n```\n\n### 🔄 Execute Swap\n```ts\nconst result = await sdk.crypto.swap({\n  wallet: { account: 0, chainType: 'ETHEREUM' },\n  payload: { confirmationCode: 'abc123' },\n});\n```\n\n---\n\n## 🏦 Cash Accounts\n\n> **Cash** is a chain-abstracted, gasless stablecoin system designed to make stablecoin transfers seamless, fast, and free.\n\n### 🔍 What is Cash?\n\n**Cash** is an internal ERC-20-compatible asset that abstracts away the complexity of stablecoins across chains. It enables instant, gasless transfers between wallets without needing users to worry about:\n\n- Native gas tokens (e.g., ETH, MATIC)\n- Stablecoin formats (e.g., USDC vs USDT)\n- Blockchain networks (e.g., Arbitrum, Base, Solana)\n\n### 🧪 How It Works\n\n- **Deposit**: Users deposit supported stablecoins (e.g., USDC, USDT) from chains like Arbitrum, Base, or Solana.\n- **Issue**: The system issues equivalent **Cash** tokens 1:1, held in an abstracted balance.\n- **Send**: These Cash tokens can be sent to any wallet address instantly with zero gas cost.\n- **Withdraw**: When users withdraw, their Cash tokens are burned and they receive the original stablecoin on the selected chain.\n\n> ⚠️ Different combinations of `agentId` and `userId` result in separate Cash balances.\n\n### ✅ Benefits\n\n- 💸 Gasless transfers (no ETH/SOL required)\n- ⚡ Cross-chain abstraction\n- 🔄 Simple send/receive interface\n- 🔐 Fully backed, 1:1 redeemable\n\n---\n\n### 💱 Supported Stablecoins\n\n| Chain     | Token | Symbol | Address |\n|-----------|--------|--------|---------|\n| Arbitrum  | USDC  | USDC   | `0xaf88...5831` |\n| Arbitrum  | USDT  | USDT   | `0xFd08...cbb9` |\n| Base      | USDC  | USDC   | `0x8335...2913` |\n| Solana    | USDC  | USDC   | `EPjFWd...TDt1v` |\n\n> See `CASH_SUPPORTED_TOKENS` for full details.\n\n### 💰 Get Account Balance\nGet current balance of all tokens for a specific account.\n\n#### Parameters\n\n| Name     | Type   | Description              |\n|----------|--------|--------------------------|\n| account  | number | The account identifier   |\n\n#### Returns\n\n```ts\nPromise<BalanceResponse>\n```\n\n#### 📘 Example\n\n```ts\nconst balance = await sdk.cash.getBalance({ account: 1 });\n```\n\n### 💵 Deposit\nDeposit a supported token into the account.\n\n#### Parameters\n\n| Name     | Type                | Description            |\n|----------|---------------------|------------------------|\n| params   | `DepositCashParams` | Token and amount info  |\n\n#### Returns\n\n```ts\nPromise<TransactionResponse>\n```\n\n#### 📘 Example\n\n```ts\nawait sdk.cash.deposit({\n  account: 1,\n  tokenAddress: '0x...',\n  amount: '1000000000000000000',\n});\n```\n\n### 💸 Withdraw\nWithdraw a supported token from the account.\n\n#### Parameters\n\n| Name     | Type                 | Description           |\n|----------|----------------------|-----------------------|\n| params   | `WithdrawCashParams` | Token and amount info |\n\n#### Returns\n\n```ts\nPromise<TransactionResponse>\n```\n\n#### 📘 Example\n\n```ts\nawait sdk.cash.withdraw({\n  account: 1,\n  tokenAddress: '0x...',\n  amount: '1000000000000000000',\n});\n```\n\n### 🔁 Send\n\nSend supported tokens between accounts.\n\n#### Parameters\n\n| Name     | Type                   | Description           |\n|----------|------------------------|-----------------------|\n| params   | `SendTransactionParams`| Token, to/from, etc.  |\n\n#### Returns\n\n```ts\nPromise<TransactionResponse>\n```\n\n#### 📘 Example\n\n```ts\nawait sdk.cash.send({\n  fromAccount: 1,\n  toAccount: 2,\n  tokenAddress: '0x...',\n  amount: '1000000000000000000',\n});\n```\n\n### 🪙 Get Supported Tokens\n\n```ts\nconst tokens = await sdk.cash.getSupportedTokens();\n```\n\n---\n\n## 🛠 Types\n\n```ts\ntype TokenWithPrice = Token & {\n  priceUSD: string;\n};\n```\n\n---\n\n# Vercel AI, Langchain, and ElevenLabs Integration\n\nThis project demonstrates the integration of three powerful AI tools: Vercel AI, Langchain, and ElevenLabs, to create intelligent and engaging applications. It showcases how these technologies can be combined to process natural language, orchestrate complex tasks, and generate realistic audio output.\n\n## Overview\n\nThis project provides examples of how to:\n\n- **Utilize Vercel AI:** Leverage Vercel AI's `generateText` function with custom tools to interact with external APIs or perform specific actions based on user input.\n- **Employ Langchain:** Use Langchain's agent capabilities and its integration with large language models (LLMs) to create sophisticated workflows involving multiple steps and tool usage.\n- **Integrate ElevenLabs:** Synthesize realistic speech from text using ElevenLabs' API, allowing for voice-based interactions and richer user experiences.\n\nThe code snippets provided in this README illustrate fetching data using tools defined for each service and then logging the results.\n\n## Prerequisites\n\nBefore running this project, ensure you have the following:\n\n- **Node.js and npm (or yarn) installed:** This project is likely built using JavaScript/TypeScript.\n- **ElevenLabs API Key:** You'll need an API key from your ElevenLabs account to use their text-to-speech service. Set this as an environment variable (e.g., `ELEVENLABS_API_KEY`).\n- **Vercel AI SDK Installed:** Ensure you have the `@vercel/ai` package installed in your project.\n- **Langchain Installed:** Ensure you have the `langchain` and `@langchain/openai` packages installed.\n- **Zod Installed:** You're using `zod` for schema validation (`z`).\n- **`node-fetch` Installed:** If you're making direct API calls, you'll need `node-fetch`.\n\n## Setup\n\n1.  **Clone the repository (if applicable):**\n    ```bash\n    git clone <your-repository-url>\n    cd <your-project-directory>\n    ```\n\n2.  **Install dependencies:**\n    ```bash\n    npm install\n    # or\n    yarn install\n    ```\n\n3.  **Set up environment variables:**\n    Create a `.env` file (or configure your environment variables through your hosting provider) and add your ElevenLabs API key:\n    ```\n    ELEVENLABS_API_KEY=your_elevenlabs_api_key\n    ```\n\n## Usage\n\nThe provided code snippet demonstrates how to use each of the integrated services:\n\n### ElevenLabs Integration\n\n```javascript\n// /// ================ elevenLabsData =============\nconst elevenLabsData = await createElevenLabsTools({sdk})\nconst tools = castToToolRecord(elevenLabsData);\nconst elevenLabs_input_text = \"Hello, please give me the balance of account 15!\";\nconst elevenLabsData_result = await generateText({\n  model: openai(\"gpt-4o-mini\"),\n  tools: tools,\n  maxSteps: 10,\n  prompt: elevenLabs_input_text,\n});\nconsole.log(\"elevenLabs data result text: \", elevenLabsData_result.text);\n```\n\n// /// ================ vercelAIData =============\n```javascript\nconst vercelAIData_text = \"Hello, please give me the balance of account 15!\";\nconst vercelAIData = await createVercelAITools({sdk})\nconst vercelAIData_result = await generateText({\n  model: openai(\"gpt-4o-mini\"),\n  tools: castToToolRecord(vercelAIData),\n  maxSteps: 10, // Maximum number of tool invocations per request\n  prompt: vercelAIData_text,\n});\nconsole.log(\"vercelAIData Result text: \", vercelAIData_result.text);\n## 🧱 Build from Source\n```\n\n// /// ================ langchainData =============\n```javascript\nconst langhchain_tools = createAgentTools(sdk)\nconst langchainData_text = \"Fetch my cash balance account 12345\";\nconst llm = new ChatOpenAI({\n  temperature: 0,\n  modelName: \"gpt-4o-mini\", // or \"gpt-3.5-turbo\", whatever you're using\n});\nconst executor = await initializeAgentExecutorWithOptions(\n  langhchain_tools,\n  llm, // your model (OpenAI, Anthropic, etc)\n  {\n    agentType: \"openai-functions\",//\"zero-shot-react-description\",\n    verbose: true,\n  }\n);\n// now you can run\nconst res = await executor.call({ input: langchainData_text });\nconsole.log(\"langchain result output: \", res.output);\n```\n\n```bash\nnpm install\nnpm run dev\nnpm run build\n```\n\n---\n\n## 🤝 Contributing\n\nContributions welcome! Open an issue or PR.\n\n---\n\n## 📜 License\n\nMIT © [CaishenTech](https://github.com/CaishenTech)\n\n---\n\n## 💬 Support\n\nOpen an issue on GitHub or contact the maintainers.\n\n---\n\nMade with ❤️ by **Caishen**\n","readmeFilename":"README.md"}