{"_id":"@ampvaleo/amp-client","name":"@ampvaleo/amp-client","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@ampvaleo/amp-client","version":"0.2.0","description":"AMP Protocol - Client SDK for agents consuming paid services","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","clean":"rm -rf dist"},"dependencies":{"@ampvaleo/amp-core":"0.2.0","@coral-xyz/anchor":"^0.30.1","@solana/web3.js":"^1.95.0","@solana/spl-token":"^0.4.0","tweetnacl":"^1.0.3","bs58":"^5.0.0"},"gitHead":"045127dbc8b63477c035bd8e5068a80c3232a789","_id":"@ampvaleo/amp-client@0.2.0","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-y7kxh2AlRGiw1kGLkqZVYDJfCyHT4TMw4m+4Xq3A3mbmaGMqD8B0ljvcgGsCuetHPHotv8Gx5c9BZC7FgXh1eQ==","shasum":"096e5101d97f0aa932b6ef3de37f7e0120d69cd1","tarball":"https://registry.npmjs.org/@ampvaleo/amp-client/-/amp-client-0.2.0.tgz","fileCount":30,"unpackedSize":57945,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICRnVYM+wo5kQIGBrEhXr5yd5CaSpnwqFqQ61dozEeWAAiAf7Dc/gVtptPKFi+pjt81xclV/3QejnrjtYM4TtlWhGg=="}]},"_npmUser":{"name":"v402valeo","email":"valeobank@gmail.com"},"directories":{},"maintainers":[{"name":"v402valeo","email":"valeobank@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/amp-client_0.2.0_1774551026130_0.08107779929007752"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-26T18:50:26.005Z","0.2.0":"2026-03-26T18:50:26.299Z","modified":"2026-03-26T18:50:26.477Z"},"maintainers":[{"name":"v402valeo","email":"valeobank@gmail.com"}],"description":"AMP Protocol - Client SDK for agents consuming paid services","readme":"# @valeo/amp-client\n\nClient SDK for AI agents consuming AMP-enabled services. Automatic pricing discovery, channel lifecycle, and drop-in `fetch()` replacement.\n\n## Installation\n\n```bash\nnpm install @valeo/amp-client\n```\n\n## Quickstart\n\n```typescript\nimport { AMPClient } from \"@valeo/amp-client\";\nimport { Keypair, Connection } from \"@solana/web3.js\";\n\nconst amp = new AMPClient({\n  wallet: agentKeypair,\n  connection: new Connection(\"https://api.mainnet-beta.solana.com\"),\n  budget: 10.0,\n  token: \"USDC\",\n});\n\n// fetch() handles discovery, channel open, and credential signing\nconst res = await amp.fetch(\"https://api.example.com/v1/data\", {\n  method: \"POST\",\n  body: JSON.stringify({ query: \"test\" }),\n});\n\nconsole.log(res.ampBalance); // remaining channel balance\nconsole.log(await res.json());\n\n// Close all channels and recover remaining funds\nawait amp.closeAll();\n```\n\n### MCP Client\n\n```typescript\nimport { AMPMcpClient } from \"@valeo/amp-client\";\n\nconst client = new AMPMcpClient({\n  wallet: agentKeypair,\n  connection,\n  budget: 5.0,\n});\n\nawait client.connect(\"http://localhost:3000/mcp\");\n\nconst tools = client.listTools();\nconst result = await client.callTool(\"generate_image\", { prompt: \"a cat\" });\n\nawait client.close();\n```\n\nSee `examples/client-basic.ts` and `examples/mcp-client.ts` for complete examples.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-d566d27bf3f30d17fdbf6515458a75e9"}