ERC-8004 On-Chain Agent Identity
ERC-8004 is a token standard on Arc that gives each deployed agent a unique, verifiable on-chain identity. When your agent includes its ERC-8004 identity headers in an x402 request, API providers can:- Grant reputation-based discounts to agents with a strong payment history
- Enforce per-agent rate limits independent of IP address or API key
- Whitelist high-trust agents for access to restricted tiers
- Build trust graphs across multi-agent workflows
8004:<chainId>:<tokenId>. On Arc Mainnet, that looks like 8004:5042:1042 (Arc Testnet development uses 8004:5042002:<tokenId>).
Agents without an ERC-8004 identity can still call x402 endpoints — they are treated as anonymous callers. However, providers may apply stricter rate limits or decline to offer discounts to unidentified agents. Registering an on-chain identity is strongly recommended for production agents.
Required Request Headers
Every authenticated agent request must include three headers. These are sent alongside the standard HTTP request to any x402-protected endpoint:string
required
The agent’s ERC-8004 identity string in
8004:<chainId>:<tokenId> format. Identifies which on-chain agent is making the request.string
required
An EIP-712 signed timestamp that proves the request was authorized by the wallet controlling the agent’s ERC-8004 token. Prevents replay attacks.
string
required
A Circle payment authorization proof signed via the agent’s Circle Smart Contract Account (SCA) wallet. Circle operations are server-authorized — FlareHQ never exposes wallet private keys to you. This proof is what triggers USDC settlement on Arc Mainnet.
Getting an Agent Identity and Wallet
Before an agent can sign payment proofs, it needs a tokenId and a Circle SCA wallet. Deploy an agent through the FlareHQ API to provision both:tokenId and the Circle SCA wallet address your agent will use for payments. Signing is server-authorized through Circle Developer-Controlled Wallets — FlareHQ never exposes wallet private keys to you. Do not store or request private keys for these Circle-controlled wallets.
For a complete walkthrough of deploying and configuring agents, see Deploying Agents.
Calling a Marketplace Listing as an Agent
The FlareHQ SDK handles header construction, EIP-712 signing, and Circle Nanopayment proof generation automatically when you pass anagentId:
- Resolve the listing price and
payToaddress from the Marketplace - Sign a Circle Nanopayment authorization using the agent wallet
- Sign the EIP-712 timestamp payload for
X-Agent-Signature - Attach all three required headers and submit the request to
POST /api/x402/pay - Return the upstream API response in
result.data
Batch Execution
When an agent needs to call multiple listings in a single workflow, you can execute them concurrently usingPromise.all. Each call is independently settled — there is no batched payment transaction:
Direct REST Call (Without the SDK)
If you are building an agent runtime outside of Node.js, you can construct the payment headers manually and submit directly to the REST endpoint:X-Agent-Signature (EIP-712 signed current timestamp) and paymentProof (Circle Nanopayment authorization) values. The FlareHQ SDK handles this automatically — use it unless your runtime has a specific constraint.
Summary
All three headers are required for fully authenticated, reputation-tracked agent requests. The FlareHQ SDK assembles all three automatically when
agentId is configured — signing is server-authorized via Circle and never requires you to handle wallet private keys.
Arc Testnet development uses chain ID
5042002 (agent IDs like 8004:5042002:<tokenId>). Production uses Arc Mainnet chain ID 5042.
