← 返回
开发者工具 Key 中文

Cli

Pay merchants and file payment disputes on the x402r refundable payments protocol
在 x402r 可退款支付协议上向商家付款并提交支付争议。
vraspar
开发者工具 clawhub v0.1.3 1 版本 100000 Key: 需要
★ 0
Stars
📥 885
下载
💾 5
安装
1
版本
#latest

概述

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 , -f/--file , -p/--payment-json , -n/--nonce , -a/--amount

status

npx --yes @x402r/cli status

Check dispute status. Tries arbiter API first, falls back to on-chain. Options: --id , -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 , --offset , --count

Typical Workflow

  1. npx --yes @x402r/cli pay — escrow payment, saves state
  2. npx --yes @x402r/cli dispute "reason" --evidence "details" — files dispute
  3. npx --yes @x402r/cli status — check arbiter ruling
  4. npx --yes @x402r/cli show — view evidence from all parties
  5. npx --yes @x402r/cli verify — verify ruling was deterministic

Notes

  • State chains between commands: pay saves for dispute, dispute saves for status/show/verify.
  • Without saved state, pass --payment-json and --nonce explicitly.
  • verify requires the arbiter server — no on-chain fallback.

版本历史

共 1 个版本

  • v0.1.3 当前
    2026-03-29 19:32 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,165
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,185
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,799