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).
SituationActionPay-per API call (human wallet)h2a: POST → 402 → 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 paymentTxHigh-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 neededCircle Modular 403 LockoutCheck Client Key, allowlist localhost (no port), optional CIRCLE_MODULAR_PRESERVE_ORIGIN=1, staging URL vs keyProgrammatic faucet 403Use web faucet; API key may lack faucet scopeInvalid ARC_RECIPIENT (UUID-style)Server isAddress validation falls back to demo address; set real 0x + 40 hexAgent needs payee + chain**GET /api/health** → recipient, chainId, perActionUsdc
ModeAcronymWho paysWho receivesDanceArc surfaceHuman → Humanh2hPersonPerson/treasury ( ARC_RECIPIENT)/battle, /coaching, /beatsHuman → Agenth2aPerson (wallet)API/resource owner/dance-extras, /api/judges/scoreAgent → Agenta2aAutomated signerAnother serviceDesigned: headless key / smart account; demo: burst scriptsAgent → 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.
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
Activate proactively when the user mentions:
npm run burst, transaction frequency demotext
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).
PathRoleserver/index.jsRoutes, requireArcPayment, proxiesserver/payments.jsIntents, coaching, beatsserver/onchain-verify.jsReceipt wait + validationserver/config.js``ARC_RECIPIENT validation ( isAddress)src/payArc.ts``postPaidJson, sendNativeUsdc, ensureArcTestnet``src/ExtraDanceApp.tsxh2a UI + ArcScan linksrc/BattleApp.tsx, CoachingApp.tsx, BeatsApp.tsxh2h flows
VariableScopePurposeARC_RECIPIENTServerPayee for microtransfersPER_ACTION_USDCServerh2a minimum (display string, ≤ 0.01 for hackathon)CIRCLE_API_KEYServerGateway verify; DCW; faucetCIRCLE_ENTITY_SECRETServerDCW onlyVITE_CIRCLE_CLIENT_KEYBrowserModular SDKARC_BURST_PRIVATE_KEYMachineTest only — CLI burst
Never commit .env. Copy from .env.example.
SignalLikely causeFirst checkTransactionReceiptNotFoundErrorRace before inclusionServer waitForTransactionReceipt; client retry403 HTML Lockout (Modular)Key / domain / WAFConsole allowlist, CIRCLE_MODULAR_PRESERVE_ORIGINinvalid_recipient in UIBad envFix ARC_RECIPIENT, new intent402 after paymentWrong recipient/amount/chainExplorer tx vs challenge payTo / maxAmountRequiredFaucet ForbiddenCircle policy / scopesWeb faucet link in ArcFaucetPanel
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.X-Payment-Tx only after a wallet or custodial signer produces a hash; do not fake hashes for production.scripts/burst-demo.mjs patterns.ARC_BURST_PRIVATE_KEY like production secrets— AGENTS.md should forbid echoing it into browser context.FileContentreferences/api-routes.mdHTTP route mapreferences/payment-flow.md402 + verify sequencereferences/openclaw-workspace.mdSuggested AGENTS.md / TOOLS.md snippets
If you maintain .learnings/ for this project:
Learning typePromote toArc / Circle env gotchasCLAUDE.md, TOOLS.mdTwo-step payment for agentsAGENTS.mdProduct pitch / protocol wordingREADME.md, demo script
GET /api/health returns expected chainId and valid recipient.env not in git; .env.example updated for new varsnpm run build passes_meta.json