@pinata/erc8004
v1.1.0
Published
Interactive wizard to register ERC-8004 AI agents with Pinata IPFS
Readme
@pinata/erc8004
Interactive terminal wizard to register ERC-8004 AI agents on-chain with Pinata IPFS.
Quick Start
npx @pinata/erc8004Or with Bun:
bunx @pinata/erc8004Or run the CLI directly:
pinata-8004Prerequisites
Pinata account (free tier works)
- Get your JWT at app.pinata.cloud/developers/api-keys
- Create a gateway at app.pinata.cloud/gateway
Native tokens for gas on your chosen network
- Testnets: Get free tokens from faucets (links shown in wizard)
- Mainnets: Small amount of native currency (ETH, POL, BNB, etc.)
Wallet private key
- The wallet that will own your agent NFT
Supported Networks
| Network | Type | |---------|------| | Ethereum Mainnet | mainnet | | Ethereum Sepolia | testnet | | Base Mainnet | mainnet | | Base Sepolia | testnet | | Polygon Mainnet | mainnet | | Polygon Amoy | testnet | | Monad Mainnet | mainnet | | Monad Testnet | testnet | | BSC Mainnet | mainnet | | BSC Testnet | testnet |
Features
Create Agent
- Select any supported network (mainnet or testnet)
- Enter agent details (name, description, image)
- Configure all ERC-8004 service types (MCP, A2A, OASF, ENS, DID, email)
- Set trust models and x402 payment support
- Register on-chain and store metadata on Pinata IPFS
Update Agent
- Update URI: Re-upload agent card to IPFS and update on-chain
- Set payment wallet: Configure the on-chain address for receiving payments
Verify Agent
- Look up any agent by ID
- Validate schema against ERC-8004 spec
- Check registration matching
- Verify endpoint domains via
.well-known
Payment Wallet
The payment wallet is stored on-chain, not in the agent card JSON. This ensures clients always get the authoritative payment address by querying the contract directly.
- x402 Support (in agent card): A boolean flag indicating your agent accepts x402 payments
- Payment Wallet (on-chain): The actual address where payments are sent
By default, the payment wallet is the owner's address (whoever registered the agent). To use a different wallet:
- Go to Update Agent > Set payment wallet
- Enter your agent ID
- Enter the private key of the wallet you want to receive payments
- The new wallet signs an EIP-712 message proving consent
- The owner submits the transaction to update the on-chain record
Clients looking to pay your agent will:
- Check
x402Support: truein your agent card - Call
getAgentWallet(agentId)on-chain to get the payment address
What is ERC-8004?
ERC-8004 is an open standard for AI agent identity and trust. It gives your agent:
- Portable identity — Your agent exists as an NFT, not tied to any platform
- Discoverable endpoints — Other agents can find your MCP server, A2A endpoint, and more
- Composable reputation — Feedback builds a track record that follows your agent
Learn more: ERC-8004 Specification
Development
bun install
bun run devBuild
bun run buildOutputs dist/index.js for standalone use.
Programmatic Usage
For scripting and automation, see the example scripts in the same repo: github.com/PinataCloud/erc8004
License
MIT
