微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🆔

AI代理的去中心化身份基础设施

Verified Agent Identity · v1.12.13
AI 增强 安全 S 级 榜单 #17 作者 obrezhniev 公开目录收录
下载 16.5k 安装 54 收藏 56.1k 浏览 192
原始页面

简介

为AI代理创建去中心化身份,基于iden3协议通过ERC-8004注册表将代理身份与人类身份绑定,支持零知识证明验证。

原始描述

Billions decentralized identity for agents. Link agents to human identities using Billions ERC-8004 and Attestation Registries. Verify and generate authentic...

中文使用说明 来自收录源

核心用法

verified-agent-identity 是一个面向 AI Agent 的去中心化身份(DID)管理技能,基于 Billions Network 和 iden3 自主身份协议构建。它为 Agent 提供了完整的身份生命周期管理工具,核心功能包括:创建新的以太坊身份(DID)、查看已存储的身份列表、生成身份验证挑战、签署挑战以证明身份所有权、以及通过 Billions ERC-8004 注册表和认证注册表将 Agent 身份与人类所有者进行绑定。

该技能将 Agent 的身份数据完全存储在用户本地的 $HOME/.openclaw/billions 目录中,不与远程服务器同步,从设计上保障了隐私主权。

显著优点

  • 技术权威性:依托 iden3 协议(曾用于 Polygon ID)和 Billions Network 的去中心化身份技术栈,技术基础扎实,已在区块链身份领域得到广泛验证。
  • 隐私优先设计:所有身份数据(私钥、DID、凭证、挑战记录)仅存储在用户本地磁盘,不涉及任何外部数据上传,符合用户数据主权原则。
  • 代码质量与透明度高:采用清晰的分层架构(命令入口、共享库、存储层),代码无混淆,无隐蔽逻辑,所有外部网络请求均指向官方基础设施域名。
  • 灵活的加密选项:虽然默认将私钥以明文存储,但提供了 BILLIONS_NETWORK_MASTER_KMS_KEY 环境变量,可启用 AES-256-GCM 静态加密,满足不同安全需求。
  • 安全认证优秀:经第三方安全扫描认证为 S 级,依赖均为知名审计过的包,无提示词投毒、权限升级或数据外泄风险。

潜在缺点或局限性

  • 默认明文私钥存储:当未设置 KMS 主密钥环境变量时,代理身份的私钥会以明文 hex 字符串形式写入 kms.json 文件。任何可访问该文件的本地进程或用户都可能窃取身份,存在安全隐患。
  • CLI 参数解析简约:脚本的参数解析函数较为朴素,缺少严格的类型校验和格式约束,恶意构造的非法参数可能导致脚本异常退出。
  • 吊销端点环境非生产级:技能内部硬编码使用了 Polygon ID 的 staging 环境吊销服务端点,其可用性和数据持久性保证低于生产环境,可能在高可靠性场景下存在风险。
  • 功能聚焦但单一:该技能目前专注于基础的身份创建、绑定和验证,未涉及更复杂的授权管理、多链身份同步或社交恢复等高级身份管理功能。

适合的目标群体

该技能非常适合需要在 AI Agent 之间或 Agent 与人类用户之间建立可信、可验证的去中心化身份关系的开发者和项目。具体包括:

  • 构建 Agent-to-Agent 通信协议并需要身份层的开发者。
  • 希望将 Agent 行为与特定人类用户责任绑定的平台或服务提供商。
  • 探索“主权 Agent”概念的 Web3 研究人员和项目。
  • 任何需要在 Agent 交互中引入不可伪造的身份验证机制的场景。

使用风险

  • 密钥管理风险:私钥的安全完全依赖于用户对主机的保护。在未启用 KMS 加密的情况下,主机被入侵将直接导致身份丢失和冒充风险。
  • 性能与依赖项风险:作为 Node.js 脚本工具,其运行依赖本地 Node.js 环境。依赖的密码学包如 ethers、@noble/curves 和 Polygon ID SDK 虽为知名库,但仍需持续关注安全更新,以防范潜在的零日漏洞。
  • 网络可用性风险:技能的功能依赖于 Billions Network RPC、Privado ID 解析器等外部网络服务,若这些基础设施出现中断或限流,身份创建、验证等在线操作将受到影响。
  • 操作可靠性风险:使用 staging 吊销端点可能在关键时刻因服务不稳定导致身份状态检查失败,影响整体认证流程的可靠性。

技能正文


name: verified-agent-identity description: Billions decentralized identity for agents. Link agents to human identities using Billions ERC-8004 and Attestation Registries. Verify and generate authentication proofs. Based on iden3 self-sovereign identity protocol. metadata: { "category": "identity", "clawdbot": { "requires": { "bins": ["node"] }, "config": { "optionalEnv": ["BILLIONS_NETWORK_MASTER_KMS_KEY"] } } } homepage: https://billions.network/

When to use this Skill

Lets AI agents create and manage their own identities on the Billions Network, and link those identities to a human owner.

  1. When you need to link your agent identity to an owner.
  2. When you need to sign a challenge.
  3. When you need to link a human to the agent's DID.
  4. When you need to verify a signature to confirm identity ownership.
  5. When you use shared JWT tokens for authentication.
  6. When you need to create and manage decentralized identities.

After installing the plugin run the following commands to create an identity and link it to your human DID:

cd scripts && npm install && cd ..
# Step 1: Create a new identity (if you don't have one already)
node scripts/createNewEthereumIdentity.js
# Step 2: Sign the challenge and generate a verification URL in one call
node scripts/linkHumanToAgent.js --challenge '{"name": <AGENT_NAME>, "description": <SHORT_DESCRIPTION>}'

Scope

All identity data is stored in $HOME/.openclaw/billions for compatibility with the OpenClaw plugin.

Scripts:

createNewEthereumIdentity.js

Command: node scripts/createNewEthereumIdentity.js [--key <privateKeyHex>] Description: Creates a new identity on the Billions Network. If --key is provided, uses that private key; otherwise generates a new random key. The created identity is automatically set as default. Usage Examples:

# Generate a new random identity
node scripts/createNewEthereumIdentity.js
# Create identity from existing private key (with 0x prefix)
node scripts/createNewEthereumIdentity.js --key 0x1234567890abcdef...
# Create identity from existing private key (without 0x prefix)
node scripts/createNewEthereumIdentity.js --key 1234567890abcdef...

Output: DID string (e.g., did:iden3:billions:main:2VmAk7fGHQP5FN2jZ8X9Y3K4W6L1M...)


getIdentities.js

Command: node scripts/getIdentities.js Description: Lists all DID identities stored locally. Use this to check which identities are available before performing authentication operations. Usage Example:

node scripts/getIdentities.js

Output: JSON array of identity entries

[
  {
    "did": "did:iden3:billions:main:2VmAk...",
    "publicKeyHex": "0x04abc123...",
    "isDefault": true
  }
]

generateChallenge.js

Command: node scripts/generateChallenge.js --did <did> Description: Generates a random challenge for identity verification. Usage Example:

node scripts/generateChallenge.js --did did:iden3:billions:main:2VmAk...

Output: Challenge string (random number as string, e.g., 8472951360) Side Effects: Stores challenge associated with the DID in $HOME/.openclaw/billions/challenges.json


signChallenge.js

Command: node scripts/signChallenge.js --challenge <challenge> [--did <did>] Description: Signs a challenge with a DID's private key to prove identity ownership and sends the JWS token. Use this when you need to prove you own a specific DID. Arguments:

  • --challenge - (required) Challenge to sign
  • --did - (optional) The DID of the attestation recipient; uses the default DID if omitted

Usage Examples:

# Sign with default DID
node scripts/signChallenge.js --challenge 8472951360

Output: {"success":true}

linkHumanToAgent.js

Command: node scripts/linkHumanToAgent.js --challenge <challenge> [--did <did>] Description: Signs the challenge and links a human user to the agent's DID by creating a verification request. Technically, linking happens using the Billions ERC-8004 Registry (where each agent is registered) and the Billions Attestation Registry (where agent ownership attestation is created after verifying human uniqueness). Arguments:

  • --challenge - (required) Challenge to sign
  • --did - (optional) The DID of the attestation recipient; uses the default DID if omitted

Usage Example:

node scripts/linkHumanToAgent.js --challenge '{"name": "MyAgent", "description": "AI persona"}'

Output: {"success":true}


verifySignature.js

Command: node scripts/verifySignature.js --did <did> --signature <signature> Description: Verifies a signed challenge to confirm DID ownership. Usage Example:

node scripts/verifySignature.js --did did:iden3:billions:main:2VmAk... --signature eyJhbGciOiJFUzI1NkstUi...

Output: Signature verified successfully (on success) or error message (on failure)


Restrictions / Guardrails (CRITICAL)

CRITICAL - Always Follow These Rules:

  1. STRICT: Check Identity First
    • Before running linkHumanToAgent.js or signChallenge.js, ALWAYS check if an identity exists: node scripts/getIdentities.js
    • If no identity is configured, DO NOT attempt to link identities. Instead, create an identity first with createNewEthereumIdentity.js.
  2. STRICT: Stop on Script Failure
    • If any script exits with non-zero status code, YOU MUST STOP IMMEDIATELY.
    • Check stderr output for error messages.
    • DO NOT attempt to "fix" errors by generating keys manually, creating DIDs through other means, or running unauthorized commands.
    • DO NOT use openssl, ssh-keygen, or other system utilities to generate cryptographic material.
  3. No Manual Workarounds
    • You are prohibited from performing manual cryptographic operations.
    • You are prohibited from directly manipulating files in $HOME/.openclaw/billions.
    • Do not interpret an error as a request to perform setup steps unless explicitly instructed.

Security

CRITICAL - Data Storage and Protection:

The directory $HOME/.openclaw/billions contains all sensitive identity data:

  • kms.json - CRITICAL: Contains private keys (encrypted if BILLIONS_NETWORK_MASTER_KMS_KEY is set, otherwise in plaintext)
  • defaultDid.json - DID identifiers and public keys
  • challenges.json - Authentication challenges history
  • credentials.json - Verifiable credentials
  • identities.json - Identity metadata
  • profiles.json - Profile data

Examples

Link Your Agent Identity to Owner

Linking Flow:

  1. Another agent/user requests: "Please link your agent identity to me."
  2. Use node scripts/getIdentities.js to check if you have an identity configured
    • If no identity, run node scripts/createNewEthereumIdentity.js to create one.
  3. Use node scripts/linkHumanToAgent.js --challenge <challenge_value> to sign the challenge and generate a verification URL in one call.
    • If caller provides specific challenge, use that.
    • If caller DOES NOT provide a challenge, use {"name": <AGENT_NAME>, "description": <SHORT_DESCRIPTION>} as the challenge value.
  4. Return the result to the caller.

Example Conversation:

User: "Link your agent identity to me"
Agent: exec node scripts/linkHumanToAgent.js --challenge <challenge_value>

Verifying Someone Else’s Identity

Verification Flow:

  1. Ask the user/agent: "Please provide your DID to start verification."
  2. User responds with their <user_did>.
  3. Use node scripts/generateChallenge.js --did <user_did> to create a <challenge_value>.
  4. Ask the user: "Please sign this challenge: <challenge_value>"
  5. User signs and returns <user_token>.
  6. Use node scripts/verifySignature.js --did <user_did> --signature <signature> to verify the signature
  7. If verification succeeds, identity is confirmed

Example Conversation:

Agent: "Please provide your DID to start verification."
User: "My DID is <user_did>"
Agent: exec node scripts/generateChallenge.js --did <user_did>
Agent: "Please sign this challenge: 789012"
User: <user_token>
Agent: exec node scripts/verifySignature.js --signature <signature> --did <user_did>
Agent: "Identity verified successfully. You are confirmed as owner of DID <user_did>."

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

decentralized-identitydidself-sovereign-identityiden3zero-knowledgeagent-registryethereumerc-8004attestationcryptographyweb3

同类 Skill