📦 V Identity Ilhant34
v1.0.0数十亿去中心化代理身份。使用 Billions ERC-8004 和 Attestation Registries 将代理与人类身份关联。验证并生成真实...
运行时依赖
安装命令
点击复制技能文档
何时使用此 Skill 让 AI agent 在 Billions Network 上创建并管理自己的身份,并将身份与一位人类所有者绑定。
- 需要将 agent 身份绑定到所有者时
- 需要签署 challenge 时
- 需要将人类绑定到 agent 的 DID 时
- 需要验证签名以确认身份所有权时
- 使用共享 JWT token 做鉴权时
- 需要创建并管理去中心化身份时
安装插件后,执行以下命令创建身份并绑定到你的人类 DID:
cd scripts && npm install && cd ..
# 步骤 1:新建身份(若尚无)
node scripts/createNewEthereumIdentity.js
# 步骤 2:一次性签署 challenge 并生成验证 URL
node scripts/linkHumanToAgent.js --challenge '{"name":,"description":}'
作用域
所有身份数据存于 $HOME/.openclaw/billions,兼容 OpenClaw 插件。
脚本说明
createNewEthereumIdentity.js
命令:node scripts/createNewEthereumIdentity.js [--key ]
描述:在 Billions Network 创建新身份。提供 --key 则使用该私钥,否则随机生成。新身份自动设为默认。
示例:
node scripts/createNewEthereumIdentity.js
node scripts/createNewEthereumIdentity.js --key 0x123...
node scripts/createNewEthereumIdentity.js --key 123...
输出:DID 字符串,如 did:iden3:billions:main:2VmAk7fGHQP5FN2jZ8X9Y3K4W6L1M...getIdentities.js
命令:node scripts/getIdentities.js
描述:列出本地存储的所有 DID 身份,便于鉴权前确认。
示例:node scripts/getIdentities.js
输出:JSON 数组,含 DID、公钥、是否默认等字段。
generateChallenge.js
命令:node scripts/generateChallenge.js --did
描述:为指定 DID 生成随机 challenge。
示例:node scripts/generateChallenge.js --did did:iden3:billions:main:2VmAk...
输出:challenge 字符串(如 8472951360)
副作用:将 challenge 与 DID 关联存入 $HOME/.openclaw/billions/challenges.json
signChallenge.js
命令:node scripts/signChallenge.js --challenge [--did ]
描述:用 DID 私钥签署 challenge,生成 JWS 以证明身份所有权。
示例:node scripts/signChallenge.js --challenge 8472951360
输出:{"success":true}
linkHumanToAgent.js
命令:node scripts/linkHumanToAgent.js --challenge [--did ]
描述:签署 challenge 并将人类用户绑定到 agent DID,生成验证请求。绑定通过 Billions ERC-8004 Registry 与 Billions Attestation Registry 完成。
示例:node scripts/linkHumanToAgent.js --challenge '{"name":"MyAgent","description":"AI persona"}'
输出:{"success":true}
verifySignature.js
命令:node scripts/verifySignature.js --did --token
描述:验证已签 challenge,确认 DID 所有权。
示例:node scripts/verifySignature.js --did did:iden3:billions:main:2VmAk... --token eyJhbGc...
输出:成功提示或错误信息。
限制 / 护栏(关键) 关键:必须始终遵守
- 严格:先检查身份
linkHumanToAgent.js 或 signChallenge.js 前,务必先执行
node scripts/getIdentities.js
若无身份,禁止继续,须先用 createNewEthereumIdentity.js 创建。 - 严格:脚本失败即停
- 禁止手动加密操作