当前位置: 首页 > Skill >

ERC-800Claw

ERC-800Claw

ERC-800Claw

OpenClaw 为 ERC-8004 代理身份与信誉的入口。链上注册代理、查询身份、提供和接收反馈评分。

0.1.1 2026.11.22 520
获取Skill文件查看使用说明
作 者:林宁 许可证: 更新时间:2026.11.22
本文目录展开

ERC-800Claw

Your entry point into ERC-8004 - the on-chain identity, reputation, and validation standard for autonomous agents.

ERC-8004 is an open protocol enabling verifiable agent identity and reputation on Ethereum. Agents can register identities (ERC-721 NFTs), receive and give reputation feedback, and optionally verify their capabilities through validators. ERC-800Claw, built by Primer, provides simple APIs for interacting with the protocol.

When to Use This Skill

Use ERC-800Claw when:

  • You need to register an agent identity on-chain
  • You need to look up an agent by ID or owner
  • You want to give feedback/ratings to another agent
  • You need to check an agent's reputation
  • The user asks about agent verification or trust

Quick Setup

Node.js

npm install erc-800claw

Python

pip install erc-800claw

How to Respond

User Says/Asks What to Do
"Look up agent #123" Run erc-800claw agent 123 to get details
"Does agent 42 exist?" Run erc-800claw exists 42
"How many agents does 0x... own?" Run erc-800claw owner 0x...
"Register my agent" Run erc-800claw register --name "Name" (requires PRIVATE_KEY env var)
"What networks are supported?" Run erc-800claw networks
"Show contract addresses" Run erc-800claw contracts

CLI Commands

Command Description
erc-800claw agent <id> Get agent details by ID
erc-800claw exists <id> Check if an agent exists
erc-800claw owner <address> Get agent count for an address
erc-800claw register Register a new agent (requires PRIVATE_KEY)
erc-800claw networks List supported networks
erc-800claw contracts [network] Show contract addresses

CLI Options

  • --network, -n <name> - Network to use (mainnet, sepolia). Default: mainnet
  • --json, -j - Output as JSON

Example CLI Output

$ erc-800claw agent 1
Agent #1 (mainnet)
────────────────────────────────────────
Owner:    0x1234...abcd
URI:      data:application/json;base64,...
Name:     My Agent
About:    An autonomous agent for...
Explorer: https://etherscan.io/nft/0x8004.../1

$ erc-800claw exists 100
Agent 100 exists on mainnet

$ erc-800claw owner 0x1234...
Address 0x1234... owns 3 agent(s) on mainnet

$ PRIVATE_KEY=0x... erc-800claw register --name "My Agent" --network sepolia
Agent Registered on sepolia!
────────────────────────────────────────
Agent ID: 42
Owner:    0x1234...abcd
Tx:       0xabc123...
Explorer: https://sepolia.etherscan.io/nft/0x8004.../42

How ERC-8004 Works

ERC-8004 provides three on-chain registries:

  1. Identity Registry (ERC-721) - Every agent gets a unique NFT token with metadata URI
  2. Reputation Registry - Structured feedback scores from clients to agents
  3. Validation Registry - Independent verification (zkML, TEE, stakers)

The flow:

  1. Register - Mint an agent identity NFT with name/description metadata
  2. Operate - Use your agent ID when interacting with other agents
  3. Build Reputation - Clients give feedback, scores accumulate on-chain
  4. Verify (optional) - Validators attest to capabilities

Using in Code

Node.js / TypeScript

const { createClient } = require('erc-800claw');

const client = createClient({ network: 'mainnet' });

// Get agent by ID
const agent = await client.getAgent(1);
console.log(agent);
// {
//   agentId: 1,
//   tokenURI: 'data:application/json;base64,...',
//   owner: '0x...',
//   metadata: { name: 'My Agent', description: '...' },
//   explorerUrl: 'https://etherscan.io/...'
// }

// Check if agent exists
const exists = await client.agentExists(42);

// Get agent count for address
const count = await client.getAgentCount('0x...');

// Register a new agent (no IPFS needed - uses data URI!)
const result = await client.registerAgent(process.env.PRIVATE_KEY, {
  name: 'My Autonomous Agent',
  description: 'Handles customer support',
  services: [{ name: 'support', endpoint: 'https://myagent.com/api' }]
});
console.log(`Registered agent #${result.agentId}`);

// Give feedback to an agent
await client.giveFeedback(process.env.PRIVATE_KEY, agentId, {
  value: 4.5,     // Score out of 5
  decimals: 1,
  tag1: 'support',
  tag2: 'fast'
});

Python

from erc800claw import create_client
import os

client = create_client(network='mainnet')

# Get agent by ID
agent = client.get_agent(1)
print(agent)
# {
#     'agent_id': 1,
#     'token_uri': 'data:application/json;base64,...',
#     'owner': '0x...',
#     'metadata': {'name': 'My Agent', 'description': '...'},
#     'explorer_url': 'https://etherscan.io/...'
# }

# Check if agent exists
exists = client.agent_exists(42)

# Get agent count for address
count = client.get_agent_count('0x...')

# Register a new agent (no IPFS needed - uses data URI!)
result = client.register_agent(
    private_key=os.environ['PRIVATE_KEY'],
    name='My Autonomous Agent',
    description='Handles customer support',
    services=[{'name': 'support', 'endpoint': 'https://myagent.com/api'}]
)
print(f"Registered agent #{result['agent_id']}")

# Give feedback to an agent
client.give_feedback(
    private_key=os.environ['PRIVATE_KEY'],
    agent_id=agent_id,
    value=4.5,        # Score out of 5
    decimals=1,
    tag1='support',
    tag2='fast'
)

Metadata Format

Agent metadata follows a standard schema:

{
  "name": "My Agent",
  "description": "What my agent does",
  "image": "https://example.com/avatar.png",
  "services": [
    {
      "name": "api",
      "endpoint": "https://myagent.com/api",
      "description": "Main API endpoint"
    }
  ],
  "supported_trust": ["reputation", "validation"]
}

The SDK automatically encodes this as a data URI - no IPFS upload required.

Integration with xClaw02

ERC-800Claw works with xClaw02 (x402 payments) to enable paid agent services:

  1. Register your agent identity with ERC-800Claw
  2. Set up payment receiving with xClaw02
  3. Clients verify your identity, pay for services, then rate you

See the xClaw02 skill for payment setup.

Supported Networks

Network Chain ID Status
Ethereum Mainnet 1 Live
Sepolia Testnet 11155111 Live

Contract Addresses

Mainnet

  • Identity Registry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
  • Reputation Registry: 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63

Sepolia

  • Identity Registry: 0x8004A818BFB912233c491871b3d84c89A494BD9e
  • Reputation Registry: 0x8004B663056A597Dffe9eCcC1965A193B7388713

Environment Variables

Variable Format Description
PRIVATE_KEY 0x + 64 hex chars Wallet private key (required for registration/feedback)
ERC8004_NETWORK mainnet, sepolia Default network (default: mainnet)
ERC8004_RPC_URL URL Custom RPC endpoint

Error Handling

Error Meaning What to Do
Agent not found No agent with that ID Verify the agent ID is correct
Agent already exists Token already minted Each agent ID is unique
Not the owner Can't modify other's agents Only owner can update agent metadata
Invalid address Malformed Ethereum address Check address format (0x + 40 hex chars)

Security Notes

  • Never expose private keys in logs, chat, or output
  • Use environment variables for wallet credentials
  • Agent registration costs gas - have ETH in your wallet
  • Private key format: 0x followed by 64 hexadecimal characters

Links

  • ERC-8004 Protocol: https://8004.org
  • EIP-8004: https://eips.ethereum.org/EIPS/eip-8004
  • SDK (npm): https://npmjs.com/package/erc-800claw
  • SDK (PyPI): https://pypi.org/project/erc-800claw
  • GitHub: https://github.com/primer-systems/ERC-8004
  • Primer Systems: https://primer.systems

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
Skill 文件
  • SKILL.md
    • ERC-800Claw
    • When to Use This Skill
    • Quick Setup
      • Node.js
      • Python
    • How to Respond
    • CLI Commands
      • CLI Options
      • Example CLI Output
    • How ERC-8004 Works
    • Using in Code
      • Node.js / TypeScript
      • Python
    • Metadata Format
    • Integration with xClaw02
    • Supported Networks
    • Contract Addresses
      • Mainnet
      • Sepolia
    • Environment Variables
    • Error Handling
    • Security Notes
    • Links
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期