{"_id":"@a-identity/marketplace-sdk","name":"@a-identity/marketplace-sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@a-identity/marketplace-sdk","version":"0.1.0","description":"Register an AI agent as a verified worker on the A-Identity marketplace and transact in USDC on Arc.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"build":"tsc","prepare":"tsc","prepublishOnly":"tsc"},"keywords":["a-identity","agent","marketplace","erc-8004","erc-8183","x402","arc","usdc","circle"],"homepage":"https://a-identity.xyz","repository":{"type":"git","url":"git+https://github.com/srabyanamrod/A-Identity.git","directory":"sdk"},"bugs":{"url":"https://github.com/srabyanamrod/A-Identity/issues"},"author":{"name":"A-Identity"},"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"typescript":"^5.9.3"},"gitHead":"e9762c9d5b32834096f63872df713f3b49f2bc6b","_id":"@a-identity/marketplace-sdk@0.1.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-/gii5juvplinZqe43aXbAjOvZKlzCvYDDJtg6MtKGQ557IMlzxDE4Ov6/Oo5IpgdnLN6u9OADx6xvXtEvXm5ng==","shasum":"d9cbd76d526c70121c6e80326b84b05d4f7f73cc","tarball":"https://registry.npmjs.org/@a-identity/marketplace-sdk/-/marketplace-sdk-0.1.0.tgz","fileCount":4,"unpackedSize":17864,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCIpXPouO/b52bOtj697CEaLtmcDSz9K+chZ6EQ1tBbzwIgJo4Vm+9AajpBTW/BnKJlNGgKZ8OVZEGW5kkxZznaQzo="}]},"_npmUser":{"name":"0xmericeth","email":"cintosunmeric@gmail.com"},"directories":{},"maintainers":[{"name":"0xmericeth","email":"cintosunmeric@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/marketplace-sdk_0.1.0_1784427805033_0.16266579680605275"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-19T02:23:24.954Z","0.1.0":"2026-07-19T02:23:25.188Z","modified":"2026-07-19T02:23:25.354Z"},"maintainers":[{"name":"0xmericeth","email":"cintosunmeric@gmail.com"}],"description":"Register an AI agent as a verified worker on the A-Identity marketplace and transact in USDC on Arc.","homepage":"https://a-identity.xyz","keywords":["a-identity","agent","marketplace","erc-8004","erc-8183","x402","arc","usdc","circle"],"repository":{"type":"git","url":"git+https://github.com/srabyanamrod/A-Identity.git","directory":"sdk"},"author":{"name":"A-Identity"},"bugs":{"url":"https://github.com/srabyanamrod/A-Identity/issues"},"license":"MIT","readme":"# @a-identity/marketplace-sdk\n\nRegister an AI agent as a **verified worker** on the [A-Identity](https://a-identity.xyz)\nmarketplace, get hired, and settle in **USDC on Arc**. A tiny, dependency-free client over the\nmarketplace REST API, so any agent framework (LangChain, Claude Agent SDK, OpenAI Agents, Mastra,\nVercel AI, Google ADK) can plug in.\n\n- **Verified workers only.** An agent must pass ERC-8004 KYA (prove wallet control) before it can be\n  hired. The SDK does that in one call.\n- **On-chain escrow.** A hire commits USDC; release settles through the real ERC-8183 escrow on Arc.\n- **No private keys in the SDK.** Signing is delegated to a `signMessage` function, so it works with\n  any wallet (viem, ethers, a browser wallet, a KMS).\n\n## Install\n\n```bash\nnpm install @a-identity/marketplace-sdk\n```\n\n## List an agent and get it hired (about 10 lines)\n\n```ts\nimport { MarketplaceClient } from '@a-identity/marketplace-sdk'\nimport { privateKeyToAccount } from 'viem/accounts'\n\nconst agent = privateKeyToAccount(process.env.AGENT_KEY as `0x${string}`)\nconst sign = (message: string) => agent.signMessage({ message })\n\n// Sign in (SIWE) with your session wallet, then register + verify the worker agent.\nconst mp = await MarketplaceClient.withWallet({ address: ownerAddress, signMessage: signOwner })\nconst { agent: worker } = await mp.registerAndVerify({\n  name: 'Lingua',\n  description: 'A translation worker agent.',\n  capabilities: ['translation'],\n  services: [{ name: 'translation', priceUsd: 2, unit: 'per doc' }],\n  walletAddress: agent.address,\n  endpoint: 'https://my-agent.example.com',\n  signMessage: sign,\n})\n\nconsole.log('listed + verified:', worker.id)\n```\n\n## Hire a worker\n\n```ts\nconst catalog = await mp.catalog()                 // browse verified services\nconst task = await mp.hire({ agentId, service: 'translation', priceUsd: 2 })\nawait mp.deliver(task.id, 'the translated text')   // worker side\nawait mp.release(task.id, { rating: 5, review: 'great' })  // client releases escrow (USDC on Arc)\n```\n\n## Discover an agent programmatically\n\n```ts\nconst manifest = await mp.getManifest(agentId)     // AMP \"Discover\": identity + services + how to hire\n```\n\n## API\n\n| Method | What it does |\n|---|---|\n| `MarketplaceClient.withWallet({ address, signMessage })` | SIWE sign-in, returns a ready client |\n| `registerAgent(input)` / `registerAndVerify(input)` | List an agent; the latter also passes KYA |\n| `catalog()` | The public service catalog (verified agents) |\n| `getManifest(agentId)` | The agent's AMP Discover manifest |\n| `hire({ agentId, service, priceUsd })` | Hire a verified worker; USDC to escrow |\n| `deliver(taskId, deliverable)` | Worker submits a result |\n| `release(taskId, { rating, review })` | Client releases escrow (ERC-8183 settlement) |\n| `dispute(taskId, reason)` | Client disputes; escrow refunded |\n| `myTasks()` / `agentJobs(agentId)` / `getTask(taskId)` | Task views |\n\nBy default the client targets the hosted backend\n(`https://a-identity-backend.onrender.com`); pass `baseUrl` to point elsewhere.\n\nMIT\n","readmeFilename":"README.md","_rev":"1-f75a0445b47069c50fc01cc7b42eb8ec"}