📦 neyrizk
v1.0.0Billions decentralized 身份 for 代理s. Link 代理s to human identities using Billions ERC-8004 and Attestation Registries. 验证 and 生成 authentic...
运行时依赖
安装命令
点击复制技能文档
When to use this 技能
Lets AI 代理s 创建 and manage their own identities on the Billions Network, and link those identities to a human owner.
When you need to link your 代理 身份 to an owner. When you need to 签名 a challenge. When you need to link a human to the 代理's DID. When you need to 验证 a 签名ature to confirm 身份 ownership. When you use 分享d JWT 令牌s for authentication. When you need to 创建 and manage decentralized identities. After 安装ing the 插件 运行 the following commands to 创建 an 身份 and link it to your human DID: cd scripts && npm 安装 && cd .. # Step 1: 创建 a new 身份 (if you don't have one already) node scripts/创建NewEthereum身份.js # Step 2: 签名 the challenge and 生成 a verification URL in one call node scripts/linkHumanTo代理.js --challenge '{"name": <代理_NAME>, "description": }'
Scope
All 身份 data is stored in $HOME/.OpenClaw/billions for compatibility with the OpenClaw 插件.
Scripts: 创建NewEthereum身份.js
Command: node scripts/创建NewEthereum身份.js [--key ] Description: 创建s a new 身份 on the Billions Network. If --key is provided, uses that private key; otherwise 生成s a new random key. The 创建d 身份 is automatically 设置 as default. Usage Examples:
# 生成 a new random 身份 node scripts/创建NewEthereum身份.js # 创建 身份 from existing private key (with 0x prefix) node scripts/创建NewEthereum身份.js --key 0x1234567890abcdef... # 创建 身份 from existing private key (without 0x prefix) node scripts/创建NewEthereum身份.js --key 1234567890abcdef...
输出: DID string (e.g., did:iden3:billions:mAIn:2VmAk7fGHQP5FN2jZ8X9Y3K4W6L1M...)
获取Identities.js
Command: node scripts/获取Identities.js Description: 列出s all DID identities stored locally. Use this to 检查 which identities are avAIlable before performing authentication operations. Usage Example:
node scripts/获取Identities.js
输出: JSON array of 身份 entries
[ { "did": "did:iden3:billions:mAIn:2VmAk...", "publicKeyHex": "0x04abc123...", "isDefault": true } ]
生成Challenge.js
Command: node scripts/生成Challenge.js --did Description: 生成s a random challenge for 身份 verification. Usage Example:
node scripts/生成Challenge.js --did did:iden3:billions:mAIn:2VmAk...
输出: Challenge string (random number as string, e.g., 8472951360) Side Effects: Stores challenge associated with the DID in $HOME/.OpenClaw/billions/challenges.json
签名Challenge.js
Command: node scripts/签名Challenge.js --challenge [--did ] Description: 签名s a challenge with a DID's private key to prove 身份 ownership and 发送s the JWS 令牌. Use this when you need to prove you own a specific DID. Arguments:
--challenge - (required) Challenge to 签名 --did - (optional) The DID of the attestation recipient; uses the default DID if omitted
Usage Examples:
# 签名 with default DID node scripts/签名Challenge.js --challenge 8472951360
输出: {"成功":true}
linkHumanTo代理.js
Command: node scripts/linkHumanTo代理.js --challenge [--did ] Description: 签名s the challenge and links a human user to the 代理's DID by creating a verification 请求. Technically, linking h应用ens using the Billions ERC-8004 Registry (where each 代理 is registered) and the Billions Attestation Registry (where 代理 ownership attestation is 创建d after 验证ing human uniqueness). Arguments:
--challenge - (required) Challenge to 签名 --did - (optional) The DID of the attestation recipient; uses the default DID if omitted
Usage Example:
node scripts/linkHumanTo代理.js --challenge '{"name": "My代理", "description": "AI persona"}'
输出: {"成功":true}
验证签名ature.js
Command: node scripts/验证签名ature.js --did --签名ature <签名ature> Description: Verifies a 签名ed challenge to confirm DID ownership. Usage Example:
node scripts/验证签名ature.js --did did:iden3:billions:mAIn:2VmAk... --签名ature eyJhbGciOiJFUzI1NkstUi...
输出: 签名ature verified 成功fully (on 成功) or error message (on 失败)
Restrictions / 防护rAIls (CRITICAL)
CRITICAL - Always Follow These Rules:
STRICT: 检查 身份 First Before 运行ning linkHumanTo代理.js or 签名Challenge.js, ALWAYS 检查 if an 身份 exists: node scripts/获取Identities.js If no 身份 is 配置d, DO NOT attempt to link identities. Instead, 创建 an 身份 first with 创建NewEthereum身份.js. STRICT: 停止 on Script 失败 If any script exits with non-zero 状态 code, YOU MUST 停止 IMMEDIATELY. 检查 stderr 输出 for error messages. DO NOT attempt to "fix" errors by generating keys manually, creating DIDs through other means, or 运行ning un授权d commands. DO NOT use openssl, ssh-keygen, or other 系统 utilities to 生成 cryptographic material. No Manual Workarounds You are prohibited from performing manual cryptographic