{"_id":"@cns-labs/agreements-protocol-evm","_rev":"14-4ee0bc2964d22f863ba77f8650c71f75","name":"@cns-labs/agreements-protocol-evm","dist-tags":{"latest":"0.1.4"},"versions":{"0.0.1":{"name":"@cns-labs/agreements-protocol-evm","version":"0.0.1","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"author":{"name":"CNS Labs"},"license":"Apache-2.0","_id":"@cns-labs/agreements-protocol-evm@0.0.1","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"dist":{"shasum":"eaacb57a0bf96e3522a528cb60d4b79e88294153","tarball":"https://registry.npmjs.org/@cns-labs/agreements-protocol-evm/-/agreements-protocol-evm-0.0.1.tgz","fileCount":107,"integrity":"sha512-Ik68YCjJujaxTLVy+67vIWxU3cwgW99KtnbhDeU3j0hnfyt7rszEKkOg11lKJixK1SOuGcek1eI3nIPQXaTD0w==","signatures":[{"sig":"MEUCICguiGrgqF/ZcSKePUX93z0oJgIUcDRrc+yXwozFymJYAiEA/9pOMxPsdXmjMh37CYuhLBa5W8u0N2rCYCeVDu172Ak=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":624448},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"gitHead":"c3cba33bbe4715b2ae4294385d35661c677ea490","scripts":{"lint":"tsc --noEmit","test":"jest","build":"npm run clean && npm run build:inline-json && npm run build:esm && npm run build:esm:package && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","test:watch":"jest --watch","prepublishOnly":"npm run build","build:esm:package":"node scripts/write-esm-package.mjs","build:inline-json":"node scripts/inline-json.mjs"},"_npmUser":{"name":"devs-cns-labs","email":"dev@cnslabs.io"},"deprecated":"Moved to @shodai-network/agreements-protocol-evm. Install that instead; this package is no longer updated.","_npmVersion":"10.8.2","description":"TypeScript SDK for the Agreements Protocol","directories":{},"_nodeVersion":"20.17.0","dependencies":{"viem":"2.43.2","dotenv":"^16.3.1","@opentelemetry/api":"^1.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ethers":"^6.16.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/minimatch":"^5.1.2","@opentelemetry/sdk-trace-base":"^2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/agreements-protocol-evm_0.0.1_1776979890654_0.173840321517714","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cns-labs/agreements-protocol-evm","version":"0.0.2","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"author":{"name":"CNS Labs"},"license":"Apache-2.0","_id":"@cns-labs/agreements-protocol-evm@0.0.2","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"dist":{"shasum":"3638436cf7693cfd4dd1a4ac540482313d3dbeee","tarball":"https://registry.npmjs.org/@cns-labs/agreements-protocol-evm/-/agreements-protocol-evm-0.0.2.tgz","fileCount":108,"integrity":"sha512-a/YCU4WgxRreIfZzp0wJAXUsswG0HJHtz112Q17Zbe21h5RKuz+U1O5in2PxFBCSld17GuSg08UZaFAgzO+cMQ==","signatures":[{"sig":"MEQCICXiUVo9kNxxcD8QevKCN9mzLw0b0+iN5SlRQksfCcSuAiAqTk6rVmU5lZLdc5Z+960Zla/lAAgphBTgWJ/jkyZa3g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":647239},"main":"./dist/cjs/index.js","_from":"file:cns-labs-agreements-protocol-evm-0.0.2.tgz","types":"./dist/esm/index.d.ts","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"tsc --noEmit","test":"jest","build":"npm run clean && npm run build:inline-json && npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","test:watch":"jest --watch","build:inline-json":"node scripts/inline-json.mjs"},"_npmUser":{"name":"devs-cns-labs","email":"dev@cnslabs.io"},"_resolved":"/private/var/folders/wn/_d0_dlnn6lj42yqnczjd6hfw0000gn/T/270d4f8429374b3b23026371a33ffcf4/cns-labs-agreements-protocol-evm-0.0.2.tgz","_integrity":"sha512-a/YCU4WgxRreIfZzp0wJAXUsswG0HJHtz112Q17Zbe21h5RKuz+U1O5in2PxFBCSld17GuSg08UZaFAgzO+cMQ==","deprecated":"Moved to @shodai-network/agreements-protocol-evm. Install that instead; this package is no longer updated.","_npmVersion":"10.8.2","description":"TypeScript SDK for the Agreements Protocol","directories":{},"_nodeVersion":"20.17.0","dependencies":{"viem":"2.43.2","dotenv":"^16.3.1","@opentelemetry/api":"^1.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ethers":"^6.16.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/minimatch":"^5.1.2","@opentelemetry/sdk-trace-base":"^2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/agreements-protocol-evm_0.0.2_1777498411529_0.5395640307389586","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@cns-labs/agreements-protocol-evm","version":"0.1.2","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"author":{"name":"CNS Labs"},"license":"Apache-2.0","_id":"@cns-labs/agreements-protocol-evm@0.1.2","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"dist":{"shasum":"d2b3ced8652535073f01e57bdaf848fee55e8f9b","tarball":"https://registry.npmjs.org/@cns-labs/agreements-protocol-evm/-/agreements-protocol-evm-0.1.2.tgz","fileCount":108,"integrity":"sha512-nOvcmETGWycJiyvapFeTSq0Ebv+CF/6eLgO9G5vWwpLbj+/g2VNF5fDGIB/ChCyRMOOu9zojQLpJbaZFUH9B0g==","signatures":[{"sig":"MEUCIQDkuKzXRpkGqmQG27l4N4sHp5CGNzBTnAeHT4i1gKMOUgIgRR+CXfXGa7YXq4nqhv/zglSIaAIXpkXy7Y20EZEYrVA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":648333},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"tsc --noEmit","test":"jest","build":"npm run clean && npm run build:inline-json && npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","test:watch":"jest --watch","prepublishOnly":"npm run build","build:inline-json":"node scripts/inline-json.mjs"},"_npmUser":{"name":"devs-cns-labs","email":"dev@cnslabs.io"},"deprecated":"Moved to @shodai-network/agreements-protocol-evm. Install that instead; this package is no longer updated.","_npmVersion":"10.8.2","description":"TypeScript SDK for the Agreements Protocol","directories":{},"_nodeVersion":"20.17.0","dependencies":{"viem":"2.43.2","dotenv":"^16.3.1","@opentelemetry/api":"^1.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ethers":"^6.16.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/minimatch":"^5.1.2","@opentelemetry/sdk-trace-base":"^2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/agreements-protocol-evm_0.1.2_1777748772820_0.909186402810582","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@cns-labs/agreements-protocol-evm","version":"0.1.3","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"author":{"name":"CNS Labs"},"license":"Apache-2.0","_id":"@cns-labs/agreements-protocol-evm@0.1.3","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"dist":{"shasum":"16df14a3bef74175d2ba9be0b49e8b1f080f804d","tarball":"https://registry.npmjs.org/@cns-labs/agreements-protocol-evm/-/agreements-protocol-evm-0.1.3.tgz","fileCount":108,"integrity":"sha512-lfFZDB8Mc1OD4BtoLfOE9T3qzYBB/xg4vxOydOr5jiWBSXpVtBmQ1Q8f9VGSQt0TcO5d3RyrB5/BINVORuC5yA==","signatures":[{"sig":"MEUCICy4wr+IbgfcEBiBx2OTOQMXTSSTq3qZJx8hvyEtGiKqAiEAuKHNXAN9vMRrhniKdQIcM3GygJPa2/eaRGwsEgA0TXI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":654017},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"tsc --noEmit","test":"jest","build":"npm run clean && npm run build:inline-json && npm run build:esm && npm run build:cjs","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","test:watch":"jest --watch","prepublishOnly":"npm run build","build:inline-json":"node scripts/inline-json.mjs"},"_npmUser":{"name":"devs-cns-labs","email":"dev@cnslabs.io"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Agreements Protocol","directories":{},"_nodeVersion":"20.17.0","dependencies":{"viem":"2.43.2","dotenv":"^16.3.1","@opentelemetry/api":"^1.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ethers":"^6.16.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/minimatch":"^5.1.2","@opentelemetry/sdk-trace-base":"^2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/agreements-protocol-evm_0.1.3_1779851366885_0.40996751679712706","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to @shodai-network/agreements-protocol-evm. Install that instead; this package is no longer updated."},"0.1.4":{"name":"@cns-labs/agreements-protocol-evm","version":"0.1.4","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"author":{"name":"CNS Labs"},"license":"Apache-2.0","_id":"@cns-labs/agreements-protocol-evm@0.1.4","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"dist":{"shasum":"2a75f12107ebebaa8453d36b6eacbcdecc52d42c","tarball":"https://registry.npmjs.org/@cns-labs/agreements-protocol-evm/-/agreements-protocol-evm-0.1.4.tgz","fileCount":110,"integrity":"sha512-bGQVRUGqQ4jWFytCauCJkyDkvg3rzXmP/y9tUIRnwr1zswVtSUPWXuK42NFViXjU081XEGP9OW1SpdHelvGupQ==","signatures":[{"sig":"MEUCIQCzuGAldW7xSuDgpeRmdTfsO1tuN3UgSfDhfSxsswQJjwIgI8UtTa0mbIpITzXq9GsmAbhr9DDMkMywYOLmDk+tgBk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":654126},"main":"./dist/cjs/index.js","_from":"file:cns-labs-agreements-protocol-evm-0.1.4.tgz","types":"./dist/esm/index.d.ts","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"lint":"tsc --noEmit","test":"jest","build":"npm run clean && npm run build:inline-json && npm run build:esm && npm run build:cjs && npm run build:module-markers","clean":"rm -rf dist","build:cjs":"tsc -p tsconfig.cjs.json","build:esm":"tsc -p tsconfig.esm.json","test:watch":"jest --watch","build:inline-json":"node scripts/inline-json.mjs","build:module-markers":"node scripts/write-module-markers.mjs"},"_npmUser":{"name":"devs-cns-labs","email":"dev@cnslabs.io"},"_resolved":"/private/var/folders/wn/_d0_dlnn6lj42yqnczjd6hfw0000gn/T/51ddc7b0de21507b333c44009960669a/cns-labs-agreements-protocol-evm-0.1.4.tgz","_integrity":"sha512-bGQVRUGqQ4jWFytCauCJkyDkvg3rzXmP/y9tUIRnwr1zswVtSUPWXuK42NFViXjU081XEGP9OW1SpdHelvGupQ==","_npmVersion":"10.8.2","description":"TypeScript SDK for the Agreements Protocol","directories":{},"_nodeVersion":"20.17.0","dependencies":{"viem":"2.43.2","dotenv":"^16.3.1","@opentelemetry/api":"^1.9.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","jest":"^29.7.0","ethers":"^6.16.0","ts-jest":"^29.1.1","typescript":"^5.3.3","@types/jest":"^29.5.11","@types/node":"^20.10.6","@types/minimatch":"^5.1.2","@opentelemetry/sdk-trace-base":"^2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/agreements-protocol-evm_0.1.4_1781174252698_0.8401964841325511","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to @shodai-network/agreements-protocol-evm. Install that instead; this package is no longer updated."}},"time":{"created":"2026-04-23T21:31:30.558Z","modified":"2026-08-06T17:49:39.373Z","1.0.0":"2026-04-21T01:13:09.735Z","1.0.1":"2026-04-21T11:41:19.606Z","1.0.2":"2026-04-21T15:00:41.140Z","0.0.1":"2026-04-23T21:31:30.851Z","0.0.2":"2026-04-29T21:33:31.682Z","0.1.2":"2026-05-02T19:06:12.975Z","0.1.3":"2026-05-27T03:09:27.053Z","0.1.4":"2026-06-11T10:37:32.859Z"},"author":{"name":"CNS Labs"},"license":"Apache-2.0","keywords":["cns-labs","agreements-protocol","ethereum","evm","typescript"],"description":"TypeScript SDK for the Agreements Protocol","maintainers":[{"name":"devs-cns-labs","email":"dev@cnslabs.io"}],"readme":"# Agreements Protocol - TypeScript SDK\n\nThis directory contains the TypeScript SDK for transforming agreement JSON into on-chain parameters and interacting with deployed agreement contracts.\n\nThis package is licensed under `Apache-2.0`. It is intended to remain redistributable independently of the BUSL-licensed core contract implementations.\n\n## Setup\n\n```bash\nnpm ci\n```\n\nThe SDK build inlines ABIs and deployment metadata from `../contracts`, so compile the contracts first in a fresh clone:\n\n```bash\nnpm --prefix ../contracts run compile\n```\n\n## Development\n\n### Build\n\n```bash\nnpm run build\n```\n\n### Run Tests\n\n```bash\nnpm run test\n```\n\n### Watch Mode\n\n```bash\nnpm run test:watch\n```\n\n## Usage\n\nOnce built, you can import and use the SDK.\n\n### Creating Agreements\n\n```typescript\nimport { AgreementFactory } from \"@cns-labs/agreements-protocol-evm\";\nimport { createPublicClient, createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst publicClient = createPublicClient({\n  transport: http(\"http://127.0.0.1:8545\"),\n});\n\nconst walletClient = createWalletClient({\n  account: privateKeyToAccount(\"0x...\"),\n  transport: http(\"http://127.0.0.1:8545\"),\n});\n\nconst factory = new AgreementFactory(\n  { factoryAddress: \"0x...\" },\n  { publicClient, walletClient },\n);\n\nconst { address } = await factory.createAgreement(agreementJson, {\n  initValues: {\n    grantorEthAddress: \"0x123...\",\n    recipientEthAddress: \"0x456...\",\n  },\n});\n```\n\n### Interacting With Agreements\n\n```typescript\nimport { AgreementEngine } from \"@cns-labs/agreements-protocol-evm\";\nimport { createPublicClient, createWalletClient, http } from \"viem\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst publicClient = createPublicClient({\n  transport: http(\"http://127.0.0.1:8545\"),\n});\n\nconst walletClient = createWalletClient({\n  account: privateKeyToAccount(\"0x...\"),\n  transport: http(\"http://127.0.0.1:8545\"),\n});\n\nconst agreement = new AgreementEngine(\"0x...\", publicClient, walletClient);\n\nawait agreement.submitInput(agreementJson, \"grantorData\", {\n  grantorName: \"Alice\",\n  scope: \"Development of Web3 tooling\",\n});\n\nconst readOnlyAgreement = new AgreementEngine(\"0x...\", publicClient);\nconst state = await readOnlyAgreement.getCurrentState();\nconst data = await readOnlyAgreement.getData();\n```\n\n## License\n\nThe SDK package is licensed under `Apache-2.0`. See [`LICENSE`](LICENSE), [`NOTICE`](NOTICE), [../licenses/Apache-2.0.txt](../licenses/Apache-2.0.txt), and [../LICENSING.md](../LICENSING.md).\n","readmeFilename":"README.md"}