{"_id":"@brainai/satp-client","_rev":"11-ee3e017907cfa7ebf040f8f92abc9129","name":"@brainai/satp-client","dist-tags":{"rc":"2.0.2","latest":"2.0.8"},"versions":{"2.0.0":{"name":"@brainai/satp-client","version":"2.0.0","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"MIT","_id":"@brainai/satp-client@2.0.0","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://agentfolio.bot","bugs":{"url":"https://github.com/brainai-dev/satp-client/issues"},"dist":{"shasum":"9872c8155c480e22e7372f357e74b8e29c8ce961","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.0.tgz","fileCount":6,"integrity":"sha512-69hHDcXrjSZmxWXCoNB89tRrZTVSrbjplCk8p6NOJqIb5HNccUlfEtE2Tu+ZbFE0xvpU9fNY19cJZ/KB3Wr4og==","signatures":[{"sig":"MEUCIA2On3IhK4ji6527LCJPaGYz8Gp+9jqznhLYCqNpr2m5AiEAj1WG7+0Vg6Fmtt34PBsFBEfJCZFtYBdZNOI2gwOVFiw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23116},"main":"src/index.js","gitHead":"9305e01070f0245b77f60f2d12b1b471e2db792d","scripts":{"test":"node test.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"repository":{"url":"git+https://github.com/brainai-dev/satp-client.git","type":"git"},"_npmVersion":"10.9.4","description":"SATP v2 Client SDK — Solana Agent Token Protocol (Identity, Reviews, Reputation, Attestations, Validation)","directories":{},"_nodeVersion":"22.22.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","@solana/web3.js":"^1.98.4"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.0_1773728346430_0.5435539950103832","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@brainai/satp-client","version":"2.0.1","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"MIT","_id":"@brainai/satp-client@2.0.1","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"0c91127d6f9bc90cfb75f885012835ccfa47c574","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.1.tgz","fileCount":15,"integrity":"sha512-GaR3G+YVfU1vZ4DzvSYNkeAaWJ7po4tnPK+YL/nyBTbCcBSj2eHGkYal5uR5vpHE+UHknl82okV3Gc78hdYuFA==","signatures":[{"sig":"MEQCICHwbBjYFZ0mPhY1z3xQ0ECM7g1RUbj8GVH3eaeXp+u5AiBw3ReRQ3g4BTsXmYV9+2K2y4/5nC4A+86AitkLTtEXzg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":203158},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json"},"gitHead":"ebfd3c8252a6dceea7bc417a64061334c584b22b","private":false,"scripts":{"test":"node test.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.20.1"},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","@solana/web3.js":"^1.98.4"},"publishConfig":{"tag":"rc","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.1_1779394644555_0.14774618080840884","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc.0":{"name":"@brainai/satp-client","version":"0.1.0-rc.0","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"MIT","_id":"@brainai/satp-client@0.1.0-rc.0","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"3880cf76a6f3d22ee07cac6439ed4df692b85778","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-0.1.0-rc.0.tgz","fileCount":19,"integrity":"sha512-1UsVrQ+4eoaptsfll61YcGMJnhYikzpKV128gYqBko1GC+RwRBpFPCQPinAlw8qLt/4jDdnZYkxHLj+eOGXh7w==","signatures":[{"sig":"MEUCIQD5SLB5AH0JPsJmy/pThhphTP9o8Zr/w6SgYLvkRDInjwIgfXyBYBd4YiIhLCRAC/fJpG4iwsTBbZxMQD9x35ZRdWg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":253652},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.20.1","jayson":{"uuid":"^11.1.1"}},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","@solana/web3.js":"^1.98.4"},"publishConfig":{"tag":"rc","access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/satp-client_0.1.0-rc.0_1779868910721_0.5415697822232612","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@brainai/satp-client","version":"2.0.2","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"MIT","_id":"@brainai/satp-client@2.0.2","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"58ff2112d452298fa43f2c2359aa20edc5f83bc2","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.2.tgz","fileCount":21,"integrity":"sha512-iQ3FKE0MNhbZRxbVnkTZFh4A6aw9UkvQZlikAZmDDEmElcHVYApAt0VJHgLPXUwWF2T6Qf/Hv+6cNRtXz5UFZw==","signatures":[{"sig":"MEUCIQDB/nk260L31Ro54+EeCkSAKwwGfQ+tt9mmiKC+eqAJbQIgXNXAUoymNirLCQU25nt6HaI4Q8VFTH90WsosgHklJlQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267283},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"gitHead":"c9592bebf7d037d17d1905488340c47631e4321f","private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"}},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","@solana/web3.js":"^1.98.4"},"publishConfig":{"tag":"rc","access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.2_1784191511279_0.7436191200859323","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@brainai/satp-client","version":"2.0.3","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"MIT","_id":"@brainai/satp-client@2.0.3","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"f85df916a40124dec1581fe8371830f08c0d09c4","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.3.tgz","fileCount":21,"integrity":"sha512-HrHPUQSYqxqS7bTkttLiObJBHzj0EbNcJjkAM4RWaExia77rLIq7/L7UMxUGt1DEBcD0DkshZ7A2nFrjdKK8oA==","signatures":[{"sig":"MEUCIAoMzJgbwj8FEGYQmaPs0uKit2SNOKD7b3XPC89/dDpIAiEAlX2MvEFt4uC/6exRAD+jVIfvR8OqKJbTArtawBPycsc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267266},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"gitHead":"c9592bebf7d037d17d1905488340c47631e4321f","private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"}},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","@solana/web3.js":"^1.98.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.3_1784191698086_0.8975993077192281","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@brainai/satp-client","version":"2.0.4","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"Apache-2.0","_id":"@brainai/satp-client@2.0.4","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"dbe685bb4b1ffd81c56cb0fe235f56035a0e9357","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.4.tgz","fileCount":23,"integrity":"sha512-qY8GJRaBB7ajymhgFs4RTWDVUdJ+4sWbn657P4+nN9mHf/eNYuBnFwV/FyPteh/Ed8xjP1QKaVqIWOxjKnFMUw==","signatures":[{"sig":"MEQCIANgn+Dq6GrufXQjUluswYB/0Ugw8/VAzoTs08Z7+bknAiAEyoGC68wU3vmHtxLn+qJImPDrQwqjF1+LsPmhuoEcHg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318337},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:signer-policy":"node test-signer-policy.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"},"rpc-websockets":"9.3.5"},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","rpc-websockets":"9.3.5","@solana/web3.js":"^1.98.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.4_1785175693409_0.27902937834764585","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@brainai/satp-client","version":"2.0.5","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"Apache-2.0","_id":"@brainai/satp-client@2.0.5","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"f09a8a4a2bdce59b3b827a9ff6b93cc603b40a23","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.5.tgz","fileCount":23,"integrity":"sha512-ILW0uhBUNQREJwNGfbXpEVLpttknijIgSUXNRoHfyKwd7riUmo7KZefWHLU53azZT3b4R6M0mExTrwewhtLBLw==","signatures":[{"sig":"MEYCIQCPG6/qgoJCNzqeWKOvBLRhj2GwpOKc2BmAI3Gxkp4QzAIhAKlbkLHqhdNTPRDfDxH/M7H3FPjori9TI6pmbF4T0FKf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318352},"main":"src/index.js","_from":"file:dist/brainai-satp-client-2.0.5.tgz","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:signer-policy":"node test-signer-policy.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"_resolved":"/Users/brainchain/tmp/satp-mainnet-v3-program-ids-20260727/dist/brainai-satp-client-2.0.5.tgz","overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"},"rpc-websockets":"9.3.5"},"_integrity":"sha512-ILW0uhBUNQREJwNGfbXpEVLpttknijIgSUXNRoHfyKwd7riUmo7KZefWHLU53azZT3b4R6M0mExTrwewhtLBLw==","repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","rpc-websockets":"9.3.5","@solana/web3.js":"^1.98.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.5_1785177178302_0.14592740760249812","host":"s3://npm-registry-packages-npm-production"}},"2.0.6":{"name":"@brainai/satp-client","version":"2.0.6","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"Apache-2.0","_id":"@brainai/satp-client@2.0.6","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"089503334faff74278b0112142b4db7ca794df0b","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.6.tgz","fileCount":25,"integrity":"sha512-xeY8U1jHoWwUoKx9LFVxfVaxMh/TUjZBa6gpoDWw3hIwGhnKUu+QNTIdwELPgcBF2v7VmROmzVKCeEdoysOH7Q==","signatures":[{"sig":"MEQCIAMUZNtKlA8IjmKsFP51aOhvUVxvsPXIxvVe4CkRIEBAAiBbPHwFQpq7QxQACGj/26q/5w/sN4Yr1AyRo/1dqWAwwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":327083},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"}},"private":false,"scripts":{"test":"node test.js","check:exports":"node test-release-safety.js","test:signer-policy":"node test-signer-policy.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","check:package-health":"node ../../scripts/check-satp-client-package-health.js","runtime-policy:example":"node examples/runtime-policy-adapter.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"},"rpc-websockets":"9.3.5"},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.12.1","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","rpc-websockets":"9.3.5","@solana/web3.js":"^1.98.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.6_1785676635716_0.8641299296288028","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@brainai/satp-client","version":"2.0.7","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"Apache-2.0","_id":"@brainai/satp-client@2.0.7","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"homepage":"https://github.com/brainAI-bot/satp","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"dist":{"shasum":"b31bb6cae8777bb21c9b1253cac1d95ac256f4da","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.7.tgz","fileCount":2135,"integrity":"sha512-L85dyk7yd/qKcOYCvLPBOUIP8j8JNIKl0nb9+TMWk2TFa3gZ/20uvG/PveMW1dcQ0WiB6ksV5sUeJxV9gf1BDw==","signatures":[{"sig":"MEUCIA0FvIqE8fUM0asRqil3wMO1PIEQS74LGPCRT2oXB3AoAiEAz8N6sHLdOZXw2LvI7PnZaYHgQgTiuQQ29n0W0BYF6UY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23162390},"main":"src/index.js","types":"src/index.d.ts","engines":{"node":">=20.18"},"exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./src/*":"./src/*","./idls/*":"./idls/*","./package.json":"./package.json","./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"},"./runtime-authorization-evidence":{"types":"./src/index.d.ts","default":"./src/runtime-authorization-evidence.js"}},"private":false,"scripts":{"test":"node test.js","prepack":"npm ci --workspaces=false --ignore-scripts --no-audit --no-fund --silent && node scripts/materialize-v3-idls.js","check:exports":"node test-release-safety.js","test:signer-policy":"node test-signer-policy.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","check:package-health":"node ../../scripts/check-satp-client-package-health.js","runtime-policy:example":"node examples/runtime-policy-adapter.js","test:runtime-authorization-evidence":"node --test test-runtime-authorization-evidence.js"},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"overrides":{"ws":"^8.21.0","jayson":{"uuid":"^11.1.1"},"rpc-websockets":"9.3.5"},"repository":{"url":"git+https://github.com/brainAI-bot/satp.git","type":"git"},"_npmVersion":"11.19.0","description":"SATP client SDK surface prepared for release-candidate review; publish only after the release packet passes.","directories":{},"_nodeVersion":"26.7.0","dependencies":{"bs58":"^6.0.0","borsh":"^2.0.0","rpc-websockets":"9.3.5","@solana/web3.js":"^1.98.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"bundleDependencies":["@solana/web3.js"],"_npmOperationalInternal":{"tmp":"tmp/satp-client_2.0.7_1787626442101_0.5605940390171751","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@brainai/satp-client","version":"2.0.8","description":"SATP client SDK for reviewed Solana Agent Trust Protocol integrations.","main":"src/index.js","types":"src/index.d.ts","exports":{".":{"types":"./src/index.d.ts","default":"./src/index.js"},"./wallet-control-challenge":{"types":"./src/index.d.ts","default":"./src/wallet-control-challenge.js"},"./runtime-authorization-evidence":{"types":"./src/index.d.ts","default":"./src/runtime-authorization-evidence.js"},"./x402-discovery":{"types":"./src/index.d.ts","default":"./src/x402-discovery.js"},"./src/*":"./src/*","./idls/*":"./idls/*","./package.json":"./package.json"},"scripts":{"prepack":"npm ci --workspaces=false --ignore-scripts --no-audit --no-fund --silent && node scripts/materialize-v3-idls.js","check:package-health":"node ../../scripts/check-satp-client-package-health.js","test":"node test.js","test:runtime-policy":"node --test test-runtime-policy-adapter.js","test:runtime-authorization-evidence":"node --test test-runtime-authorization-evidence.js","runtime-policy:example":"node examples/runtime-policy-adapter.js","test:wallet-control":"node test-wallet-control-challenge.js","test:x402-discovery":"node test-x402-discovery.js","test:signer-policy":"node test-signer-policy.js","check:exports":"node test-release-safety.js"},"keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"author":{"name":"brainAI"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/brainAI-bot/satp.git"},"homepage":"https://github.com/brainAI-bot/satp","engines":{"node":">=20.18"},"dependencies":{"@solana/web3.js":"^1.98.4","borsh":"^2.0.0","bs58":"^6.0.0","rpc-websockets":"9.3.5"},"private":false,"overrides":{"ws":"^8.21.0","rpc-websockets":"9.3.5","jayson":{"uuid":"^11.1.1"}},"publishConfig":{"access":"public"},"_id":"@brainai/satp-client@2.0.8","bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"_integrity":"sha512-EuPNCPODD8VH5qPnSrAoaaIPVjkrfRjk97Czkbv88F3iHwlITpzGvgFfbkVjB2rLfExkjfm0Ge8v6YHisVA9jA==","_resolved":"/tmp/satp-client-208-pack.YTfiuZ/local/brainai-satp-client-2.0.8.tgz","_from":"file:/tmp/satp-client-208-pack.YTfiuZ/local/brainai-satp-client-2.0.8.tgz","_nodeVersion":"26.7.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-EuPNCPODD8VH5qPnSrAoaaIPVjkrfRjk97Czkbv88F3iHwlITpzGvgFfbkVjB2rLfExkjfm0Ge8v6YHisVA9jA==","shasum":"e98f5073a1637fe3424311e42f48719de6fee941","tarball":"https://registry.npmjs.org/@brainai/satp-client/-/satp-client-2.0.8.tgz","fileCount":28,"unpackedSize":415351,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDj2PWwhdOToG4YQD0NC+ZQaMZWR8JcVJQxzlrJRdETdAIhANHxAYIzskGDIxwkj/DiE1h2By16dhCgMMKPGOZ7zKmO"}]},"_npmUser":{"name":"brainai","email":"brainkid@brainai.bot"},"directories":{},"maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/satp-client_2.0.8_1788026771201_0.33876384428017214"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-17T06:19:06.337Z","modified":"2026-08-29T18:06:11.564Z","2.0.0":"2026-03-17T06:19:06.581Z","2.0.1":"2026-05-21T20:17:24.704Z","0.1.0-rc.0":"2026-05-27T08:01:50.931Z","2.0.2":"2026-07-16T08:45:11.412Z","2.0.3":"2026-07-16T08:48:18.229Z","2.0.4":"2026-07-27T18:08:13.585Z","2.0.5":"2026-07-27T18:32:58.459Z","2.0.6":"2026-08-02T13:17:15.867Z","2.0.7":"2026-08-25T02:54:02.358Z","2.0.8":"2026-08-29T18:06:11.408Z"},"bugs":{"url":"https://github.com/brainAI-bot/satp/issues"},"author":{"name":"brainAI"},"license":"Apache-2.0","homepage":"https://github.com/brainAI-bot/satp","keywords":["solana","satp","agent","identity","reputation","blockchain","web3"],"repository":{"type":"git","url":"git+https://github.com/brainAI-bot/satp.git"},"description":"SATP client SDK for reviewed Solana Agent Trust Protocol integrations.","maintainers":[{"name":"brainai","email":"brainkid@brainai.bot"}],"readme":"# SATP V3 SDK - `@brainai/satp-client`\n\n**Solana Agent Trust Protocol** - JavaScript/TypeScript SDK for reading and\nbuilding reviewed SATP V3 program interactions.\n\nCurrent stable npm package: **@brainai/satp-client@2.0.8** | rc dist-tag: **@brainai/satp-client@2.0.2** | Programs: **6**\n\n## Installation\n\nChoose stable, rc, or Git based on what the consumer needs to prove:\n\n| Channel | Use when | Command |\n| --- | --- | --- |\n| Stable npm | Default production-style consumption of the stable public package. | `npm install @brainai/satp-client@2.0.8` |\n| Historical rc exact version | Explicit HQ-assigned reproduction or lockfile evidence for the historical pre-stable artifact. | `npm install @brainai/satp-client@2.0.2` |\n| Release candidate tag | Explicit HQ-assigned rc validation where a moving dist-tag is acceptable and the task names the tag as the target. | `npm install @brainai/satp-client@rc` |\n| Reviewed Git commit | PR coordination or source-review installs tied to an exact SATP commit. | `npm install git+https://github.com/brainAI-bot/satp.git#<SATP_COMMIT>` |\n\nRegistry publish/readback on 2026-08-29 shows npm `latest` resolves to\n`@brainai/satp-client@2.0.8` and the `rc` dist-tag resolves to `2.0.2`.\nStable consumers should use `latest`/`2.0.8` unless HQ assigns an explicit\nrelease-candidate validation task.\n\nVersion `2.0.8` replaces the oversized `2.0.7` artifact. It keeps runtime\ndependencies as normal npm dependencies and excludes `node_modules` from the\npublished tarball.\n\nFor stable consumer installs, pin the current published npm package:\n\n```bash\nnpm install @brainai/satp-client@2.0.8\n```\n\nFor rc validation:\n\n```bash\nnpm install @brainai/satp-client@2.0.2\n```\n\nUse `@rc` only when the HQ task names the moving tag itself as the validation\ntarget:\n\n```bash\nnpm install @brainai/satp-client@rc\n```\n\nFor branch-only development or PR review, pin an explicit SATP Git commit:\n\n```bash\nnpm install git+https://github.com/brainAI-bot/satp.git#<SATP_COMMIT>\n```\n\nThe old `0.0.0-extraction` label was extraction-branch metadata and is not the\ncurrent consumer package. Do not treat branch-only Git installs as npm latest.\nContinue to [Quick Start](#quick-start) for an installed-package flow that uses\nonly files shipped in the package.\n\nMainnet program IDs are present for the reviewed V3 registry, but availability\nis not action approval. Mainnet writes, deploys, keypair use, authority changes,\nvalue-bearing escrow actions, npm promotion, and production claims still require\na separate HQ approval and the relevant owner-gated runbook. See the\n[public authority decision packet](https://github.com/brainAI-bot/satp/blob/main/docs/mainnet-authority-decision-packet-6c8a5545.md).\n\nLegacy `SATPSDK` is V2-only compatibility. It defaults to devnet and rejects\n`network: 'mainnet'` unless `allowLegacyV2Mainnet: true` is passed explicitly.\nNew integrations should prefer `SATPV3SDK` or `createSATPClient`.\n\nRC-S6 semantic uncertainty outcomes are covered by the offline conformance gate\nmerged in `93db1b3` (PR #53, `[#43394290]`) and runnable with\n`npm run test:conformance:rc-s6` from the repository root. Treat positive\nfixtures as deterministic SDK/schema compatibility only. Treat stale, revoked,\nmalformed, unsupported-issuer, score-meaning, review-weight, escrow-reference,\nand AgentFolio copy-boundary fixtures as warning or fail-closed outcomes; do\nnot convert them into verified badges, ranking, eligibility, payment state,\nescrow readiness, mainnet readiness, npm latest adoption, or product approval.\n\n**Runtime dependency:** `@solana/web3.js ^1.98.4`\n\n## Quick Start\n\nThis installed-package quickstart covers an offline read-only SDK flow.\n\nFor copy-paste MCP, A2A/agent-runtime, and x402 paid-endpoint examples, see the\nsource [`examples/adoption-quickstarts.js`](https://github.com/brainAI-bot/satp/blob/079f2a85ad912d4eff2bca5516d214829246784b/packages/satp-client/examples/adoption-quickstarts.js).\nFrom a SATP source checkout, run this command from the repository root:\n\n```bash\nnode packages/satp-client/examples/adoption-quickstarts.js\n```\n\n```javascript\nconst { SATPV3SDK } = require('@brainai/satp-client');\n\n// Initialize (devnet by default)\nconst sdk = new SATPV3SDK({ network: 'devnet' });\n\n// Check if an agent has an identity\nconst exists = await sdk.hasIdentity('brainChain');\nconsole.log(exists); // true\n\n// Read a Genesis Record\nconst record = await sdk.getGenesisRecord('brainChain');\nconsole.log(record.agentName, record.category, record.isActive);\n\n// Build a transaction (unsigned — sign with your wallet)\nconst tx = await sdk.buildCreateIdentity(creatorPubkey, 'myAgent', {\n  agentName: 'My Agent',\n  description: 'An AI agent on Solana',\n  category: 'assistant',\n  capabilities: ['chat', 'code'],\n  metadataUri: 'https://example.com/meta.json',\n});\n// Sign and send tx with your wallet...\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                        SATP V3 SDK                              │\n├─────────────┬──────────────┬──────────────┬─────────────────────┤\n│ Identity    │ Reviews      │ Attestations │ Escrow              │\n│ (20 methods)│ (7 methods)  │ (3 methods)  │ (10 methods)        │\n├─────────────┼──────────────┼──────────────┤                     │\n│ Reputation  │ Validation   │ Migration    │                     │\n│ (1 method)  │ (1 method)   │ (1 method)   │                     │\n├─────────────┴──────────────┴──────────────┴─────────────────────┤\n│ PDA Derivation  │  Borsh Serialization  │  RPC Helpers          │\n└─────────────────┴───────────────────────┴───────────────────────┘\n```\n\n## Programs & Program IDs\n\n| Program | Mainnet | Description |\n|---------|--------|-------------|\n| `identity_v3` | `GTppU4E44BqXTQgbqMZ68ozFzhP1TLty3EGnzzjtNZfG` | Agent identity, names, wallets, face/birth |\n| `reviews_v3` | `r9XX4frcqxxAZ6Au9V5PA3EAxs1zoNckqLLmoSRcNr4` | Peer reviews with 1-5 star ratings |\n| `attestations_v3` | `6Xd1dAQJPvQRJ4Ntr6LtPTjDjPUZ8nfnmYLZaZ2DtrdD` | Third-party attestations & proofs |\n| `reputation_v3` | `2Lz7KzMvKdrGeAuS8WPHu7jK2yScrnKVgacpYVEuDjkJ` | Weighted reputation scoring (CPI → identity) |\n| `validation_v3` | `6rYRiCYidJYV7QvKrzKGgNu4oMh6BAvynked69R7xMbV` | Validation level computation (CPI → identity) |\n| `escrow_v3` | `HXCUWKR2NvRcZ7rNAJHwPcH6QAAWaLR4bRFbfyuDND6C` | SOL escrow for agent jobs |\n\n## API Reference\n\n### Read-only Trust Packet Helpers\n\n`buildSatpTrustPacket(opts)` creates a deterministic, offline trust packet for\nconsumer preflight and release-packet review. It uses the same inputs as\n`prepareIdentityAttestationRequest`, then includes the derived program IDs,\nGenesis PDA, attestation PDA, request hash, and the unsigned request object.\nThe packet is intentionally read-only: `flags.signingRequired`,\n`flags.transactionRequired`, `flags.writesRequired`, and\n`flags.livePaymentRequired` are all `false`; `instructions` and `signers`\nare empty; and `transaction` is `null`.\n\n```javascript\nconst {\n  buildSatpTrustPacket,\n  validateSatpTrustPacket,\n} = require('@brainai/satp-client');\n\nconst trustPacket = buildSatpTrustPacket({\n  subjectWallet: '11111111111111111111111111111111',\n  agentId: 'brainChain',\n  claimType: 'identity',\n  metadataHash: '93d122f8879fe87c186c10a00db8fbc80a73cecd2ede44b9ffa6410be3c2b805',\n  network: 'devnet',\n});\n\nconst validation = validateSatpTrustPacket(trustPacket);\nif (!validation.ok) throw new Error(validation.errors.join('; '));\n```\n\n`validateSatpTrustPacket(packet)` returns `{ ok, errors }`. Validation requires\n`packetType: 'satp-trust-packet'` and\n`mode: 'offline-readonly-trust-packet'`, rejects changed read-only flags, and\nre-derives the expected packet so tampered PDA, program, request, or hash fields\nsurface as explicit errors.\n\n`verifyIdentityAttestationRequest(request, expectations)` validates a standalone\nunsigned request before a consumer stores or displays it. It recomputes the\ncanonical request hash, program IDs, agent ID hash, Genesis PDA, and attestation\nPDA, and enforces the no-sign/no-transaction request shape. Optional expectations\nbind the request to host-owned inputs without requiring RPC or a signer:\n\n```javascript\nconst {\n  prepareIdentityAttestationRequest,\n  verifyIdentityAttestationRequest,\n} = require('@brainai/satp-client');\n\nconst request = prepareIdentityAttestationRequest({\n  subjectWallet: '11111111111111111111111111111111',\n  agentId: 'brainChain',\n  claimType: 'identity',\n  metadataHash: '93d122f8879fe87c186c10a00db8fbc80a73cecd2ede44b9ffa6410be3c2b805',\n  network: 'devnet',\n});\n\nconst verification = verifyIdentityAttestationRequest(request, {\n  expectedSubjectWallet: '11111111111111111111111111111111',\n  expectedAgentId: 'brainChain',\n  expectedClaimType: 'identity',\n  expectedNetwork: 'devnet',\n});\n\nif (!verification.ok) throw new Error(verification.errors.join('; '));\n```\n\nThe result shape is `{ ok, errors, warnings }`. Verification is local and\nread-only; it does not prove that an attester signed or submitted anything.\n\n### x402 Discovery Evidence Lookup Helpers\n\n`parseX402DiscoveryMetadata(input)`, `buildX402EvidenceLookup(input, opts)`,\nand `buildRuntimePolicyActionDescriptorFromX402Discovery(input, opts)` map x402\ndiscovery metadata into SATP runtime policy evidence lookup data. The helpers are\nread-only: x402 payment metadata can identify where evidence may be fetched, but\nit is discovery/evidence lookup only and never authorizes SATP action execution,\nspending, live payment, signing, transactions, or host policy bypass.\n\nRun the source\n[`examples/x402-discovery-evidence-lookup.js`](https://github.com/brainAI-bot/satp/blob/079f2a85ad912d4eff2bca5516d214829246784b/packages/satp-client/examples/x402-discovery-evidence-lookup.js)\nfrom a SATP checkout's repository root:\n\n```bash\nnode packages/satp-client/examples/x402-discovery-evidence-lookup.js\n```\n\nThe example parses discovery metadata, builds an evidence lookup descriptor, and\nbuilds a runtime policy action descriptor. It asserts\n`X402_PAYMENT_IS_NOT_ACTION_AUTHORIZATION` plus\n`paymentAuthorization: false`, `actionAuthorization: false`,\n`spendAuthorized: false`, and `livePaymentRequired: false`.\n\nThe proposed issue #14 Track C endpoint spec for third-party SATP reputation\nand evidence consumers lives in the\n[source repository](https://github.com/brainAI-bot/satp/blob/main/docs/x402-reputation-evidence-lookup-api.md).\nIts source\n[`examples/x402-reputation-evidence-lookup-client.js`](https://github.com/brainAI-bot/satp/blob/079f2a85ad912d4eff2bca5516d214829246784b/packages/satp-client/examples/x402-reputation-evidence-lookup-client.js)\nis runnable from a SATP checkout's repository root with:\n\n```bash\nnode packages/satp-client/examples/x402-reputation-evidence-lookup-client.js\n```\n\n### Runtime Policy Adapter Helper\n\n`createRuntimePolicyAdapter(opts)` provides a host-oriented wrapper around the\noffline runtime policy helpers:\n\n```javascript\nconst { createRuntimePolicyAdapter } = require('@brainai/satp-client');\n\nconst adapter = createRuntimePolicyAdapter({\n  defaultActionType: 'mcp_protected_tool',\n  now: () => '2026-05-21T00:00:00Z',\n  policy: { minimumTrustScore: 70, maxAutoSpendUsd: 0 },\n});\n\nconst action = adapter.action({\n  resource: 'mcp://protected/readiness',\n  capability: 'mcp:read',\n});\nconst result = adapter.evaluate(identityPayload, action);\nconst trace = adapter.auditTrace(identityPayload, action, { result });\nconst summary = adapter.explain(result);\n```\n\nThe adapter only builds local descriptors, local decisions, redacted audit\ntraces, and display-safe reason summaries. It does not call RPC, read keypairs,\nsign, send transactions, approve x402 spend, treat payment as action\nauthorization, write Solana state, deploy, publish, or restart production.\n\n### Wallet-Control Challenge Helpers\n\n`buildWalletControlChallenge(opts)` creates a canonical, offline challenge that\nbinds an agent ID to a Solana wallet. It derives the SATP V3 Genesis PDA and\nlinked-wallet PDA from `agentId`, `wallet`, and `network`, includes a nonce and\nexpiry, and returns plain JSON. It does not connect to RPC, read keypairs,\ncreate transactions, sign, send, deploy, or mutate chain state.\n\n`canonicalWalletControlChallenge(challenge)` returns the exact UTF-8 message a\nwallet signs. `verifyWalletControlChallengeSignature(opts)` verifies a 64-byte\nEd25519 signature against the challenge wallet and fails closed for mismatched\nwallets, signatures, agent IDs, PDAs, domain, audience, expiry, and replayed\nnonces supplied by your replay cache.\n\n```javascript\nconst {\n  buildWalletControlChallenge,\n  canonicalWalletControlChallenge,\n  verifyWalletControlChallengeSignature,\n} = require('@brainai/satp-client');\n\nconst challenge = buildWalletControlChallenge({\n  agentId: 'brainChain',\n  wallet: walletPublicKey,\n  audience: 'my-service',\n  nonce: crypto.randomBytes(16).toString('hex'),\n});\n\n// Ask the wallet to sign this exact canonical string.\nconst message = canonicalWalletControlChallenge(challenge);\n\nconst verification = verifyWalletControlChallengeSignature({\n  challenge,\n  signature,\n  expectedWallet: walletPublicKey,\n  expectedAgentId: 'brainChain',\n  expectedAudience: 'my-service',\n  usedNonces: replayCache,\n});\nif (!verification.ok) throw new Error(verification.errors.join('; '));\n```\n\n### Constructor\n\n```javascript\nconst sdk = new SATPV3SDK({ network, rpcUrl });\n// network: 'devnet' (default) or 'mainnet'.\n// rpcUrl: optional custom RPC endpoint\n```\n\n---\n\n### Identity Methods (20)\n\n| Method | Description |\n|--------|-------------|\n| `buildCreateIdentity(creator, agentId, meta)` | Create a new agent identity (Genesis Record) |\n| `buildBurnToBecome(authority, agentId, faceImage, faceMint, faceBurnTx)` | Burn NFT to set agent's face (birth ritual) |\n| `buildUpdateIdentity(authority, agentId, updates)` | Update mutable fields (description, capabilities, metadata) |\n| `buildProposeAuthority(authority, agentId, newAuthority)` | Propose authority transfer (2-step) |\n| `buildAcceptAuthority(newAuthority, agentId)` | Accept proposed authority transfer |\n| `buildCancelAuthorityTransfer(authority, agentId)` | Cancel pending authority transfer |\n| `buildRegisterName(authority, agentId, name)` | Register a unique name for an agent |\n| `buildReleaseName(authority, agentId, name)` | Release a registered name |\n| `buildLinkWallet(authority, agentId, wallet, chain, label)` | Link an external wallet to identity |\n| `buildUnlinkWallet(authority, agentId, wallet)` | Unlink an external wallet |\n| `buildInitMintTracker(authority, agentId)` | Initialize NFT mint tracker |\n| `buildRecordMint(authority, agentId)` | Record an NFT mint event |\n| `buildDeactivateIdentity(authority, agentId)` | Deactivate an identity |\n| `buildReactivateIdentity(authority, agentId)` | Reactivate a deactivated identity |\n| `getGenesisRecord(agentId)` | Read a Genesis Record from chain |\n| `hasIdentity(agentId)` | Check if an agent has an identity |\n| `getEscrowPDA(client, description, nonce)` | Derive escrow PDA (sync) |\n| `buildMigrateV2ToV3(v2Authority, agentId, meta)` | Migrate from V2 to V3 identity |\n\n#### Genesis Record Fields\n\n```javascript\nconst record = await sdk.getGenesisRecord('brainChain');\n// Returns:\n{\n  agentIdHash: string,     // SHA-256 of agent_id\n  agentName: string,       // Display name\n  description: string,     // Agent description\n  category: string,        // e.g. \"developer\", \"assistant\"\n  capabilities: string[],  // e.g. [\"solana\", \"code\"]\n  metadataUri: string,     // Off-chain metadata URL\n  faceImage: string,       // Face image URL (after birth)\n  faceMint: string,        // NFT mint address (after birth)\n  faceBurnTx: string,      // Burn transaction signature\n  genesisRecord: number,   // Unix timestamp of birth\n  isBorn: boolean,         // Whether agent has completed birth ritual\n  isActive: boolean,       // Whether identity is active\n  authority: string,       // Current authority pubkey\n  pendingAuthority: string | null,\n  reputationScore: number, // CPI-updated reputation\n  validationLevel: number, // CPI-updated validation\n  createdAt: number,       // Unix timestamp\n  updatedAt: number,       // Unix timestamp\n}\n```\n\n---\n\n### Reviews Methods (7)\n\n| Method | Description |\n|--------|-------------|\n| `buildInitReviewCounter(payer, agentId)` | Initialize review counter for an agent |\n| `buildCreateReview(reviewer, agentId, rating, text, metadata, opts)` | Create a 1-5 star review |\n| `buildCreateReviewWithSelfCheck(reviewer, agentId, rating, text, metadata)` | Create review with self-review prevention |\n| `buildUpdateReview(reviewer, reviewPDA, updates)` | Update an existing review |\n| `buildDeleteReview(reviewer, reviewPDA)` | Soft-delete a review |\n| `getReview(agentId, reviewer)` | Read a review from chain |\n| `getReviewCount(agentId)` | Get total review count for an agent |\n\n```javascript\n// Create a review\nconst tx = await sdk.buildCreateReview(\n  reviewerPubkey,\n  'brainChain',      // agent being reviewed\n  5,                 // rating (1-5)\n  'Excellent Solana dev',\n  'metadata',\n  { category: 'development' }\n);\n```\n\n---\n\n### Attestations Methods (3)\n\n| Method | Description |\n|--------|-------------|\n| `buildCreateAttestation(issuer, agentId, type, proofData, expiresAt)` | Issue an attestation |\n| `buildVerifyAttestation(issuer, attestationPDA)` | Mark attestation as verified |\n| `buildRevokeAttestation(issuer, attestationPDA)` | Revoke an attestation |\n\n```javascript\n// Issue a KYC attestation\nconst tx = await sdk.buildCreateAttestation(\n  issuerPubkey,\n  'brainChain',\n  'kyc',             // attestation type\n  'proof-hash-here',\n  Math.floor(Date.now()/1000) + 86400 * 365 // expires in 1 year\n);\n```\n\n---\n\n### Reputation & Validation Methods (2)\n\n| Method | Description |\n|--------|-------------|\n| `buildRecomputeReputation(caller, agentId, reviewAccounts)` | Recompute reputation score from reviews (CPI → identity) |\n| `buildRecomputeLevel(caller, agentId, attestationAccounts)` | Recompute validation level from attestations (CPI → identity) |\n\nThese use Cross-Program Invocation to update fields directly on the Genesis Record.\n\n---\n\n### Escrow Methods (10)\n\nApp-agnostic escrow builders for downstream applications that need unsigned\nSATP escrow transactions. Product-specific marketplace records, fees, job\nworkflow, moderation, and display copy stay in the consuming application.\n\n| Method | Description |\n|--------|-------------|\n| `buildCreateEscrow(client, agentWallet, agentId, amount, description, deadline, nonce, opts)` | Create SOL escrow for a job |\n| `buildSubmitWork(agent, escrowPDA, workProof)` | Agent submits work proof |\n| `buildEscrowRelease(client, agent, escrowPDA)` | Client releases full payment |\n| `buildPartialRelease(client, agent, escrowPDA, amount)` | Client releases partial payment |\n| `buildCancelEscrow(client, escrowPDA)` | Cancel escrow (refund client) |\n| `buildRaiseDispute(signer, escrowPDA, reason)` | Raise a dispute |\n| `buildResolveDispute(arbiter, agent, client, escrowPDA, agentAmt, clientAmt)` | Arbiter resolves dispute |\n| `buildExtendDeadline(client, escrowPDA, newDeadline)` | Extend job deadline |\n| `buildCloseEscrow(client, escrowPDA)` | Close completed/cancelled escrow (reclaim rent) |\n| `getEscrow(escrowPDA)` | Read escrow state from chain |\n\n#### Escrow Lifecycle\n\n```\nCreated → WorkSubmitted → Released (full or partial)\n   ↓           ↓              ↓\nCancelled   Disputed     Closed (rent reclaimed)\n               ↓\n          Resolved (split)\n               ↓\n            Closed\n```\n\n```javascript\n// Create an escrow (0.5 SOL for a generic work agreement)\nconst tx = await sdk.buildCreateEscrow(\n  clientPubkey,\n  agentWallet,\n  'brainChain',\n  0.5 * 1e9,        // lamports\n  'Complete agreed work',\n  Math.floor(Date.now()/1000) + 86400 * 7, // 7 day deadline\n  0,                 // nonce (for multiple escrows with same description)\n  { arbiter: arbiterPubkey }\n);\n```\n\n---\n\n### PDA Helpers (exported from `v3-pda.js`)\n\n```javascript\nconst {\n  hashAgentId,                  // SHA-256 hash of agent_id string\n  hashName,                     // SHA-256 hash of name string\n  getGenesisPDA,                // [b\"genesis_record\", agent_id_hash]\n  getNameRegistryPDA,           // [b\"name_registry_v3\", name_hash]\n  getLinkedWalletPDA,           // [b\"linked_wallet_v3\", agent_id_hash, wallet]\n  getV3MintTrackerPDA,          // [b\"mint_tracker_v3\", agent_id_hash]\n  getV3ReviewPDA,               // [b\"review_v3\", agent_id_hash, reviewer]\n  getV3ReviewCounterPDA,        // [b\"review_counter_v3\", agent_id_hash]\n  getV3AttestationPDA,          // [b\"attestation_v3\", agent_id_hash, issuer, type_hash]\n  getV3ReputationAuthorityPDA,  // [b\"reputation_authority\", agent_id_hash]\n  getV3ValidationAuthorityPDA,  // [b\"validation_authority\", agent_id_hash]\n  getV3EscrowPDA,               // [b\"escrow_v3\", client, desc_hash, nonce_le]\n  getV3ProgramIds,              // Returns all 6 program IDs for network\n} = require('@brainai/satp-client/src/v3-pda');\n```\n\n---\n\n### Escrow SDK Utilities (exported from `v3-sdk.js`)\n\n```javascript\nconst {\n  deriveEscrowPda,    // Derive escrow PDA from params\n  descriptionHash,    // SHA-256 hash of description string\n  EscrowStatus,       // Enum: { Active: 0, WorkSubmitted: 1, Released: 2, Cancelled: 3, Disputed: 4, Resolved: 5 }\n  escrowStatusLabel,  // Convert status number to human-readable string\n  escrowRemaining,    // Calculate remaining escrow balance\n  isEscrowExpired,    // Check if escrow has passed deadline\n} = require('@brainai/satp-client/src/v3-sdk');\n```\n\n## Transaction Pattern\n\nAll `build*` methods return an **unsigned** `Transaction` object. Your application is responsible for:\n\n1. Setting `recentBlockhash` and `feePayer`\n2. Signing with the appropriate wallet\n3. Sending to the network\n\n```javascript\nconst tx = await sdk.buildCreateIdentity(wallet.publicKey, 'myAgent', { ... });\ntx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash;\ntx.feePayer = wallet.publicKey;\ntx.sign(wallet);\nconst sig = await connection.sendRawTransaction(tx.serialize());\nawait connection.confirmTransaction(sig);\n```\n\n## Consumer APIs\n\nSATP core does not define or host an HTTP API. Downstream applications may wrap\nthe SDK with their own read APIs, but those routes are consumer-owned adapters\nand must not be treated as SATP protocol authority.\n\n## Testing\n\nThe npm artifact does not ship the repository's maintainer test suites. Run\nthose suites only from a source checkout using the repository-root scripts in\nthe [source package manifest](https://github.com/brainAI-bot/satp/blob/main/package.json).\nInstalled-package consumers can exercise every offline example linked in this\nREADME using the consumer-root commands in the relevant sections above.\n\n## Network Configuration\n\n```javascript\n// Devnet (default)\nconst sdk = new SATPV3SDK();\n\n// Explicit devnet\nconst sdk = new SATPV3SDK({ network: 'devnet' });\n\n// Custom RPC\nconst sdk = new SATPV3SDK({ rpcUrl: 'https://my-rpc.example.com' });\n\n// Mainnet uses the V3 registry IDs documented in Anchor.toml [programs.mainnet].\nconst sdk = new SATPV3SDK({ network: 'mainnet' });\n```\n\n## Borsh Deserialization Helpers (v3.6.0)\n\nZero-dependency Borsh deserialization for all 8 SATP V3 account types. Decode raw on-chain data without the `borsh` library.\n\n### Supported Account Types\n\n| Account | Program | Deserializer |\n|---------|---------|-------------|\n| GenesisRecord | Identity V3 | `deserializeGenesisRecord(data)` |\n| LinkedWallet | Identity V3 | `deserializeLinkedWallet(data)` |\n| MintTracker | Identity V3 | `deserializeMintTracker(data)` |\n| NameRegistry | Identity V3 | `deserializeNameRegistry(data)` |\n| Review | Reviews V3 | `deserializeReview(data)` |\n| ReviewCounter | Reviews V3 | `deserializeReviewCounter(data)` |\n| Attestation | Attestations V3 | `deserializeAttestation(data)` |\n| EscrowV3 | Escrow V3 | `deserializeEscrowV3(data)` |\n\n### Usage: Typed Deserialization\n\n```js\nconst { deserializeGenesisRecord, deserializeAttestation } = require('@brainai/satp-client');\nconst { Connection, PublicKey } = require('@solana/web3.js');\n\nconst conn = new Connection('https://api.devnet.solana.com');\n\n// Fetch raw account and deserialize\nconst acct = await conn.getAccountInfo(new PublicKey('...'));\nconst genesis = deserializeGenesisRecord(acct.data);\nconsole.log(genesis.agentName, genesis.reputationScore, genesis.isBorn);\n```\n\nGenesis parsing is layout-aware for RC-S6 review. Parsed records include\n`layout` and `hasIsActiveField`; `isActive` is `null` when the account bytes do\nnot carry the historical `is_active` field.\n\n### Usage: Auto-detect Account Type\n\n```js\nconst { deserializeAccount } = require('@brainai/satp-client');\n\n// Automatically detects type from 8-byte Anchor discriminator\nconst { type, data } = deserializeAccount(acct.data);\nconsole.log(type);  // \"GenesisRecord\" | \"Attestation\" | \"EscrowV3\" | ...\nconsole.log(data);  // Fully parsed object\n```\n\n### Usage: Batch Deserialization (getProgramAccounts)\n\n```js\nconst { deserializeBatch, DISCRIMINATORS } = require('@brainai/satp-client');\n\nconst accounts = await conn.getProgramAccounts(REVIEWS_PROGRAM_ID);\nconst reviews = deserializeBatch(accounts, 'Review');\n// [{ pubkey: \"...\", type: \"Review\", data: { agentId, rating, ... } }, ...]\n```\n\n### Usage: BorshReader (Custom Deserialization)\n\n```js\nconst { BorshReader } = require('@brainai/satp-client');\n\n// Low-level reader for custom account layouts\nconst r = new BorshReader(acct.data);\nr.skipDiscriminator();           // skip 8-byte Anchor discriminator\nconst hash = r.readFixedBytes32(); // [u8; 32]\nconst name = r.readString();     // Borsh String\nconst items = r.readVecString(); // Vec<String>\nconst pk = r.readPubkeyBase58(); // Pubkey → base58\nconst opt = r.readOptionI64();   // Option<i64> → number | null\n```\n\n### Discriminator Utilities\n\n```js\nconst { isAccountType, getAccountDiscriminator, DISCRIMINATORS } = require('@brainai/satp-client');\n\n// Check account type before deserializing\nif (isAccountType(acct.data, 'EscrowV3')) {\n  const escrow = deserializeEscrowV3(acct.data);\n}\n\n// Get discriminator for filtering\nconst disc = getAccountDiscriminator('Attestation'); // 8-byte Buffer\n// Use with getProgramAccounts memcmp filter\n```\n\n## Security\n\n- All transactions are returned **unsigned** — the SDK never holds private keys\n- PDA derivation is deterministic and verified against on-chain seeds\n- CPI boundaries enforce program-level authorization\n- Escrow funds are held by PDA-owned accounts (no custodial risk)\n\n## License\n\nMIT — brainAI 2026\n","readmeFilename":"README.md"}