{"_id":"@blockrun/elizaos-plugin","_rev":"2-8d3f37c64fc4930c787cb9e03488e122","name":"@blockrun/elizaos-plugin","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@blockrun/elizaos-plugin","version":"1.0.0","keywords":["elizaos","plugin","blockrun","x402","micropayments","ai","base","usdc"],"author":{"name":"BlockRun","email":"hello@blockrun.ai"},"license":"MIT","_id":"@blockrun/elizaos-plugin@1.0.0","maintainers":[{"name":"1bcmax","email":"viewitter@gmail.com"}],"homepage":"https://blockrun.ai","bugs":{"url":"https://github.com/blockrunai/elizaos-plugin-blockrun/issues"},"dist":{"shasum":"33419cbcf912429b5191c4977f0ff5499b81f672","tarball":"https://registry.npmjs.org/@blockrun/elizaos-plugin/-/elizaos-plugin-1.0.0.tgz","fileCount":6,"integrity":"sha512-L3PFuv1OAz94PZ9gMrFmF+G/iXtmQjE0SoTScsWFQ8ChDVICgYNYWxDH/n4gZhnvT9uhJ4UB64NDjhOazP4V3g==","signatures":[{"sig":"MEUCIClPbC27qIeq1Zh0CPCPFKzczgXFkmtybuKh06WgdrRXAiEA/6R1C5Dm6el1hsr/Zrpiikh6hLQiqnORHLD8sQEtmvA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32401},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"gitHead":"226bba1ac74e41abf663d802aaaca94b28a6ef74","scripts":{"dev":"tsup --watch","test":"bun test","build":"tsup","clean":"rm -rf dist node_modules","test:e2e":"bun run test-e2e.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"1bcmax","email":"viewitter@gmail.com"},"repository":{"url":"git+https://github.com/blockrunai/elizaos-plugin-blockrun.git","type":"git"},"_npmVersion":"10.3.0","description":"BlockRun x402 pay-per-request AI plugin for ElizaOS - enables agents to make micropayments for AI API calls on Base","directories":{},"_nodeVersion":"20.5.0","dependencies":{"viem":"^2.21.0","@blockrun/llm":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","typescript":"^5.7.2","@types/node":"^22.10.1","@elizaos/core":"^1.0.0"},"peerDependencies":{"@elizaos/core":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/elizaos-plugin_1.0.0_1768235352045_0.21941957757345532","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-12T16:29:11.899Z","modified":"2026-06-25T04:36:15.418Z","1.0.0":"2026-01-12T16:29:12.180Z"},"bugs":{"url":"https://github.com/blockrunai/elizaos-plugin-blockrun/issues"},"author":{"name":"BlockRun","email":"hello@blockrun.ai"},"license":"MIT","homepage":"https://blockrun.ai","keywords":["elizaos","plugin","blockrun","x402","micropayments","ai","base","usdc"],"repository":{"url":"git+https://github.com/blockrunai/elizaos-plugin-blockrun.git","type":"git"},"description":"BlockRun x402 pay-per-request AI plugin for ElizaOS - enables agents to make micropayments for AI API calls on Base","maintainers":[{"email":"andy@blockrun.ai","name":"killerqueenandy"},{"email":"viewitter@gmail.com","name":"1bcmax"}],"readme":"# @elizaos/plugin-blockrun\n\nPay-per-request AI for ElizaOS agents via x402 micropayments on Base.\n\n## Overview\n\nThis plugin enables ElizaOS agents to make LLM API calls using the [x402 protocol](https://x402.org), paying with USDC micropayments on Base chain. No API keys required - just a wallet with USDC.\n\n**Supported Models:**\n- OpenAI: gpt-4o, gpt-4o-mini\n- Anthropic: claude-sonnet-4, claude-3.5-haiku\n- Google: gemini-2.0-flash\n- And more via BlockRun gateway\n\n## Installation\n\n```bash\nnpm install @elizaos/plugin-blockrun\n# or\npnpm add @elizaos/plugin-blockrun\n```\n\n## Configuration\n\nSet your Base chain wallet private key:\n\n```env\nBASE_CHAIN_WALLET_KEY=0x...\n```\n\nOr in agent settings:\n\n```typescript\nconst agent = new Agent({\n  plugins: [blockrunPlugin],\n  settings: {\n    BASE_CHAIN_WALLET_KEY: '0x...',\n  },\n});\n```\n\n## Usage\n\n### Plugin Registration\n\n```typescript\nimport { blockrunPlugin } from '@elizaos/plugin-blockrun';\n\nconst agent = new Agent({\n  plugins: [blockrunPlugin],\n});\n```\n\n### Available Actions\n\n#### BLOCKRUN_CHAT\n\nMake a pay-per-request AI call:\n\n```typescript\n// The action is triggered when the agent needs to query an AI model\n// Payments are handled automatically via x402\n```\n\n### Available Providers\n\n#### BLOCKRUN_WALLET\n\nProvides wallet context to the agent:\n\n```typescript\n// Returns wallet address and USDC balance on Base\n// Useful for agents to understand their payment capacity\n```\n\n## How It Works\n\n1. Agent makes an AI request via BLOCKRUN_CHAT action\n2. BlockRun gateway returns 402 Payment Required with price\n3. Plugin automatically signs USDC payment (EIP-712)\n4. Request is retried with payment signature\n5. AI response is returned to the agent\n\nAll payments use USDC on Base chain. Typical cost: $0.001-0.01 per request.\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `BASE_CHAIN_WALLET_KEY` | Private key for Base chain wallet | Yes |\n| `BLOCKRUN_API_URL` | Custom API URL (default: https://blockrun.ai/api) | No |\n| `BLOCKRUN_DEFAULT_MODEL` | Default model (default: openai/gpt-4o-mini) | No |\n\n## Links\n\n- [BlockRun](https://blockrun.ai) - Pay-per-request AI gateway\n- [x402 Protocol](https://x402.org) - HTTP 402 micropayment standard\n- [ElizaOS](https://elizaos.ai) - AI agent framework\n\n## License\n\nMIT\n","readmeFilename":"README.md"}