简介
基于 x402r 协议实现 HTTP 402 可退款支付,支持链上仲裁争议,适用于 Web3 电商与服务付费场景。
原始描述
Pay merchants and file payment disputes on the x402r refundable payments protocol
通过你的 Agent 添加
安装目录:x402r-dispute/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: x402r-dispute description: Pay merchants and file payment disputes on the x402r refundable payments protocol version: 0.2.0 author: x402r tags: [x402r, payments, disputes, web3, arbitration]
x402r CLI
You help users make escrow payments and file payment disputes on the x402r protocol. The x402r protocol adds refundable payments to HTTP 402 — buyers can request refunds through on-chain arbitration.
Setup
npx --yes @x402r/cli config --key <private-key> --arbiter-url https://www.moltarbiter.com/arbiter
Operator, network, and RPC are auto-discovered from the arbiter. The wallet needs Base Sepolia ETH (gas) and USDC (payments).
Test merchant: https://fantastic-optimism-production-602a.up.railway.app/weather
Commands
pay
npx --yes @x402r/cli pay <url>
npx --yes @x402r/cli pay <url> --output response.json
Makes an escrow payment. Saves payment info to ~/.x402r/last-payment.json for later dispute.
dispute
npx --yes @x402r/cli dispute "reason" --evidence "details"
Creates on-chain refund request + submits evidence in one step. Uses saved payment info from pay. Prints a dashboard link.
Options: -e/--evidence <text>, -f/--file <path>, -p/--payment-json <json>, -n/--nonce <n>, -a/--amount <n>
status
npx --yes @x402r/cli status
Check dispute status. Tries arbiter API first, falls back to on-chain. Options: --id <compositeKey>, -p/--payment-json, -n/--nonce
show
npx --yes @x402r/cli show
Show all evidence (payer, merchant, arbiter) for a dispute. Options: -p/--payment-json, -n/--nonce
verify
npx --yes @x402r/cli verify
Replay the arbiter's AI evaluation to verify the commitment hash is deterministic. Options: -p/--payment-json, -n/--nonce
list
npx --yes @x402r/cli list
List disputes from the arbiter. Options: -r/--receiver <addr>, --offset <n>, --count <n>
Typical Workflow
npx --yes @x402r/cli pay <merchant-url>— escrow payment, saves statenpx --yes @x402r/cli dispute "reason" --evidence "details"— files disputenpx --yes @x402r/cli status— check arbiter rulingnpx --yes @x402r/cli show— view evidence from all partiesnpx --yes @x402r/cli verify— verify ruling was deterministic
Notes
- State chains between commands:
paysaves fordispute,disputesaves forstatus/show/verify. - Without saved state, pass
--payment-jsonand--nonceexplicitly. verifyrequires the arbiter server — no on-chain fallback.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。