{"_id":"@sweefi/sui","_rev":"11-fbf27d4e4912b46b76006260028b5a5b","name":"@sweefi/sui","dist-tags":{"latest":"0.4.2"},"versions":{"0.2.0":{"name":"@sweefi/sui","version":"0.2.0","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.0","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"8fe1c3299a4471a7d4fbf47d15bce7df118bb8b7","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.0.tgz","fileCount":27,"integrity":"sha512-PR1goxTDN7TGk/41BEmAuN+YVgHxsZBScx5VWSsKaJSzIL/pm+qH9u4sE/vr3nVbaQYnVdH2gxkH29rLqNd52g==","signatures":[{"sig":"MEUCIH5WZ5Roc1jEnNuWLbUVShkt1of2X7BA+lu0UmhVP6p/AiEApcYy+DXEWPJKHr7iTY/bk/jRY/7+2hvuS1VyDiy5nJw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":840141},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"gitHead":"c1a870122443ee3fec34a8d8113abc527c467377","scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run","prepublishOnly":"pnpm run build && pnpm run typecheck && pnpm run test"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/ui-core":"workspace:^"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"workspace:^","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0","@sweefi/server":">=0.1.0"},"peerDependenciesMeta":{"@sweefi/server":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.0_1773019913377_0.69655476836409","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.2.1":{"name":"@sweefi/sui","version":"0.2.1","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.1","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"d0b334488d8d785db3d2cd5499d8d8697715661c","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.1.tgz","fileCount":27,"integrity":"sha512-z5kCQ8YGVYTCnZleJ4CSEiwFlyb3t75qsOCvfhI6hOaIyeFTB+vQ21wPZGBj2OB9KIRm6IpEWpGPxlZYLR303Q==","signatures":[{"sig":"MEUCIB8Mg6vcKPcnTwEvv3eXzAeKIysaiIVD/ucPD8DAs3V2AiEA0dE0zzATVPDVfMFPWctb0HoOuDGCE9XeX6LcRfE1WOw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":840177},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.2.1.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/06bbd1bbaa494a4948624a28f6a7335d/sweefi-sui-0.2.1.tgz","_integrity":"sha512-z5kCQ8YGVYTCnZleJ4CSEiwFlyb3t75qsOCvfhI6hOaIyeFTB+vQ21wPZGBj2OB9KIRm6IpEWpGPxlZYLR303Q==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/ui-core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"^0.1.0","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0","@sweefi/server":">=0.1.0"},"peerDependenciesMeta":{"@sweefi/server":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.1_1773023268531_0.5837529469406391","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.2.2":{"name":"@sweefi/sui","version":"0.2.2","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.2","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"f67488e2fdb6aa9e2c30d1f04f5f655fe1d5bc53","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.2.tgz","fileCount":27,"integrity":"sha512-9f1WcXmJYtyiqynjDCnpX8G44qJ70W7rvLmE2zLDJFJVhensCe2ysVsQoSjrN6xiz0PMlynhnGyXcCjjsS5Swg==","signatures":[{"sig":"MEYCIQDUKoo7KR5MEuq4ez/OucT9LsA9HLazut22G8mrzp5QTgIhAMVlDuo+dBQigdI1yHLUzq1wBmiNLec49MZr8GaqLABG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":840185},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"gitHead":"bb537922c1a48fc1896ddc04a0c034ff94cbb855","scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run","prepublishOnly":"pnpm run build && pnpm run typecheck && pnpm run test"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/server":"workspace:^","@sweefi/ui-core":"workspace:^"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"workspace:^","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.2_1773027405862_0.697970705203731","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.2.3":{"name":"@sweefi/sui","version":"0.2.3","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.3","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"20cb39d3fdd898e722cdc5b78d4e03af20834f8c","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.3.tgz","fileCount":27,"integrity":"sha512-jcQrj1Buo78JSi9dqqOtPOgTKQV/dKCezEK77RSiC28XFgdsQTZeLWjZBSF+RX9kTuuidS4X/C40gRz+ajLC1w==","signatures":[{"sig":"MEYCIQD1Ib45Jd0ZuNZifz53GTiPN20uYvsm2+NsK5XqndJxJwIhAI6NikFql1LPFzCeFefTRry0R25JeEDPB7Ie80lou/An","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":840090},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.2.3.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/49e45f72cb50750640bb706aec6fe7a4/sweefi-sui-0.2.3.tgz","_integrity":"sha512-jcQrj1Buo78JSi9dqqOtPOgTKQV/dKCezEK77RSiC28XFgdsQTZeLWjZBSF+RX9kTuuidS4X/C40gRz+ajLC1w==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/server":"^0.1.0","@sweefi/ui-core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"^0.1.0","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.3_1773027519867_0.25256120782511715","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.2.4":{"name":"@sweefi/sui","version":"0.2.4","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.4","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"df8d0e8a5d19a7132139f3697ccb829906ac2620","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.4.tgz","fileCount":27,"integrity":"sha512-Q4IVfLlnOku2DYiWMoQfSOW3VG0fnyoiG+2hH1tVCVpIinNdaxbAxpySzhyEs1bAstAWBGtPI9FI4dLDNc4G8A==","signatures":[{"sig":"MEUCIQDaSMjs6iOcsn13XsONGuTrnLWKLhQey5phahjq/xEIGQIgezAxoCsWzfbg91LIX9+FBdp1TKk7rFVKg3D51S7p824=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":846616},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.2.4.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/f2a22ea8c906a04024b96ec5f7a6a572/sweefi-sui-0.2.4.tgz","_integrity":"sha512-Q4IVfLlnOku2DYiWMoQfSOW3VG0fnyoiG+2hH1tVCVpIinNdaxbAxpySzhyEs1bAstAWBGtPI9FI4dLDNc4G8A==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/server":"^0.1.0","@sweefi/ui-core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"^0.1.0","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.4_1773115728333_0.8597578036106646","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.2.5":{"name":"@sweefi/sui","version":"0.2.5","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.2.5","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"12c19b99c13350f5b002622400cc955c3d1861dc","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.2.5.tgz","fileCount":27,"integrity":"sha512-8TVqx0vKpxhuSazBdmyyIIX72ODxubRuSUgdRnkn8dLx3rqrm+hTRHUMNi44BbqGTgF92zPMt4eugeYE+7/w1A==","signatures":[{"sig":"MEUCIQCSUR5QmeEebOHlbr6DTLU49zBUF6DzAKOyuz02TlF6BAIgA9oYl6T8iWnIT2r5FN3j0+D7AkzAW/BBTlq/OQV3cII=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":849433},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.2.5.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/eeb3cf9ce550b6dca936eb85204011fd/sweefi-sui-0.2.5.tgz","_integrity":"sha512-8TVqx0vKpxhuSazBdmyyIIX72ODxubRuSUgdRnkn8dLx3rqrm+hTRHUMNi44BbqGTgF92zPMt4eugeYE+7/w1A==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/server":"^0.1.0","@sweefi/ui-core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"^0.1.0","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.2.5_1773196268340_0.6240430836092135","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.3.0":{"name":"@sweefi/sui","version":"0.3.0","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.3.0","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"f27b9f45722f8619a712d0d1088fcf743daa3020","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.3.0.tgz","fileCount":27,"integrity":"sha512-hhgMUPsEtG0M77dKrsswO9lFLiEGFB2PhD3ApPouZezeMpqqsE/IHeZ3fF7TVWwYrSG40rj/lrjWRmOs4hJnsQ==","signatures":[{"sig":"MEUCIQD98m5UZzgVR6ZgdbaI7j2ZQq5fTdiv9mIJ4cj2iHr95wIgXziNyzW2f8/YXmkeFUT431NOOThtoZ3zSG1moLsaNrI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1148360},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.3.0.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/5e40f35d66036bd14072409ee826dd1e/sweefi-sui-0.3.0.tgz","_integrity":"sha512-hhgMUPsEtG0M77dKrsswO9lFLiEGFB2PhD3ApPouZezeMpqqsE/IHeZ3fF7TVWwYrSG40rj/lrjWRmOs4hJnsQ==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.2.0","@sweefi/server":"^0.1.0","@sweefi/ui-core":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/server":"^0.1.0","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.3.0_1773375774040_0.4617695143726106","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.4.0":{"name":"@sweefi/sui","version":"0.4.0","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.4.0","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"dfac183419d0ae284bdcf13ecedbd28c530ab47e","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.4.0.tgz","fileCount":27,"integrity":"sha512-Fs0mOsEgVdPsvSMPLiGYtKHCpK7XqugFko/85HySrBL7O6SgYbwbMSNriY7ZNAD2oCZmH+xsZQpJIZ/19QzItQ==","signatures":[{"sig":"MEYCIQDtaRBYNlYM6jCVHsxg8ZEPkSaAbowk22vdKGwQN7Zx0gIhANmoFBA33gbXZYHBU7uPMRkX5bh8w2Tm4onchPRQicl3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1272320},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.4.0.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/tmp/e001b92353015aea0fa6baea16a18ee9/sweefi-sui-0.4.0.tgz","_integrity":"sha512-Fs0mOsEgVdPsvSMPLiGYtKHCpK7XqugFko/85HySrBL7O6SgYbwbMSNriY7ZNAD2oCZmH+xsZQpJIZ/19QzItQ==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"10.9.7","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"22.22.2","dependencies":{"s402":"^0.5.0","@sweefi/hono":"^0.2.1","@sweefi/ui-core":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/hono":"^0.2.1","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.4.0_1776137030657_0.6850400038078992","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.4.1":{"name":"@sweefi/sui","version":"0.4.1","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.4.1","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/sweefi/issues"},"dist":{"shasum":"1996c157ef59b9764caf565b4bf581a6ea39fc8c","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.4.1.tgz","fileCount":27,"integrity":"sha512-IGI+V2jgj1qj0Ygn4PNC5MY1k9XtX1GWXEDEhb1DBQ9mjboVxjJ4G0oG6rDridFEk6eV8RM0jXoZVATXu5AqCA==","signatures":[{"sig":"MEUCIQDgd9WD6joSt0pqHOVphEclY7v4ju9tOT2YXV+ECrefyAIgf5JAVUsO4V0sI4cO/fT/HfXUvLqVDrN9KTcgXjbK7ks=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1286386},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.4.1.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/84bb61c4b0ec6800adfe54b97c6a9e3f/sweefi-sui-0.4.1.tgz","_integrity":"sha512-IGI+V2jgj1qj0Ygn4PNC5MY1k9XtX1GWXEDEhb1DBQ9mjboVxjJ4G0oG6rDridFEk6eV8RM0jXoZVATXu5AqCA==","repository":{"url":"git+https://github.com/sweeinc/sweefi.git","type":"git","directory":"packages/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.5.0","@sweefi/hono":"^0.2.1","@sweefi/ui-core":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.20.3","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/hono":"^0.2.1","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.4.1_1776332283138_0.3975147615051329","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"},"0.4.2":{"name":"@sweefi/sui","version":"0.4.2","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"author":{"name":"Danny Devs"},"license":"Apache-2.0","_id":"@sweefi/sui@0.4.2","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"homepage":"https://sweefi.xyz","bugs":{"url":"https://github.com/sweeinc/platform/issues"},"dist":{"shasum":"cf94515e5fe6dd2d44625d41238ba545c7d8f585","tarball":"https://registry.npmjs.org/@sweefi/sui/-/sui-0.4.2.tgz","fileCount":27,"integrity":"sha512-f4aKi5rCwIH85nczqQ+82khAoQI0xR0DwSYeOEdtDOYffmXKnCwpG0wb0T+IouZ0OLwcRjXRVwUpXYIuIpJQbg==","signatures":[{"sig":"MEYCIQCrhJ2rbdqp9dYqnjSO3f9wO+9qNQjebEyZabwtCDxLtAIhAIXRw4q51qlQXw1hcNv1lEvDCdr06JiNrsFXiH2CeINF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1289610},"main":"./dist/index.mjs","type":"module","_from":"file:sweefi-sui-0.4.2.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":"./dist/index.mjs","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./ptb":{"import":{"types":"./dist/ptb/index.d.mts","default":"./dist/ptb/index.mjs"},"default":"./dist/ptb/index.mjs","require":{"types":"./dist/ptb/index.d.cts","default":"./dist/ptb/index.cjs"}}},"scripts":{"demo":"tsx examples/demo.ts","test":"SKIP_DRYRUN=1 vitest run","build":"tsdown","test:live":"SWEEFI_LIVE_TESTNET=1 vitest run test/integration/dryrun.test.ts","typecheck":"tsc --noEmit","test:watch":"vitest","test:offline":"SKIP_DRYRUN=1 vitest run"},"_npmUser":{"name":"dannydevs","email":"et3rnal.d@gmail.com"},"_resolved":"/private/var/folders/7_/qg3gqrj967z6rw6_49p_w08c0000gn/T/03b1ca2687bb468a8a2bfde560778859/sweefi-sui-0.4.2.tgz","_integrity":"sha512-f4aKi5rCwIH85nczqQ+82khAoQI0xR0DwSYeOEdtDOYffmXKnCwpG0wb0T+IouZ0OLwcRjXRVwUpXYIuIpJQbg==","repository":{"url":"git+https://github.com/sweeinc/platform.git","type":"git","directory":"products/sweefi/sui"},"_npmVersion":"11.6.2","description":"Sui-native s402 protocol implementation for SweeFi","directories":{},"_nodeVersion":"24.12.0","dependencies":{"s402":"^0.5.0","@sweefi/hono":"^0.2.2","@sweefi/ui-core":"^0.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vite":"^6.2.6","tsdown":"^0.21.10","vitest":"^3.0.5","typescript":"^5.7.3","@mysten/sui":"^2.6.0","@types/node":"^22.0.0","@sweefi/hono":"^0.2.2","vite-tsconfig-paths":"^5.1.4"},"peerDependencies":{"@mysten/sui":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sui_0.4.2_1777238131607_0.9005187297502757","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Retired 2026-09-25. Use x402: https://x402.org"}},"time":{"created":"2026-03-09T01:31:53.242Z","modified":"2026-09-25T08:27:37.791Z","0.2.0":"2026-03-09T01:31:53.623Z","0.2.1":"2026-03-09T02:27:48.799Z","0.2.2":"2026-03-09T03:36:46.122Z","0.2.3":"2026-03-09T03:38:40.076Z","0.2.4":"2026-03-10T04:08:48.502Z","0.2.5":"2026-03-11T02:31:08.530Z","0.3.0":"2026-03-13T04:22:54.247Z","0.4.0":"2026-04-14T03:23:50.867Z","0.4.1":"2026-04-16T09:38:03.386Z","0.4.2":"2026-04-26T21:15:31.809Z"},"bugs":{"url":"https://github.com/sweeinc/platform/issues"},"author":{"name":"Danny Devs"},"license":"Apache-2.0","homepage":"https://sweefi.xyz","keywords":["sui","s402","http-402","payment","web3","ai-agent","defi","micropayments","agentic-commerce"],"repository":{"url":"git+https://github.com/sweeinc/platform.git","type":"git","directory":"products/sweefi/sui"},"description":"Sui-native s402 protocol implementation for SweeFi","maintainers":[{"name":"dannydevs","email":"et3rnal.d@gmail.com"}],"readme":"# @sweefi/sui\n\nSui-native protocol implementation — PTB builders for payment, stream, escrow, prepaid, and mandate operations.\n\n`@sweefi/sui` is the Sui-specific implementation of the [SweeFi](https://github.com/sweeinc/sweefi) payment protocol. It exposes two surfaces: signer utilities and s402 scheme implementations via the root import, and a complete set of Programmable Transaction Block (PTB) builders for every on-chain contract operation via the `/ptb` subpath.\n\n**Apache 2.0 open source.** Part of the [SweeFi](https://github.com/sweeinc/sweefi) ecosystem.\n\n## Installation\n\n```bash\nnpm install @sweefi/sui\n```\n\n`@mysten/sui` is a peer dependency and must be installed alongside this package:\n\n```bash\nnpm install @sweefi/sui @mysten/sui\n```\n\n## Subpath Exports\n\n| Import path | Contents |\n|-------------|----------|\n| `@sweefi/sui` | Signers (`toClientSuiSigner`, `toFacilitatorSuiSigner`), s402 scheme classes, constants, utilities |\n| `@sweefi/sui/ptb` | All PTB transaction builders, deployment constants, parameter types |\n\n## Quick Start\n\nBuild and sign a payment transaction in two steps:\n\n```typescript\nimport { Ed25519Keypair } from \"@mysten/sui/keypairs/ed25519\";\nimport { SuiJsonRpcClient, getJsonRpcFullnodeUrl } from \"@mysten/sui/jsonRpc\";\nimport { toClientSuiSigner, SUI_COIN_TYPE } from \"@sweefi/sui\";\nimport { buildPayTx, testnetConfig } from \"@sweefi/sui/ptb\";\n\n// 1. Set up the signer\nconst keypair = Ed25519Keypair.fromSecretKey(process.env.PRIVATE_KEY!);\nconst client = new SuiJsonRpcClient({ url: getJsonRpcFullnodeUrl(\"testnet\"), network: \"testnet\" });\nconst signer = toClientSuiSigner(keypair, client);\n\n// 2. Build the transaction\nconst tx = buildPayTx(testnetConfig, {\n  coinType: SUI_COIN_TYPE,\n  sender: signer.address,\n  recipient: \"0xb0b...\",\n  amount: 100_000_000n, // 0.1 SUI in MIST\n  feeMicroPercent: 5_000, // 0.5% facilitator fee (micro-percent: 5_000 / 1_000_000)\n  feeRecipient: \"0xfee...\",\n  memo: \"payment for services\",\n});\n\n// 3. Sign and execute\nconst { signature, bytes } = await signer.signTransaction(tx);\n// Pass bytes + signature to your facilitator for broadcast,\n// or execute directly:\nimport { toFacilitatorSuiSigner } from \"@sweefi/sui\";\n\nconst facilitator = toFacilitatorSuiSigner();\nconst digest = await facilitator.executeTransaction(bytes, signature, \"sui:testnet\");\nawait facilitator.waitForTransaction(digest, \"sui:testnet\");\nconsole.log(\"Confirmed:\", digest);\n```\n\n## PTB Builder Reference\n\nImport from `@sweefi/sui/ptb`. Every builder takes a `SweefiConfig` as the first argument and a params object as the second, and returns a Sui `Transaction` ready to sign.\n\n```typescript\nimport { testnetConfig } from \"@sweefi/sui/ptb\";\n// or supply your own config:\nconst config = { packageId: \"0x...\", protocolStateId: \"0x...\" };\n```\n\n### Payments\n\n| Builder | Description |\n|---------|-------------|\n| `buildPayTx` | Direct payment with fee split; receipt auto-transferred to sender |\n| `buildPayComposableTx` | Payment that returns the `PaymentReceipt` as a `TransactionResult` for use in the same PTB |\n| `buildCreateInvoiceTx` | Create a payment invoice NFT, optionally sending it to a third party |\n| `buildPayInvoiceTx` | Pay and consume an existing invoice (replay-protected) |\n| `buildPayAndProveTx` | Atomic pay + SEAL proof in a single PTB |\n\n### Streaming\n\n| Builder | Description |\n|---------|-------------|\n| `buildCreateStreamTx` | Start a rate-limited micropayment stream |\n| `buildCreateStreamWithTimeoutTx` | Start a stream with a custom recipient-close timeout (minimum 1 day) |\n| `buildClaimTx` | Recipient claims accrued funds from a stream |\n| `buildBatchClaimTx` | Claim from multiple streams in one PTB (60–70% gas saving vs individual claims) |\n| `buildPauseTx` | Payer pauses an active stream |\n| `buildResumeTx` | Payer resumes a paused stream |\n| `buildCloseTx` | Payer closes and settles a stream |\n| `buildRecipientCloseTx` | Recipient force-closes an abandoned stream after timeout |\n| `buildTopUpTx` | Add funds to an existing stream |\n\n### Escrow\n\n| Builder | Description |\n|---------|-------------|\n| `buildCreateEscrowTx` | Time-locked escrow with arbiter |\n| `buildReleaseEscrowTx` | Release funds to seller |\n| `buildReleaseEscrowComposableTx` | Release that returns the escrow result for further PTB composition |\n| `buildRefundEscrowTx` | Refund buyer (after deadline or by arbiter) |\n| `buildDisputeEscrowTx` | Escalate to arbiter |\n\n### Prepaid API Billing\n\n| Builder | Description |\n|---------|-------------|\n| `buildPrepaidDepositTx` | Agent deposits funds into a `PrepaidBalance` for a provider |\n| `buildPrepaidTopUpTx` | Add funds to an existing `PrepaidBalance` |\n| `buildPrepaidClaimTx` | Provider claims earned funds (cumulative call count; Move computes delta) |\n| `buildRequestWithdrawalTx` | Agent initiates two-phase withdrawal |\n| `buildFinalizeWithdrawalTx` | Agent completes withdrawal after the grace period |\n| `buildCancelWithdrawalTx` | Agent cancels a pending withdrawal |\n| `buildPrepaidAgentCloseTx` | Agent closes a fully-consumed balance |\n| `buildPrepaidProviderCloseTx` | Provider closes a balance |\n\n#### v0.2 Signed Receipts (fraud proofs)\n\n| Builder | Description |\n|---------|-------------|\n| `buildDepositWithReceiptsTx` | Deposit with Ed25519 provider pubkey bound — enables dispute flow |\n| `buildPrepaidFinalizeClaimTx` | Finalize a pending claim after the dispute window (permissionless) |\n| `buildDisputeClaimTx` | Dispute a pending claim with a signed receipt as fraud proof (agent only) |\n| `buildWithdrawDisputedTx` | Withdraw all funds from a disputed balance (agent only, immediate) |\n\nReceipt utilities (also from `@sweefi/sui/ptb`):\n\n| Export | Description |\n|--------|-------------|\n| `buildReceiptMessage` | Build the BCS-encoded message that gets signed by the provider |\n| `signReceipt` | Sign a receipt using a pluggable `Ed25519Signer` |\n| `verifyReceipt` | Verify a receipt signature offline (agent-side check before on-chain dispute) |\n\nHTTP-layer receipt helpers (from `@sweefi/sui`):\n\n| Export | Description |\n|--------|-------------|\n| `signUsageReceipt` | Provider-side: sign a receipt and format as HTTP header value |\n| `parseUsageReceipt` | Agent-side: parse header, optionally verify signature |\n| `ReceiptAccumulator` | Agent-side: in-memory store keyed by `balanceId`, tracks highest receipt, detects fraud |\n| `S402_RECEIPT_HEADER` | Header name constant: `X-S402-Receipt` |\n| `PrepaidReceiptConfig` | Server constructor config for v0.2 mode (`providerPubkey` + `disputeWindowMs`) |\n\nTypes: `VerifiedReceipt`, `ParsedReceipt`, `Ed25519Signer`, `Ed25519Verifier`\n\n### Mandates\n\nBasic mandates enforce a simple per-transaction spending cap on a delegated agent:\n\n| Builder | Description |\n|---------|-------------|\n| `buildCreateMandateTx` | Create a basic spending mandate |\n| `buildMandatedPayTx` | Pay using a basic mandate |\n| `buildCreateRegistryTx` | Create a revocation registry |\n| `buildRevokeMandateTx` | Instantly revoke a mandate |\n\n### Agent Mandates\n\nTiered mandates (L0–L3) add per-transaction, daily, weekly, and lifetime caps enforced by Sui validators:\n\n| Builder | Description |\n|---------|-------------|\n| `buildCreateAgentMandateTx` | Create a tiered agent mandate with periodic spending caps |\n| `buildAgentMandatedPayTx` | Pay using an agent mandate (standard path) |\n| `buildAgentMandatedPayCheckedTx` | Pay with on-chain cap enforcement and limit check |\n| `buildUpgradeMandateLevelTx` | Upgrade the trust level (L0 through L3) of a mandate |\n| `buildUpdateMandateCapsTx` | Update per-tx, daily, weekly, or lifetime caps |\n\n### Admin (Emergency Circuit Breaker)\n\n| Builder | Description |\n|---------|-------------|\n| `buildAdminPauseTx` | Pause the entire protocol (requires `AdminCap`) |\n| `buildAdminUnpauseTx` | Resume protocol operations |\n| `buildBurnAdminCapTx` | Permanently burn the `AdminCap` (irreversible) |\n\n## Signer Utilities\n\n### `toClientSuiSigner(keypair, client)`\n\nWraps any Sui keypair into the `ClientSuiSigner` interface. Works with `Ed25519Keypair`, `Secp256k1Keypair`, and any compatible signer.\n\n```typescript\nimport { toClientSuiSigner } from \"@sweefi/sui\";\nimport type { ClientSuiSigner } from \"@sweefi/sui\";\n\nconst signer: ClientSuiSigner = toClientSuiSigner(keypair, suiClient);\n// signer.address          — the sender's Sui address\n// signer.signTransaction  — returns { signature, bytes } (both base64-encoded)\n```\n\n`signTransaction` builds the transaction against the provided `SuiClient` for gas estimation, then signs the serialized bytes. The returned `bytes` and `signature` can be handed to a facilitator for verification and broadcast, or executed directly.\n\n### `toFacilitatorSuiSigner(config?, keypair?)`\n\nCreates a `FacilitatorSuiSigner` that wraps `SuiClient` operations. Pass an optional keypair only if this facilitator provides gas sponsorship.\n\n```typescript\nimport { toFacilitatorSuiSigner } from \"@sweefi/sui\";\n\n// Basic facilitator (no gas sponsorship)\nconst facilitator = toFacilitatorSuiSigner();\n\n// With a custom RPC URL\nconst facilitator = toFacilitatorSuiSigner({\n  rpcUrl: \"https://my-rpc.example.com\",\n});\n\n// With per-network RPC overrides\nconst facilitator = toFacilitatorSuiSigner({\n  rpcUrls: {\n    \"sui:mainnet\": \"https://mainnet-rpc.example.com\",\n    \"sui:testnet\": \"https://testnet-rpc.example.com\",\n  },\n});\n```\n\n`FacilitatorSuiSigner` methods:\n\n| Method | Description |\n|--------|-------------|\n| `verifySignature(txBytes, sig, network)` | Recover the signer's address from transaction bytes and a signature (Ed25519 and Secp256k1) |\n| `simulateTransaction(txBytes, network)` | Dry-run a transaction; returns balance changes, effects, and events |\n| `executeTransaction(tx, sig, network)` | Broadcast a signed transaction; returns the digest |\n| `waitForTransaction(digest, network)` | Poll until the transaction reaches finality |\n| `getTransactionBlock(digest, network)` | Fetch transaction events (optional; used to extract created object IDs from Move events) |\n\nFor sponsored transactions, pass `[clientSig, sponsorSig]` as the `signature` argument to `executeTransaction`.\n\n## s402 Scheme Implementations\n\n`@sweefi/sui` ships client, facilitator, and server implementations of the s402 payment protocol for each payment primitive. Import them from `@sweefi/sui`:\n\n| Scheme | Client | Facilitator | Server |\n|--------|--------|-------------|--------|\n| Exact | `ExactSuiClientScheme` | `ExactSuiFacilitatorScheme` | — |\n| Stream | `StreamSuiClientScheme` | `StreamSuiFacilitatorScheme` | `StreamSuiServerScheme` |\n| Escrow | `EscrowSuiClientScheme` | `EscrowSuiFacilitatorScheme` | `EscrowSuiServerScheme` |\n| Prepaid | `PrepaidSuiClientScheme` | `PrepaidSuiFacilitatorScheme` | `PrepaidSuiServerScheme` |\n| Unlock | `UnlockSuiClientScheme` | — | — |\n| Direct | `DirectSuiSettlement` | — | — |\n\n**Scheme summary:**\n\n- **Exact** — One-shot payment (`coinWithBalance` to `transferObjects`). Zero setup overhead; suitable for synchronous API responses where a single payment proves access.\n- **Prepaid** — Agent deposits a budget upfront; provider submits cumulative call counts to claim. The deposit is the agent's maximum possible loss. Ideal for high-frequency micropayment workloads where per-request on-chain settlement is impractical.\n- **Stream** — Two-phase protocol: a 402 handshake opens a `StreamingMeter`, and subsequent requests carry an `X-STREAM-ID` header. Tokens accrue per second against a rate cap. Close the meter to settle final balances.\n- **Escrow** — Time-locked escrow with an optional arbiter address. Funds release on seller confirmation or are refunded to the buyer after the deadline. Supports on-chain dispute escalation.\n- **Unlock** — Composite escrow + pay-to-decrypt using SEAL. A single atomic transaction pays the seller and unlocks an encryption key, preventing payment without content delivery and vice versa.\n- **Direct** — No facilitator. The client signs and broadcasts its own transaction for fully self-sovereign settlement. Useful in trust-minimized or local-only environments.\n\n## Constants\n\n```typescript\nimport {\n  SUI_COIN_TYPE,       // \"0x2::sui::SUI\"\n  USDSUI_MAINNET,      // USDsui — Bridge (Stripe) native stablecoin on Sui mainnet\n  USDSUI_DECIMALS,     // 6\n  USDC_MAINNET,        // Circle native USDC on Sui mainnet (CCTP, not Wormhole-bridged)\n  USDC_TESTNET,        // Circle native USDC on Sui testnet\n  USDC_DECIMALS,       // 6\n  SUI_DECIMALS,        // 9\n  SUI_MAINNET_CAIP2,   // \"sui:mainnet\"\n  SUI_TESTNET_CAIP2,   // \"sui:testnet\"\n  SUI_DEVNET_CAIP2,    // \"sui:devnet\"\n  MAINNET_RPC_URL,\n  TESTNET_RPC_URL,\n  DEVNET_RPC_URL,\n} from \"@sweefi/sui\";\n```\n\nPTB deployment constants (from `@sweefi/sui/ptb`):\n\n```typescript\nimport {\n  testnetConfig,          // { packageId: TESTNET_PACKAGE_ID, protocolStateId: TESTNET_PROTOCOL_STATE }\n  TESTNET_PACKAGE_ID,     // Latest deployed package (full suite including mandate + prepaid)\n  TESTNET_PROTOCOL_STATE, // Shared ProtocolState object ID (required for stream/escrow create ops)\n  TESTNET_ADMIN_CAP,      // AdminCap object ID (deployer-owned)\n  TESTNET_UPGRADE_CAP,    // UpgradeCap object ID (deployer-owned)\n  SUI_CLOCK,              // \"0x6\" — Sui's well-known Clock shared object\n} from \"@sweefi/sui/ptb\";\n```\n\n## Utilities\n\n```typescript\nimport {\n  createSuiClient,      // Create a SuiClient from a CAIP-2 network identifier\n  getUsdcCoinType,      // Get the canonical USDC coin type for a given network\n  validateSuiAddress,   // Check that an address is 0x + 64 hex chars (fully zero-padded)\n  convertToTokenAmount, // Convert a decimal string + decimals to base units (no float intermediates)\n  coinTypesEqual,       // Compare two coin types for equality after normalization\n} from \"@sweefi/sui\";\n```\n\n`convertToTokenAmount` uses pure string arithmetic to avoid floating-point precision loss — safe for financial calculations:\n\n```typescript\nimport { convertToTokenAmount, USDC_DECIMALS } from \"@sweefi/sui\";\n\nconvertToTokenAmount(\"0.10\", USDC_DECIMALS); // \"100000\" (0.10 USDC in base units)\nconvertToTokenAmount(\"1.5\", 9);              // \"1500000000\" (1.5 SUI in MIST)\n```\n\n## Peer Dependencies\n\n| Package | Version | Notes |\n|---------|---------|-------|\n| `@mysten/sui` | `^2.0.0` | Sui TypeScript SDK |\n| `@sweefi/hono` | `>=0.1.0` | s402 fetch wrapper (used by `createS402Client`) |\n\n## License\n\nApache 2.0 — [https://github.com/sweeinc/sweefi](https://github.com/sweeinc/sweefi)\n","readmeFilename":"README.md"}