|
| 1 | +# Insumer Action Provider |
| 2 | + |
| 3 | +This directory contains the InsumerAPI action provider implementation, which provides actions for privacy-preserving on-chain wallet verification, trust profiling, and discount code validation across 32 chains (30 EVM + Solana + XRPL). |
| 4 | + |
| 5 | +## Directory Structure |
| 6 | + |
| 7 | +``` |
| 8 | +insumer/ |
| 9 | +├── constants.ts # API base URL and error messages |
| 10 | +├── insumerActionProvider.test.ts # Tests for the provider |
| 11 | +├── insumerActionProvider.ts # Main provider with InsumerAPI functionality |
| 12 | +├── index.ts # Main exports |
| 13 | +├── README.md # Documentation |
| 14 | +├── schemas.ts # Zod input schemas for all actions |
| 15 | +└── types.ts # TypeScript interfaces for API responses |
| 16 | +``` |
| 17 | + |
| 18 | +## Setup |
| 19 | + |
| 20 | +1. Get a free API key at [insumermodel.com/developers](https://insumermodel.com/developers/) |
| 21 | +2. Set the `INSUMER_API_KEY` environment variable, or pass `apiKey` in the config |
| 22 | + |
| 23 | +```typescript |
| 24 | +import { insumerActionProvider } from "@coinbase/agentkit"; |
| 25 | + |
| 26 | +// Via environment variable |
| 27 | +const provider = insumerActionProvider(); |
| 28 | + |
| 29 | +// Via config |
| 30 | +const provider = insumerActionProvider({ apiKey: "insr_live_..." }); |
| 31 | +``` |
| 32 | + |
| 33 | +## Actions |
| 34 | + |
| 35 | +- `verify_wallet`: Verify on-chain wallet conditions with boolean attestations |
| 36 | + |
| 37 | + - Checks token balances, NFT ownership, EAS attestations, Farcaster IDs |
| 38 | + - Returns ECDSA-signed booleans, never raw balances |
| 39 | + - Supports compliance templates (e.g. `coinbase_verified_account`) |
| 40 | + - 1 credit per call (2 with Merkle proofs) |
| 41 | + |
| 42 | +- `get_wallet_trust_profile`: Generate a wallet trust profile |
| 43 | + |
| 44 | + - 17 checks across 4 dimensions: stablecoins, governance, NFTs, staking |
| 45 | + - ECDSA-signed and independently verifiable |
| 46 | + - 3 credits per call (6 with Merkle proofs) |
| 47 | + |
| 48 | +- `get_batch_wallet_trust_profiles`: Batch trust profiles for up to 10 wallets |
| 49 | + |
| 50 | + - 5-8x faster than sequential calls |
| 51 | + - Supports partial success |
| 52 | + - 3 credits per wallet |
| 53 | + |
| 54 | +- `validate_discount_code`: Validate an INSR-XXXXX discount code |
| 55 | + |
| 56 | + - No API key required (public endpoint) |
| 57 | + - Returns validity, discount percentage, and expiration |
| 58 | + |
| 59 | +- `list_compliance_templates`: List available EAS compliance templates |
| 60 | + - No API key required (public endpoint) |
| 61 | + - Coinbase Verifications and Gitcoin Passport templates |
| 62 | + |
| 63 | +## Supported Chains |
| 64 | + |
| 65 | +30 EVM chains: Ethereum, BNB Chain, Base, Avalanche, Polygon, Arbitrum, Optimism, Chiliz, Soneium, Plume, World Chain, Sonic, Gnosis, Mantle, Scroll, Linea, zkSync Era, Blast, Taiko, Ronin, Celo, Moonbeam, Moonriver, Viction, opBNB, Unichain, Ink, Sei, Berachain, ApeChain. Plus Solana and XRPL (32 total). |
| 66 | + |
| 67 | +## Pricing |
| 68 | + |
| 69 | +- Free tier: 100 credits, no credit card required |
| 70 | +- 25 credits per 1 USDC ($0.04/credit) |
| 71 | +- Attestation: 1 credit (2 with Merkle proofs) |
| 72 | +- Trust profile: 3 credits (6 with Merkle proofs) |
| 73 | +- Public endpoints (validate_discount_code, list_compliance_templates): free |
| 74 | + |
| 75 | +## Links |
| 76 | + |
| 77 | +- [Developer Documentation](https://insumermodel.com/developers/) |
| 78 | +- [API Reference](https://insumermodel.com/developers/api-reference/) |
| 79 | +- [OpenAPI Spec](https://insumermodel.com/openapi.yaml) |
| 80 | +- [MCP Server](https://www.npmjs.com/package/mcp-server-insumer) |
| 81 | +- [LangChain Integration](https://pypi.org/project/langchain-insumer/) |
| 82 | + |
| 83 | +## Examples |
| 84 | + |
| 85 | +### Verifying Coinbase KYC Status |
| 86 | + |
| 87 | +``` |
| 88 | +Prompt: "Check if wallet 0xd8dA...96045 has Coinbase KYC verification on Base" |
| 89 | +
|
| 90 | +The agent will call verify_wallet with: |
| 91 | +- wallet: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" |
| 92 | +- conditions: [{ type: "eas_attestation", template: "coinbase_verified_account" }] |
| 93 | +``` |
| 94 | + |
| 95 | +### Getting a Wallet Trust Profile |
| 96 | + |
| 97 | +``` |
| 98 | +Prompt: "What's the trust profile for vitalik.eth?" |
| 99 | +
|
| 100 | +The agent will call get_wallet_trust_profile with: |
| 101 | +- wallet: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" |
| 102 | +``` |
| 103 | + |
| 104 | +### Batch Trust Profiling |
| 105 | + |
| 106 | +``` |
| 107 | +Prompt: "Compare trust profiles for these 3 wallets: 0xd8dA..., 0xAb58..., 0x7a25..." |
| 108 | +
|
| 109 | +The agent will call get_batch_wallet_trust_profiles with: |
| 110 | +- wallets: [{ wallet: "0xd8dA..." }, { wallet: "0xAb58..." }, { wallet: "0x7a25..." }] |
| 111 | +``` |
0 commit comments