erc8004
Installation
bun add @regent/erc8004 viemOverview
Quick Start
import { SDK } from '@regent/erc8004';
// Initialize SDK
const sdk = new SDK({
chainId: 84532, // Base Sepolia
rpcUrl: 'https://sepolia.base.org',
signer: process.env.PRIVATE_KEY,
ipfs: 'pinata',
pinataJwt: process.env.PINATA_JWT,
});
// Create and register an agent
const agent = sdk.createAgent('My Agent', 'An intelligent assistant');
await agent.setMCP('https://mcp.example.com');
await agent.setA2A('https://a2a.example.com/agent.json');
agent.setTrust(true, false, false); // Enable reputation trust model
agent.addSkill('natural_language_processing/summarization');
const registration = await agent.registerIPFS();
console.log('Registered:', registration.agentId); // e.g., "84532:42"SDK Configuration
SDKConfig
Initialization Examples
SDK Methods
Agent Lifecycle
Search & Discovery
Feedback & Reputation
Registry Access
Agent Class
Creating an Agent
Agent Properties
Setting Endpoints
OASF Skills and Domains
Trust Models
Agent Wallet
Registration
Registration File
IPFS Client
Configuration
Methods
Subgraph Client
Configuration
Methods
Search Parameters
Feedback Manager
Giving Feedback
Reading Feedback
Responding to Feedback
Endpoint Crawler
Multi-Chain Support
Agent Indexer
Supported Chains
Chain
Chain ID
Agent ID Format
Endpoint Types
Trust Models
Complete Example
Exports
Last updated