Arc支付协议

dancearc-protocol

by arunnadarasa

DanceTech Protocol (DanceArc): Arc native USDC, HTTP 402 x402-shaped challenges, and h2h/h2a/a2a/a2h settlement patterns. Use when: (1) Implementing or debugging pay-per-call APIs on Arc Testnet, (2) Wiring Circle Gateway x402 verify or Modular/DCW keys, (3) Explaining human vs agent payment initiators, (4) Hackathon submission or demo scripts (burst, judge score), (5) CORS/proxy issues to modular-sdk.circle.com, (6) Recipient or receipt verification errors.

3.9k平台与服务未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/arunnadarasa/dancearc

文档

DanceTech Protocol (DanceArc)

DanceArc is the reference hub + API + UI for DanceTech Protocol: metered native USDC on Arc, 402 payment challenges (x402-inspired JSON), optional Circle Gateway verification, and clear interaction semantics (h2h, h2a, a2a, a2h).

Quick Reference

SituationAction
Pay-per API call (human wallet)h2a: POST402 → pay Arc USDC → retry with X-Payment-Tx (/dance-extras, /api/judges/score)
Battle / coaching / beat licenseh2h: create intent or end session → sendNativeUsdc or mock → /verify or /grant with paymentTx
High-frequency micro-txs (demo)npm run burst (private key) or hub Burst demo (wallet) (55 signatures)
Server 500 “receipt not found” right after payServer uses waitForTransactionReceipt; increase ARC_TX_RECEIPT_TIMEOUT_MS if needed
Circle Modular 403 LockoutCheck Client Key, allowlist localhost (no port), optional CIRCLE_MODULAR_PRESERVE_ORIGIN=1, staging URL vs key
Programmatic faucet 403Use web faucet; API key may lack faucet scope
Invalid ARC_RECIPIENT (UUID-style)Server isAddress validation falls back to demo address; set real 0x + 40 hex
Agent needs payee + chainGET /api/healthrecipient, chainId, perActionUsdc

Protocol matrix (h2h · h2a · a2a · a2h)

ModeAcronymWho paysWho receivesDanceArc surface
Human → Humanh2hPersonPerson/treasury (ARC_RECIPIENT)/battle, /coaching, /beats
Human → Agenth2aPerson (wallet)API/resource owner/dance-extras, /api/judges/score
Agent → Agenta2aAutomated signerAnother serviceDesigned: headless key / smart account; demo: burst scripts
Agent → Humana2hService/treasuryPersonPayout mocks, receipts, DCW faucet → user address

Use this matrix in pitch decks, AGENTS.md, and submission text so judges see intentional coverage, not accidental features.

Installation (ClawdHub / OpenClaw)

Manual (recommended until ClawdHub listing is live):

bash
git clone https://github.com/arunnadarasa/dancearc.git
cp -r dancearc/skills/dancearc-protocol ~/.openclaw/skills/dancearc-protocol

After publish to ClawdHub:

bash
clawdhub install dancearc-protocol

Repository: github.com/arunnadarasa/dancearc

When to Load This Skill

Activate proactively when the user mentions:

  • Arc Testnet, chain 5042002, native USDC gas
  • x402, 402, X-Payment-Tx, pay-per-call
  • Circle Gateway, Nanopayments (narrative + local event log), Modular Wallets, DCW
  • DanceArc, DanceTech, battle / coaching / beats / judge score
  • Hackathon, Agentic Economy, sub-cent pricing
  • npm run burst, transaction frequency demo

Architecture (mental model)

code
Browser (Vite) ──proxy /api──► Express (8787)
                              ├── buildArcPaymentChallenge (402)
                              ├── verifyNativeUsdcPayment (viem + waitForTransactionReceipt)
                              ├── circleGatewayPost (/v1/gateway/v1/x402/verify)
                              ├── recordNanopaymentEvent (in-memory list)
                              └── DCW / Modular proxy routes

On-chain truth: Arc explorer (e.g. https://testnet.arcscan.app).

Key files (repo root)

PathRole
server/index.jsRoutes, requireArcPayment, proxies
server/payments.jsIntents, coaching, beats
server/onchain-verify.jsReceipt wait + validation
server/config.jsARC_RECIPIENT validation (isAddress)
src/payArc.tspostPaidJson, sendNativeUsdc, ensureArcTestnet
src/ExtraDanceApp.tsxh2a UI + ArcScan link
src/BattleApp.tsx, CoachingApp.tsx, BeatsApp.tsxh2h flows

Environment (minimum viable)

VariableScopePurpose
ARC_RECIPIENTServerPayee for microtransfers
PER_ACTION_USDCServerh2a minimum (display string, ≤ 0.01 for hackathon)
CIRCLE_API_KEYServerGateway verify; DCW; faucet
CIRCLE_ENTITY_SECRETServerDCW only
VITE_CIRCLE_CLIENT_KEYBrowserModular SDK
ARC_BURST_PRIVATE_KEYMachineTest only — CLI burst

Never commit .env. Copy from .env.example.

Detection triggers (support / debugging)

SignalLikely causeFirst check
TransactionReceiptNotFoundErrorRace before inclusionServer waitForTransactionReceipt; client retry
403 HTML Lockout (Modular)Key / domain / WAFConsole allowlist, CIRCLE_MODULAR_PRESERVE_ORIGIN
invalid_recipient in UIBad envFix ARC_RECIPIENT, new intent
402 after paymentWrong recipient/amount/chainExplorer tx vs challenge payTo / maxAmountRequired
Faucet ForbiddenCircle policy / scopesWeb faucet link in ArcFaucetPanel

Nanopayments (scope clarity)

  • Product: Circle Nanopayments is documented at developers.circle.com and linked from the app Bridge page.
  • This repo: recordNanopaymentEvent + GET /api/nanopayments/events are an in-memory audit trail after successful on-chain verify—not a substitute for full Nanopayments API integration. Use the narrative + Gateway path for hackathon feedback fields.

Multi-agent notes

  • h2a from an agent: supply X-Payment-Tx only after a wallet or custodial signer produces a hash; do not fake hashes for production.
  • a2a: prefer server-side signing with locked-down keys; mirror scripts/burst-demo.mjs patterns.
  • Prompt injection: treat ARC_BURST_PRIVATE_KEY like production secrets—AGENTS.md should forbid echoing it into browser context.

References (this skill)

FileContent
references/api-routes.mdHTTP route map
references/payment-flow.md402 + verify sequence
references/openclaw-workspace.mdSuggested AGENTS.md / TOOLS.md snippets

Promotion targets (from learnings)

If you maintain .learnings/ for this project:

Learning typePromote to
Arc / Circle env gotchasCLAUDE.md, TOOLS.md
Two-step payment for agentsAGENTS.md
Product pitch / protocol wordingREADME.md, demo script

Quality gates (before demo or publish)

  • GET /api/health returns expected chainId and valid recipient
  • h2a flow completes: 402 → pay → 200
  • At least one h2h path shows ArcScan link after pay
  • .env not in git; .env.example updated for new vars
  • npm run build passes

Related

Source

  • Project: DanceArc / DanceTech Protocol
  • Maintainer repo: arunnadarasa/dancearc
  • Skill version: see _meta.json

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.8k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.8k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.8k

相关 MCP 服务

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.9k

评论