去中心化 Agent 身份认证层
简介
基于 W3C DID 和 Ed25519 的 Agent 身份层,为 AI Agent 提供加密可验证的跨平台身份认证,私钥本地签名不上传。
原始描述
Agent identity layer. Register DID, sign requests with Ed25519, prove WHO you are cryptographically.
通过你的 Agent 添加
安装目录:nervepay-identity/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
NervePay Identity 是一套专为 AI Agent 设计的去中心化身份认证系统。其核心工作流程分为三步:首先通过 curl 从官方服务器下载签名辅助脚本,随后注册生成唯一的 DID(去中心化标识符)和 Ed25519 密钥对,最后使用该脚本对所有 API 请求进行自动签名。
注册完成后,Agent 获得 NERVEPAY_DID 和 NERVEPAY_PRIVATE_KEY 两个核心凭证,配合辅助脚本即可生成包含 Agent-DID、X-Agent-Signature、X-Agent-Nonce 和 X-Signature-Timestamp 的标准认证请求头。这套机制实现了"你是谁"的密码学证明,而非传统的 API Key 认证模式。
显著优点
真正的去中心化身份:采用 W3C DID 标准,身份不绑定任何单一平台,Agent 可在所有支持 NervePay 的平台上携带同一套声誉数据跨域使用。
零信任安全架构:私钥完全本地保管,仅将签名结果发送至服务器,即使 API 被攻破也不会泄露核心凭证。Ed25519 算法提供现代密码学级别的安全保障。
防重放攻击设计:每个请求包含唯一 nonce 和 5 分钟有效期的 timestamp,杜绝请求截断复用风险。
零依赖轻量实现:辅助脚本仅使用 Node.js 内置 crypto 和 fetch 模块,无第三方 npm 依赖,降低供应链攻击面。
功能解耦设计:身份层与数据分析层完全分离,用户可按需组合,避免功能膨胀带来的隐私风险。
潜在缺点与局限性
动态代码下载风险:核心工作依赖从网络下载并执行的远程脚本,缺乏哈希校验或签名验证机制,存在静默更新或中间人攻击可能。
T3 来源可信度:由个人开发者(zadahmed)维护,非顶级技术公司或基金会背书,长期维护稳定性存疑。
Node.js 环境依赖:必须使用 Node.js 运行时,对纯 Python 或其他语言环境的 Agent 不够友好。
网络单点依赖:注册和验证流程依赖 nervepay.xyz 域名,若服务中断将影响新 Agent 注册和身份查询。
人类所有权可选:虽提供 claim_url 供人类用户认领 Agent,但该步骤为可选,可能导致高信任度场景下的身份归属模糊。
适合的目标群体
- 需要为 AI Agent 建立可验证数字身份的开发者
- 构建多 Agent 协作系统、需要跨平台身份互认的架构师
- 对 API 认证安全性有高要求、希望摆脱传统 API Key 模式的团队
- 愿意接受一定技术风险以换取去中心化身份优势的前沿技术探索者
不适用对代码来源有严格审计要求的企业环境,以及完全无法容忍网络动态代码下载的高安全性场景。
使用风险
供应链攻击风险:远程脚本无完整性验证,若 nervepay.xyz 服务器被入侵或 DNS 被劫持,用户可能下载并执行恶意代码。
密钥管理风险:私钥以环境变量形式存储,若 CI/CD 配置不当或日志泄露可能导致凭证暴露。助记词备份若存储不当将永久丢失身份。
服务连续性风险:作为个人项目,存在维护中断、域名过期或政策变化导致服务不可用的可能。
网络延迟与可用性:所有身份验证操作依赖外部 API,离线环境或网络不稳定时无法完成认证流程。
技能正文
name: nervepay-identity
description: Agent identity layer. Register DID, sign requests with Ed25519, prove WHO you are cryptographically.
metadata: {"openclaw":{"emoji":"🆔","requires":{"bins":["node","curl"],"env":["NERVEPAY_DID","NERVEPAY_PRIVATE_KEY"]},"primaryEnv":"NERVEPAY_PRIVATE_KEY"}}
NervePay Identity — Agent Instructions
You are an AI agent with a NervePay identity. This skill lets you prove WHO you are using W3C DIDs and Ed25519 cryptographic signatures.
What This Skill Does
- Registers your identity: Creates a unique DID (Decentralized Identifier) for you
- Authenticates you: Signs requests with Ed25519 so API providers know it's really you
- Proves ownership: Cryptographic verification that you control your identity
- NO analytics tracking: This skill is identity-only. Use
nervepay-analytics for tracking or nervepay for both.
Step 1: Download Helper Script
nervepay-analytics for tracking or nervepay for both.First, download the NervePay signing helper:
# Download signing script
curl -o nervepay-request.mjs https://nervepay.xyz/nervepay-request.mjs
chmod +x nervepay-request.mjs
This script handles Ed25519 signing for authenticated requests.
Step 2: Register Your Identity
If you don't have NERVEPAY_DID and NERVEPAY_PRIVATE_KEY env vars, register first:
curl -X POST https://api.nervepay.xyz/v1/agent-identity/register-pending \
-H "Content-Type: application/json" \
-d '{
"name": "Your Agent Name",
"description": "What you do"
}'
Save these from the response:
did→ Set asNERVEPAY_DIDprivate_key→ Set asNERVEPAY_PRIVATE_KEYmnemonic→ Backup for recovery (24 words)claim_url→ Give to your human owner to claim you
You can start authenticating immediately. Human ownership (via claim_url) is optional but recommended for better trust scores.
Making Authenticated Requests
Use the helper script to sign and send authenticated requests:
# Test authentication
node ./nervepay-request.mjs GET /v1/agent-identity/whoami
# Check your capabilities
node ./nervepay-request.mjs GET /v1/agent-identity/capabilities
# Authenticated POST (example)
node ./nervepay-request.mjs POST /v1/some-endpoint '{"key":"value"}'
The script handles Ed25519 signing automatically. It reads NERVEPAY_DID, NERVEPAY_PRIVATE_KEY, and NERVEPAY_API_URL (default: https://api.nervepay.xyz) from environment.
What the Signature Proves
Guarantee
How
Authentication (who is calling)
Server verifies Ed25519 signature against your public key
Integrity (what was sent)
Signature covers method, path, query, body hash — tampering breaks verification
Replay protection
Unique nonce + timestamp prevents captured requests from reuse
Portable identity
Your DID carries reputation across all platforms that check NervePay headers
Required Headers (automatically added)
| Guarantee | How |
|---|---|
| Authentication (who is calling) | Server verifies Ed25519 signature against your public key |
| Integrity (what was sent) | Signature covers method, path, query, body hash — tampering breaks verification |
| Replay protection | Unique nonce + timestamp prevents captured requests from reuse |
| Portable identity | Your DID carries reputation across all platforms that check NervePay headers |
The helper script adds these automatically:
Agent-DID: Your DIDX-Agent-Signature: Base64-encoded Ed25519 signatureX-Agent-Nonce: Unique nonce (UUID)X-Signature-Timestamp: ISO 8601 timestamp
Common Commands
Test authentication
node ./nervepay-request.mjs GET /v1/agent-identity/whoami
Returns your DID, name, reputation score, and confirms authentication works.
Check your capabilities
node ./nervepay-request.mjs GET /v1/agent-identity/capabilities
node ./nervepay-request.mjs GET /v1/agent-identity/capabilities
Shows your spending limits, allowed operations, and permissions.
Verify another agent
curl "https://api.nervepay.xyz/v1/agent-identity/verify/did:nervepay:agent:abc123xyz"
curl "https://api.nervepay.xyz/v1/agent-identity/verify/did:nervepay:agent:abc123xyz"
No auth required. Returns public profile, reputation, and transaction stats for any agent.
Poll claim status (check if human claimed you)
curl "https://api.nervepay.xyz/v1/agent-identity/register-pending/SESSION_ID/status"
curl "https://api.nervepay.xyz/v1/agent-identity/register-pending/SESSION_ID/status"
Returns: pending, claimed, expired, or revoked.
Security Notes
- Private key: NEVER send to any server. Only send signatures.
- Nonces: Single-use. Generate new for each request (script handles this).
- Timestamps: Must be within 5 minutes of server time.
- Mnemonic: 24-word backup phrase. Store securely offline.
Need Analytics Too?
This skill is identity-only. To track API usage and build reputation:
- Use
nervepay-analyticsskill for analytics-only - Use
nervepayskill for both identity + analytics
Full API Reference
For complete endpoint documentation, error codes, and advanced usage, see:
- Online: https://nervepay.xyz/docs
- Download API reference:
curl -o api.md https://nervepay.xyz/api.md
API Base: https://api.nervepay.xyz/v1 Docs: https://nervepay.xyz/docs GitHub: https://github.com/nervepay/nervepay
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。