@vohlsyr/plugin-chainscope
v0.3.1
Published
ElizaOS plugin for ChainScope: multi-chain wallet intelligence (Ethereum, Base, Arbitrum, Optimism, Polygon, Bitcoin, Solana) with OFAC sanctions screening, paid per call via x402 (USDC on Base).
Maintainers
Readme
@vohlsyr/plugin-chainscope
ElizaOS plugin for ChainScope -- multi-chain wallet and transaction intelligence across Ethereum, Base, Arbitrum, Optimism, Polygon, Bitcoin and Solana, with OFAC sanctions screening.
Paid per call via x402 -- USDC on Base, straight from the agent's own wallet. No API keys, no signup.
Actions
WALLET_SCAN
Native balance, token holdings, recent activity, USD value, and OFAC sanctions screening in one call. ~$0.03/call.
"scan this base wallet: 0x1f5f8474fA0dc1Fde79187abd68Ef8Ea15ADAe34"
TX_LOOKUP
Transaction status, from/to, value, fee, block, timestamp. ~$0.003/call.
"look up this base tx: 0x..."
Both actions require the chain to be named explicitly in the message (an
0x... address alone is ambiguous across 5 of the 7 supported chains) --
extractChain()/extractAddress() in src/util.ts are intentionally
conservative rather than guessing.
Setup
npm install @vohlsyr/plugin-chainscopeAdd to your character/project's plugin list, and set one secret:
EVM_PRIVATE_KEY=0x... # a wallet funded with a small amount of USDC on BaseThis is the same setting name ElizaOS's own @elizaos/plugin-evm uses, so an
agent that already has a funded wallet configured for other on-chain actions
picks it up automatically -- no second key to manage.
How it works
- The action calls the real endpoint (e.g.
POST /tools/wallet-scan). - The server responds
402 Payment Requiredwith the price and payment details. x402-fetchsigns and attaches a payment using the agent's wallet, and retries the request.- The server settles the payment and returns the real result.
Development
npm install
npm run typecheck
npm test # vitest -- mocks the x402-fetch boundary, exercises real
# chain/address-extraction/request-building/formatting logic
npm run buildThe plugin also bundles a zero-cost elizaos test case (chainscope plugin
sanity) that pings the service's free /healthz endpoint -- no wallet or
payment required for that one.
License
MIT
