chainId (e.g. 11155111 for Sepolia), not string network names. Supported values are listed in ERC-8004 agent identity.
Requirements
| Requirement | Details |
|---|---|
| Address match | evmAddress on create must equal the account that signs the registry tx |
| Gas | That account needs native token on the target chainId |
| Backend | IdentityRegistry must be configured for your chainId on Agent Kit |
| Credentials | No accessKey or organizationId — do not use registerAgentIdentity() (server-only) |
Option A — registerAgentIdentityExternal (recommended)
signTransaction receives:
prepare—registerCall(to,data,value),rpcUrl,agentURI,chainId,identityRegistryfromAddress— checksummed0xaddress (must match agentevmAddress)
0x…).
Option B — Manual prepare / confirm
For MetaMask popups or custom UX between steps:Read registration
FAQ
Can I use MetaMask instead of a private key insignTransaction?
Yes. Use prepareAgentIdentity + your wallet provider to sign prepare.registerCall, then confirmAgentIdentity with the returned txHash. Or wrap that logic inside signTransaction for registerAgentIdentityExternal.
Who pays gas for ERC-8004 registration?
The signing account pays gas for the registry transaction on the target chain.
Related
- External wallet overview — optional Privy, MetaMask, WalletConnect, and viem guide links
- ERC-8004 agent identity — supported chainIds and registry addresses
- External wallet API reference