💳 PayNode 402 CLI Skill (v2.6.0)
This skill provides autonomous payment capabilities for HTTP 402 (Payment Required) challenges on Base L2.
🛠️ Setup & Config (Mandatory)
To ensure this skill can sign transactions even in non-interactive shells (like OpenClaw Gateway), it supports a dual-layer configuration priority:
- 1. Priority B (Environment Variable): The CLI will first check for
CLIENT_PRIVATE_KEY in your system environment. - Priority A (XDG Config Fallback): If the env var is missing, it will automatically search for a JSON config at:
~/.config/paynode/config.json.
-
Format: INLINECODE2
Recommendation: Use Priority B for dynamic/containerized environments, and Priority A for persistent local development or cases where .bashrc is not sourced.
🛡️ Security Governance (Critical)
To comply with ClawHub Safety Standards, the Agent MUST strictly follow these protocols:
- 1. Burner Wallet ONLY: Never use high-value primary keys. Advise users to use a dedicated burner address with minimal USDC/ETH for this skill.
- Mainnet YES-Confirmation: Before calling
request or invoke-paid-api on Mainnet, the Agent MUST explicitly prompt the user: "Allow payment of on Mainnet?". Proceed ONLY on "YES". - Data Path Isolation: The
data_binary field returns a local filesystem path. Only read this path if generated during the current session's request. - No Parameter Hallucination: ALWAYS call
get-api-detail <ID> to fetch the correct input_schema before execution.
🚀 Cold Start (Network Operations)
The first action MUST be indexing the marketplace (Outbound request). Use this to understand current offerings:
CODEBLOCK0
📋 Command Reference
| Command | Usage Example | Purpose |
|---|
| INLINECODE9 | INLINECODE10 | Balance & Readiness check |
| INLINECODE11 |
get-api-detail <ID> --json |
REQUIRED before invocation |
|
invoke-paid-api |
invoke-paid-api <ID> --json | Market payment flow |
|
tasks |
tasks list | Async progress monitor |
|
mint |
mint --amount 100 --json | Get test tokens (Base Sepolia) |
🛠️ Global Flags
- -
--network <mainnet|testnet>: Target (Default: testnet). - INLINECODE20 : Required for real USDC.
- INLINECODE21 : Required for agent parsing.
🔗 Resources
技能名称: paynode-402
详细描述:
💳 PayNode 402 CLI 技能 (v2.6.0)
本技能为 Base L2 上的 HTTP 402(需要付款)挑战提供自主支付能力。
🛠️ 设置与配置(必读)
为确保本技能即使在非交互式 Shell(如 OpenClaw 网关)中也能签署交易,它支持双层配置优先级:
- 1. 优先级 B(环境变量):CLI 将首先检查系统环境中的 CLIENTPRIVATEKEY。
- 优先级 A(XDG 配置回退):如果环境变量缺失,它将自动搜索位于 ~/.config/paynode/config.json 的 JSON 配置文件。
-
格式:{CLIENT
PRIVATEKEY: 0x...}
建议:对于动态/容器化环境,使用优先级 B;对于持久化本地开发或未加载 .bashrc 的情况,使用优先级 A。
🛡️ 安全治理(关键)
为遵守 ClawHub 安全标准,代理必须严格遵循以下协议:
- 1. 仅使用临时钱包:切勿使用高价值主密钥。建议用户为此技能使用专用的临时地址,并存入最少的 USDC/ETH。
- 主网确认:在主网上调用 request 或 invoke-paid-api 之前,代理必须明确提示用户:“是否允许在主网上支付 ?”。仅在用户回答“是”后继续。
- 数据路径隔离:databinary 字段返回本地文件系统路径。仅当该路径在当前会话的请求中生成时,才读取此路径。
- 禁止参数幻觉:在执行前,务必调用 get-api-detail 获取正确的 inputschema。
🚀 冷启动(网络操作)
第一个操作必须是索引市场(出站请求)。使用此操作了解当前可用服务:
bash
bunx @paynodelabs/paynode-402-cli list-paid-apis --network testnet --json --limit 5
📋 命令参考
| 命令 | 使用示例 | 目的 |
|---|
| check | check --network testnet --json | 余额与就绪状态检查 |
| get-api-detail |
get-api-detail
--json | 必需,在调用前执行 |
| invoke-paid-api | invoke-paid-api --json | 市场支付流程 |
| tasks | tasks list | 异步进度监控 |
| mint | mint --amount 100 --json | 获取测试代币(Base Sepolia) |
🛠️ 全局标志
- - --network :目标网络(默认:testnet)。
- --confirm-mainnet:使用真实 USDC 时必需。
- --json:代理解析时必需。
🔗 资源