LlamaIndex tool spec for InsumerAPI — wallet auth and condition-based access across 33 blockchains
Project description
LlamaIndex Tools Integration: InsumerAPI
Wallet auth and condition-based access for LlamaIndex agents. Across 33 blockchains — read → evaluate → sign, returning an ECDSA-signed boolean your agent can verify offline against the public JWKS. Boolean, not balance: the API never exposes wallet holdings, only a signed yes-or-no against the conditions you configure.
Part of InsumerAPI. No secrets. No identity-first. No static credentials.
Installation
pip install llama-index-tools-insumer
Quickstart
Get a free API key at insumermodel.com/developers/ (no credit card required for the free tier):
curl -X POST https://api.insumermodel.com/v1/keys/create \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "appName": "my-agent", "tier": "free"}'
Then use the tool spec in any LlamaIndex agent:
from llama_index.tools.insumer import InsumerToolSpec
from llama_index.agent.openai import OpenAIAgent
insumer = InsumerToolSpec(api_key="insr_live_...")
agent = OpenAIAgent.from_tools(
insumer.to_tool_list(),
verbose=True,
)
agent.chat(
"Does wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 "
"hold at least 100 USDC on Base?"
)
The four tools
attest_wallet
Run wallet attestation against 1–10 conditions. Returns an ECDSA-signed verdict per condition plus a condition hash for tamper detection.
Supported condition types:
token_balance— ERC-20/SPL/XRPL trust line / native BTC ≥ thresholdnft_ownership— ERC-721/ERC-1155/XRPL NFToken holdingeas_attestation— EAS schema check (pass atemplatelikecoinbase_verified_accountor a rawschemaId)farcaster_id— Farcaster ID registered on Optimism
insumer.attest_wallet(
wallet="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
conditions=[
{
"type": "token_balance",
"contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"chainId": 8453,
"threshold": 100,
"decimals": 6,
"label": "USDC on Base >= 100",
},
],
)
Response shape:
{
"ok": True,
"data": {
"attestation": {
"id": "ATST-...",
"pass": True,
"results": [...], # per-condition booleans + conditionHash
"passCount": 1,
"failCount": 0,
"attestedAt": "2026-04-16T...",
"expiresAt": "2026-04-16T...", # +30 min
},
"sig": "...", # ECDSA P-256 signature, base64
"kid": "insumer-attest-v1",
},
"meta": {"creditsRemaining": ..., "creditsCharged": 1, ...},
}
Costs 1 credit per call (2 with proof="merkle" for EIP-1186 storage proofs).
get_trust_profile
Multi-dimensional wallet trust profile — stablecoins, governance, NFTs, staking (plus Solana, XRPL, Bitcoin when those wallet addresses are supplied). Returns a signed summary showing which dimensions have activity, without exposing raw balances.
insumer.get_trust_profile(
wallet="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
solana_wallet="...", # optional
xrpl_wallet="r...", # optional
bitcoin_wallet="bc1q...", # optional
)
Costs 3 credits per call (6 with proof="merkle").
list_compliance_templates
Discover pre-configured EAS compliance templates (Coinbase Verified Account, Coinbase Verified Country, Coinbase One, Gitcoin Passport, etc.). No API key required.
templates = insumer.list_compliance_templates()
# Use a template name directly in attest_wallet:
insumer.attest_wallet(
wallet="0x...",
conditions=[{"type": "eas_attestation", "template": "coinbase_verified_account"}],
)
get_jwks
Fetch the public JWKS used to sign attestation and trust responses. Enables offline verification of any result with a standard JWT/JOSE library. No API key required.
jwks = insumer.get_jwks()
# {
# "keys": [
# {"kty": "EC", "crv": "P-256", "x": "...", "y": "...",
# "use": "sig", "alg": "ES256", "kid": "insumer-attest-v1"}
# ]
# }
Supported chains
33 total:
- 30 EVM chains: Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, BNB, Unichain, Linea, zkSync, Scroll, Blast, Mantle, Celo, Gnosis, Fantom, Sonic, Cronos, Moonbeam, and more
- Solana (mainnet)
- XRPL (mainnet) — native XRP plus trust-line tokens
- Bitcoin (mainnet) — native BTC only
Positioning
Wallet auth is the primitive. Condition-based access is the category. Token gating is one use case. The API turns a programmable predicate over on-chain state into a short-lived cryptographic artifact any service can verify.
- No secrets: conditions are public, the signature binds the condition hash.
- No identity-first: a wallet address and a condition are enough.
- No static credentials: every response has an expiry and is re-checkable.
Learn more
- Docs: insumermodel.com/developers/
- OpenAPI spec: insumermodel.com/openapi.yaml
- Public JWKS: api.insumermodel.com/.well-known/jwks.json
- Companion packages:
langchain-insumer(LangChain),mcp-server-insumer(Model Context Protocol),eliza-plugin-insumer(ElizaOS)
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_tools_insumer-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_tools_insumer-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8cd78c47154f361fa9f1a24471614f090c716acdac8880faa06b07cf63b4f6d
|
|
| MD5 |
69f7eeba5d49ae804fe85ea71290ec7c
|
|
| BLAKE2b-256 |
393de8ce3e2fe5dcf588de33a7b7867ab5df476e325e48bdafdc25c7c928aac1
|
File details
Details for the file llama_index_tools_insumer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_insumer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ebaef3ed18c2aec3e7ebfc2b34bd3ae982835a717f247c0834a0da57deefcb
|
|
| MD5 |
f515dacfd14758116bc29a38c595cfe2
|
|
| BLAKE2b-256 |
482b12cd50da94b2456e7b040a65467165d0160ccaffbabe7eeec705af7191be
|