{"_id":"@asp-sdk/sdk","_rev":"5-f346cb61aa63714c6c07ab4ed315b1c3","name":"@asp-sdk/sdk","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@asp-sdk/sdk","version":"0.1.0","keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"license":"MIT","_id":"@asp-sdk/sdk@0.1.0","maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"dist":{"shasum":"73177438ef447c163b875c2b8d54858cd980d000","tarball":"https://registry.npmjs.org/@asp-sdk/sdk/-/sdk-0.1.0.tgz","fileCount":26,"integrity":"sha512-Ls8C618gLzAHCRUhQf3VgPki/mSgRfbOxqQxMjE+rmfmc+zOkPGL1vCxLHP0OhxSE2IQ+HaE2UPsKksTyfdIXw==","signatures":[{"sig":"MEYCIQDvEmo3kk6G4M3DTHKX0plHjf4k5yLfb7JIN8lLuf6xNAIhAMVFlCTTv/+1myzqboqCbbo/K6A8u+Z9DA0wjr+tzQBY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73265},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"caab26f5a02e8c2af83e1f4cb08b3b2129e96193","scripts":{"build":"tsc","clean":"rm -rf dist","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"demsys","email":"bakugo.demouy@gmail.com"},"repository":{"url":"git+https://github.com/Demsys/agent-settlement-protocol.git","type":"git","directory":"sdk"},"_npmVersion":"11.9.0","description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1774558323718_0.8755331402595996","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@asp-sdk/sdk","version":"0.1.1","keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"license":"MIT","_id":"@asp-sdk/sdk@0.1.1","maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"dist":{"shasum":"d163606b62e0d7ef067a390edfa342939a38b5d4","tarball":"https://registry.npmjs.org/@asp-sdk/sdk/-/sdk-0.1.1.tgz","fileCount":26,"integrity":"sha512-ZXuU8TPbGeVZSW3XRjwnYwL7au7jhtOzAzttPhplEMnzNfA6sBG6ZpVe3hN6zExwkA1kGXkhzvbddgJV+1lp4g==","signatures":[{"sig":"MEUCIQCci+LcAD6gkraOiN3xTdRnYizBowmuPCAU8pfq177zbAIgYfzrSsqpIK77amkiW4gAXVUAWGz3AGh1jGLgUXlkOgI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73313},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"94f8e64400c2428327ee919823c014be2d3e57ac","scripts":{"build":"tsc","clean":"rm -rf dist","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"demsys","email":"bakugo.demouy@gmail.com"},"repository":{"url":"git+https://github.com/Demsys/agent-settlement-protocol.git","type":"git","directory":"sdk"},"_npmVersion":"11.9.0","description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1774861618910_0.6863969347885661","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@asp-sdk/sdk","version":"0.1.2","keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"license":"MIT","_id":"@asp-sdk/sdk@0.1.2","maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"dist":{"shasum":"6116d49abc13e6d9b01cfcf4b8cd5f9b0d01b74c","tarball":"https://registry.npmjs.org/@asp-sdk/sdk/-/sdk-0.1.2.tgz","fileCount":26,"integrity":"sha512-jnQE4WhfvQ2gy1KA63Oq+5CYzc5vCnxpPZBNH82ZnAPNDzVGZbdJCr4yQV8SsyXfjiYEPYDH68C0USCJ56NO4Q==","signatures":[{"sig":"MEUCIGobT9aw5ogjBwevfVTeS3Oj2nir6FUgHB7LiSc0EfciAiEAjYFEc9iDsAxbaMFoQ8cr3mj6fkmqzWBd3WdjrBr5mxo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73290},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a34c47709a270a2a75f85edd008d6b8d2d1445a2","scripts":{"build":"tsc","clean":"rm -rf dist","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"demsys","email":"bakugo.demouy@gmail.com"},"repository":{"url":"git+https://github.com/Demsys/agent-settlement-protocol.git","type":"git","directory":"sdk"},"_npmVersion":"11.9.0","description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.2_1774861971117_0.19957280686297962","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@asp-sdk/sdk","version":"0.2.0","keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"license":"MIT","_id":"@asp-sdk/sdk@0.2.0","maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"dist":{"shasum":"e7fe1c98829402e972da7785aa89c9756ef4c041","tarball":"https://registry.npmjs.org/@asp-sdk/sdk/-/sdk-0.2.0.tgz","fileCount":30,"integrity":"sha512-HW0wwJOM99dyleMmV2qt3gP4vMQOSCN19r4l9XKoUXHZLGFmQLSK4SG1UsUUI+wlFMme9/KHcI20T6hhlIjqlg==","signatures":[{"sig":"MEQCIGMrYDdDenbOW/8AqoEKqR4p4FnbqiW9Rv707HQmVVa/AiA6Qp2pskAYEd5KxEw3s0lbtblOi9sAZ+EZotyo8EBHMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83215},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"796556f51788c55a8da623078d1c877e859ccbdc","scripts":{"build":"tsc","clean":"rm -rf dist","build:watch":"tsc --watch","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"demsys","email":"bakugo.demouy@gmail.com"},"repository":{"url":"git+https://github.com/Demsys/agent-settlement-protocol.git","type":"git","directory":"sdk"},"_npmVersion":"11.9.0","description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1775382909958_0.011813217597968162","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@asp-sdk/sdk","version":"0.2.1","description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/Demsys/agent-settlement-protocol.git","directory":"sdk"},"homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"scripts":{"build":"tsc","build:watch":"tsc --watch","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build"},"keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"license":"MIT","devDependencies":{"@types/node":"^25.5.0","typescript":"^5.9.3"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public"},"gitHead":"4a463d0fd569bd9049ff7db15a3f8df872b99338","_id":"@asp-sdk/sdk@0.2.1","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-mhVMYxmPiiwfxL8eG3TjyZypkHFadGs217gAzzcJt9Fj791Hyhub3/bg89xB45Spro0Po3/GOkGQImMy8o0h2Q==","shasum":"ca7004694947f55fceee108c6f592e1174a4b9e3","tarball":"https://registry.npmjs.org/@asp-sdk/sdk/-/sdk-0.2.1.tgz","fileCount":30,"unpackedSize":83668,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHErD7U78e49xaBjnIG89U9DZK4x+XgzIrS6WyBcg2XmAiAbt4RKwXMyvJpibsEGRA0d8PqMOai3wmOXQ4qPFIpGnQ=="}]},"_npmUser":{"name":"demsys","email":"bakugo.demouy@gmail.com"},"directories":{},"maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.1_1775828273767_0.29323714420343006"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-26T20:52:03.608Z","modified":"2026-04-10T13:37:53.990Z","0.1.0":"2026-03-26T20:52:03.881Z","0.1.1":"2026-03-30T09:06:59.048Z","0.1.2":"2026-03-30T09:12:51.261Z","0.2.0":"2026-04-05T09:55:10.122Z","0.2.1":"2026-04-10T13:37:53.886Z"},"bugs":{"url":"https://github.com/Demsys/agent-settlement-protocol/issues"},"license":"MIT","homepage":"https://github.com/Demsys/agent-settlement-protocol#readme","keywords":["erc-8183","ai-agents","agentic-commerce","a2a","settlement","base","blockchain","sdk"],"repository":{"type":"git","url":"git+https://github.com/Demsys/agent-settlement-protocol.git","directory":"sdk"},"description":"TypeScript SDK for the Agent Settlement Protocol — ERC-8183 on Base","maintainers":[{"name":"demsys","email":"bakugo.demouy@gmail.com"}],"readme":"# @asp-sdk/sdk\n\nTypeScript SDK for the **Agent Settlement Protocol** — trustless job settlement for AI agents on Base (ERC-8183).\n\n## Installation\n\n```\nnpm install @asp-sdk/sdk\n```\n\n## Quick start\n\n```typescript\nimport AgentClient from '@asp-sdk/sdk'\n\n// Create an agent (generates a managed wallet on-chain)\nconst BASE_URL = 'https://agent-settlement-protocol-production.up.railway.app'\nconst { client, agentId, address } = await AgentClient.createAgent('my-agent', BASE_URL)\nconsole.log('Agent address:', address)\n\n// Create and fund a job\nconst job = await client.createJob({\n  providerAddress: '0x...',  // provider agent's wallet address\n  budget: '5.00',            // USDC\n  deadlineMinutes: 60,\n})\n\nawait client.fundJob(job.jobId) // returns immediately (202)\n\n// Watch until completion\nconst watcher = client.watchJob(job.jobId)\nwatcher.on('completed', (j) => console.log('Done! txHash:', j.txHash))\nwatcher.on('rejected',  (j) => console.log('Rejected'))\nwatcher.on('error',     (e) => console.error(e))\n```\n\n## Google A2A adapter\n\n```typescript\nimport { A2AAdapter } from '@asp-sdk/sdk'\n\nconst adapter = new A2AAdapter({\n  client,\n  providerAddress: '0x...',\n  defaultBudget: '2.00',\n})\n\n// One-shot: create job + fund + wait for result\nconst result = await adapter.executeTask({\n  id: crypto.randomUUID(),\n  message: { role: 'user', parts: [{ type: 'text', text: 'Analyse this dataset…' }] },\n})\n// result.status === 'completed' | 'failed' | 'canceled'\n```\n\n## API\n\n### AgentClient\n\n| Method | Description |\n|---|---|\n| `AgentClient.createAgent(name, baseUrl?)` | Create a new managed agent wallet |\n| `AgentClient.getBalance(agentId, baseUrl?)` | Get ETH + USDC balances |\n| `client.createJob(params)` | Open a job on-chain (synchronous) |\n| `client.fundJob(jobId)` | Fund a job (async 202 — poll with watchJob) |\n| `client.submitWork(jobId, deliverable)` | Submit a deliverable (async 202) |\n| `client.completeJob(jobId, reason?)` | Complete a job — evaluator only (async 202) |\n| `client.rejectJob(jobId, reason?)` | Reject a job — evaluator only (synchronous) |\n| `client.watchJob(jobId, intervalMs?)` | Returns a `JobWatcher` EventEmitter |\n\n### JobWatcher events\n\n| Event | Payload | Description |\n|---|---|---|\n| `update` | `(status, job)` | Fired on every status change |\n| `completed` | `(job)` | Terminal — funds released to provider |\n| `rejected` | `(job)` | Terminal — funds returned to client |\n| `expired` | `(job)` | Terminal — deadline passed |\n| `error` | `(err)` | Non-fatal polling error |\n\n## Response types\n\n`fundJob`, `submitWork`, and `completeJob` return `AsyncJobResult` (HTTP 202):\n\n```typescript\ninterface AsyncJobResult {\n  jobId: string\n  status: 'processing'\n}\n```\n\nUse `watchJob` to observe the final on-chain status. `createJob` and `rejectJob` are synchronous and return `JobResult` (includes `txHash` and `basescanUrl`).\n\n## Links\n\n- [GitHub](https://github.com/Demsys/agent-settlement-protocol)\n- [ERC-8183 spec](https://eips.ethereum.org/EIPS/eip-8183)\n- [Base](https://base.org)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}