Skip to content

Commit e8cf2ff

Browse files
Add InsumerAPI action provider for on-chain wallet verification and trust profiles
Privacy-preserving on-chain verification across 32 chains (30 EVM + Solana + XRPL). Returns ECDSA-signed boolean attestations — never exposes raw wallet balances. 5 actions: - verify_wallet: 1-10 conditions per call, optional Merkle proofs, JWT format - get_wallet_trust_profile: 17 checks across 4 dimensions (stablecoins, governance, NFTs, staking) - get_batch_wallet_trust_profiles: up to 10 wallets, 5-8x faster than sequential - validate_discount_code: public endpoint, no API key required - list_compliance_templates: Coinbase Verifications + Gitcoin Passport templates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e014aeb commit e8cf2ff

9 files changed

Lines changed: 1259 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@coinbase/agentkit": patch
3+
---
4+
5+
Added InsumerAPI action provider for on-chain wallet verification and trust profiles

typescript/agentkit/src/action-providers/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export * from "./enso";
1515
export * from "./erc20";
1616
export * from "./erc721";
1717
export * from "./farcaster";
18+
export * from "./insumer";
1819
export * from "./jupiter";
1920
export * from "./messari";
2021
export * from "./pyth";
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* Base URL for the InsumerAPI
3+
*/
4+
export const INSUMER_API_BASE_URL = "https://api.insumermodel.com";
5+
6+
/**
7+
* Default error message when API key is missing
8+
*/
9+
export const INSUMER_API_KEY_MISSING_ERROR =
10+
"INSUMER_API_KEY is not configured. Get a free key at https://insumermodel.com/developers/";
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from "./insumerActionProvider";
2+
export * from "./schemas";
3+
export * from "./types";
4+
export * from "./constants";

0 commit comments

Comments
 (0)