arc-builder-kit 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. arc_builder_kit/__init__.py +4 -0
  2. arc_builder_kit/__main__.py +6 -0
  3. arc_builder_kit/_paths.py +47 -0
  4. arc_builder_kit/cli.py +277 -0
  5. arc_builder_kit/config/arc_testnet.facts.json +31 -0
  6. arc_builder_kit/doctor.py +936 -0
  7. arc_builder_kit/examples/agent-commerce-components/components.js +200 -0
  8. arc_builder_kit/examples/agent-commerce-components/index.html +120 -0
  9. arc_builder_kit/examples/agent-commerce-flows/flows.js +271 -0
  10. arc_builder_kit/examples/agent-commerce-flows/index.html +114 -0
  11. arc_builder_kit/examples/agent-commerce-live/commerce-live.js +190 -0
  12. arc_builder_kit/examples/agent-commerce-live/index.html +105 -0
  13. arc_builder_kit/examples/agent-commerce-review-packet/index.html +96 -0
  14. arc_builder_kit/examples/agent-commerce-review-packet/packet.js +125 -0
  15. arc_builder_kit/examples/agent-identity-profile-preview/identity.js +126 -0
  16. arc_builder_kit/examples/agent-identity-profile-preview/index.html +104 -0
  17. arc_builder_kit/examples/arc-agent-treasury-lab/index.html +152 -0
  18. arc_builder_kit/examples/arc-agent-treasury-lab/treasury.js +532 -0
  19. arc_builder_kit/examples/arc-testnet-operator-evidence/evidence.example.json +47 -0
  20. arc_builder_kit/examples/arc-testnet-wallet-send-gate/index.html +233 -0
  21. arc_builder_kit/examples/arc-testnet-wallet-send-gate/live-infrastructure-policy.example.json +59 -0
  22. arc_builder_kit/examples/arc-testnet-wallet-send-gate/wallet-send-gate.js +472 -0
  23. arc_builder_kit/examples/circle-wallet-integration/index.html +155 -0
  24. arc_builder_kit/examples/circle-wallet-integration/wallet-lab.js +91 -0
  25. arc_builder_kit/examples/job-escrow-simulator/index.html +121 -0
  26. arc_builder_kit/examples/job-escrow-simulator/simulator.js +162 -0
  27. arc_builder_kit/examples/payment-intent-demo/index.html +132 -0
  28. arc_builder_kit/examples/payment-intent-playground/index.html +301 -0
  29. arc_builder_kit/examples/payment-intent-playground/playground.js +835 -0
  30. arc_builder_kit/examples/payment-intent-receipt-matcher/index.html +157 -0
  31. arc_builder_kit/examples/payment-intent-receipt-matcher/matcher.js +877 -0
  32. arc_builder_kit/examples/receipt-verifier-playground/index.html +120 -0
  33. arc_builder_kit/examples/receipt-verifier-playground/verifier.js +226 -0
  34. arc_builder_kit/examples/receipt-viewer/index.html +138 -0
  35. arc_builder_kit/examples/receipt-viewer/receipt-viewer.js +472 -0
  36. arc_builder_kit/examples/transaction-status-playground/index.html +135 -0
  37. arc_builder_kit/examples/transaction-status-playground/status.js +518 -0
  38. arc_builder_kit/examples/x402-local-challenge-server/.env.example +25 -0
  39. arc_builder_kit/examples/x402-local-challenge-server/README.md +111 -0
  40. arc_builder_kit/examples/x402-local-challenge-server/server.py +711 -0
  41. arc_builder_kit/mcp_server.py +463 -0
  42. arc_builder_kit/release_packet.py +469 -0
  43. arc_builder_kit/templates/README.md +25 -0
  44. arc_builder_kit/templates/job-escrow-starter/README.md +25 -0
  45. arc_builder_kit/templates/job-escrow-starter/index.html +41 -0
  46. arc_builder_kit/templates/job-escrow-starter/index.js +14 -0
  47. arc_builder_kit/templates/payment-intent-starter/README.md +25 -0
  48. arc_builder_kit/templates/payment-intent-starter/index.html +42 -0
  49. arc_builder_kit/templates/payment-intent-starter/index.js +7 -0
  50. arc_builder_kit/templates/x402-agent-starter/README.md +29 -0
  51. arc_builder_kit/templates/x402-agent-starter/server.py +201 -0
  52. arc_builder_kit/validate_repo.py +2212 -0
  53. arc_builder_kit-0.2.0.dist-info/METADATA +543 -0
  54. arc_builder_kit-0.2.0.dist-info/RECORD +58 -0
  55. arc_builder_kit-0.2.0.dist-info/WHEEL +5 -0
  56. arc_builder_kit-0.2.0.dist-info/entry_points.txt +3 -0
  57. arc_builder_kit-0.2.0.dist-info/licenses/LICENSE +21 -0
  58. arc_builder_kit-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,157 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Payment Intent Receipt Matcher · Arc MCP Builder Assistant</title>
7
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%230f766e'/%3E%3Cstop offset='1' stop-color='%232563eb'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='16' fill='url(%23g)'/%3E%3Ctext x='50%25' y='55%25' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='34' font-weight='900' fill='white'%3EM%3C/text%3E%3C/svg%3E" />
8
+ <meta name="description" content="Read-only Arc Testnet payment-intent receipt matcher. Compare a payment intent JSON with an onchain USDC Transfer receipt without wallets, keys, signing, or broadcast." />
9
+ <meta name="author" content="Arc MCP Builder Assistant contributors" />
10
+ <meta name="robots" content="index,follow" />
11
+ <meta name="theme-color" content="#061414" />
12
+ <meta name="color-scheme" content="dark" />
13
+ <meta name="referrer" content="no-referrer" />
14
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self'; connect-src 'self' https://rpc.testnet.arc.network; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; upgrade-insecure-requests" />
15
+ <link rel="canonical" href="https://anstrays.github.io/arc-mcp-builder-assistant/examples/payment-intent-receipt-matcher/" />
16
+ <meta property="og:title" content="Payment Intent Receipt Matcher" />
17
+ <meta property="og:description" content="Read-only Arc Testnet matcher that compares a payment intent with a transaction receipt's USDC Transfer logs." />
18
+ <meta property="og:type" content="website" />
19
+ <style>
20
+ :root { color-scheme: dark; --bg:#061414; --panel:rgba(7,17,24,.86); --panel-2:rgba(255,255,255,.055); --text:#f8fffc; --muted:#c4d9d2; --soft:#8fa8a1; --line:rgba(255,255,255,.15); --teal:#5eead4; --blue:#9ab1ff; --lime:#d9ff72; --amber:#ffd166; --red:#ff9b9b; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
21
+ * { box-sizing: border-box; }
22
+ body { margin:0; min-height:100vh; background: radial-gradient(circle at top right, rgba(94,234,212,.2), transparent 34%), linear-gradient(145deg, #061414 0, #07101c 45%, #0d1726 100%); color:var(--text); padding:32px 0; }
23
+ main { width:min(1180px, calc(100vw - 32px)); margin:0 auto; display:grid; gap:18px; }
24
+ a { color:inherit; }
25
+ a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid var(--teal); outline-offset:3px; border-radius:8px; }
26
+ .breadcrumb { margin:0 0 4px; font-size:13px; color:var(--soft); }
27
+ .breadcrumb a { color:var(--muted); text-decoration:underline; text-underline-offset:3px; }
28
+ .card { border:1px solid var(--line); background:var(--panel); border-radius:22px; padding:24px; box-shadow:0 24px 80px rgba(0,0,0,.32); }
29
+ .notice { border-color:rgba(94,234,212,.3); background:rgba(94,234,212,.075); }
30
+ .danger { border-color:rgba(255,155,155,.32); background:rgba(255,155,155,.075); }
31
+ .eyebrow { color:var(--teal); text-transform:uppercase; letter-spacing:.16em; font-size:12px; font-weight:900; }
32
+ h1 { margin:8px 0 10px; font-size:clamp(34px, 6vw, 70px); line-height:.96; }
33
+ h2 { margin:8px 0 12px; font-size:clamp(23px, 3vw, 34px); }
34
+ h3 { margin:12px 0 8px; font-size:20px; }
35
+ p { color:var(--muted); line-height:1.65; }
36
+ code { color:#d9fffb; overflow-wrap:anywhere; }
37
+ .grid { display:grid; grid-template-columns:minmax(300px, .9fr) minmax(340px, 1.1fr); gap:18px; align-items:start; }
38
+ main > *, .grid > * { min-width:0; }
39
+ label { display:block; color:var(--muted); font-weight:900; margin:0 0 8px; }
40
+ input, textarea { width:100%; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.28); color:#d9fffb; padding:14px; font:14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
41
+ textarea { min-height:220px; resize:vertical; }
42
+ .actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:14px; }
43
+ button { border:0; border-radius:999px; padding:13px 18px; font-weight:900; cursor:pointer; background:var(--text); color:#07101c; }
44
+ button.secondary { background:rgba(255,255,255,.1); color:var(--text); border:1px solid var(--line); }
45
+ button:disabled { opacity:.55; cursor:not-allowed; }
46
+ .pill-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
47
+ .pill { border:1px solid var(--line); background:rgba(255,255,255,.06); color:#dce2ff; border-radius:999px; padding:8px 11px; font-size:13px; }
48
+ .status { display:inline-flex; align-items:center; gap:8px; border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.08); color:#eef2ff; border-radius:999px; padding:9px 12px; font-weight:900; overflow-wrap:anywhere; }
49
+ .status::before { content:""; width:9px; height:9px; border-radius:999px; background:var(--soft); box-shadow:0 0 18px rgba(143,168,161,.7); flex:0 0 auto; }
50
+ .status.checking::before { background:var(--amber); box-shadow:0 0 18px rgba(255,209,102,.7); }
51
+ .status.match::before { background:var(--teal); box-shadow:0 0 18px rgba(94,234,212,.8); }
52
+ .status.success::before { background:var(--teal); box-shadow:0 0 18px rgba(94,234,212,.8); }
53
+ .status.mismatch::before, .status.revert::before { background:var(--red); box-shadow:0 0 18px rgba(255,155,155,.75); }
54
+ .status.not_found::before, .status.unknown::before { background:var(--amber); box-shadow:0 0 18px rgba(255,209,102,.7); }
55
+ .mini-list { margin:12px 0 0; padding-left:18px; color:var(--muted); line-height:1.6; }
56
+ .mini-list li { margin:6px 0; overflow-wrap:anywhere; }
57
+ .mini-list li.pass strong { color:var(--lime); }
58
+ .mini-list li.warn strong { color:var(--amber); }
59
+ .mini-list li.fail strong { color:#ffdada; }
60
+ .json-preview { white-space:pre-wrap; overflow:auto; border:1px solid rgba(255,255,255,.1); border-radius:16px; padding:14px; background:rgba(0,0,0,.28); color:#d9fffb; font-size:13px; line-height:1.55; min-height:320px; }
61
+ .metric-grid { display:grid; gap:10px; grid-template-columns:repeat(3, minmax(0, 1fr)); margin:14px 0; }
62
+ .metric { border:1px solid rgba(255,255,255,.1); border-radius:16px; background:var(--panel-2); padding:13px; }
63
+ .metric span { display:block; color:var(--soft); font-size:12px; text-transform:uppercase; letter-spacing:.12em; font-weight:900; }
64
+ .metric strong { display:block; margin-top:7px; color:var(--text); overflow-wrap:anywhere; }
65
+ @media (max-width: 860px) { body { padding:18px 0; } .grid, .metric-grid { grid-template-columns:1fr; } }
66
+ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0s !important; transition: none !important; } }
67
+ </style>
68
+ <script src="./matcher.js" integrity="sha384-b+l47wwp114M/vXgjWojdiy76c4WFIwxpJFIr5OU3npT/9gvdn7AX1yFcjsc1g0c" crossorigin="anonymous" defer></script>
69
+ </head>
70
+ <body>
71
+ <main>
72
+ <p class="breadcrumb"><a href="../../index.html">&larr; Back to Arc MCP Builder Assistant</a></p>
73
+ <section class="card" aria-labelledby="matcher-title">
74
+ <div class="eyebrow">Read-only Arc Testnet RPC</div>
75
+ <h1 id="matcher-title">Payment Intent Receipt Matcher</h1>
76
+ <p>Paste a payment intent JSON and an Arc Testnet transaction hash. The matcher fetches the receipt, decodes pinned USDC Transfer logs, and reports whether the onchain transfer matches the expected recipient, token, and amount. It never connects to a wallet, handles private keys, signs, or broadcasts.</p>
77
+ <div class="pill-row" aria-label="Safety properties">
78
+ <span class="pill">No wallet connection</span>
79
+ <span class="pill">No private keys</span>
80
+ <span class="pill">No signing</span>
81
+ <span class="pill">No transaction broadcast</span>
82
+ <span class="pill">Read-only RPC only</span>
83
+ </div>
84
+ </section>
85
+
86
+ <section class="grid" aria-label="Matcher workspace">
87
+ <article class="card" aria-labelledby="input-title">
88
+ <div class="eyebrow">Payment intent + transaction</div>
89
+ <h2 id="input-title">Compare intent with receipt</h2>
90
+ <p>The sample values are placeholders. Use a real Arc Testnet hash and intent only if you already have them from a wallet or ArcScan.</p>
91
+ <label for="payment-intent">Payment intent JSON</label>
92
+ <textarea id="payment-intent" autocomplete="off" spellcheck="false">{
93
+ "version": "2025-06-arc-payment-intent-v1",
94
+ "network": "Arc Testnet",
95
+ "chainId": 5042002,
96
+ "asset": "USDC",
97
+ "token": "0x3600000000000000000000000000000000000000",
98
+ "recipient": "0x1111111111111111111111111111111111111111",
99
+ "amount": "0.01",
100
+ "amountBaseUnits": "10000",
101
+ "decimals": 6,
102
+ "memo": "Demo payment-intent receipt matcher"
103
+ }</textarea>
104
+ <label for="transaction-hash">Arc Testnet transaction hash</label>
105
+ <input id="transaction-hash" autocomplete="off" spellcheck="false" value="0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" />
106
+ <div class="actions" aria-label="Matcher controls">
107
+ <button type="button" id="match-receipt">Match against receipt</button>
108
+ <button type="button" id="reset-matcher" class="secondary">Reset sample</button>
109
+ </div>
110
+ </article>
111
+
112
+ <article class="card notice" aria-labelledby="result-title">
113
+ <div class="eyebrow">Match evidence</div>
114
+ <h2 id="result-title">Read-only verdict</h2>
115
+ <p>Status: <span id="status-pill" class="status">not_checked</span></p>
116
+ <ul id="match-summary-list" class="mini-list" aria-live="polite"></ul>
117
+ <h3>USDC Transfer logs</h3>
118
+ <ul id="transfer-log-list" class="mini-list" aria-live="polite"></ul>
119
+ <div class="actions" aria-label="Evidence export controls">
120
+ <button type="button" id="download-json-evidence" class="secondary" disabled>Download JSON evidence</button>
121
+ <button type="button" id="download-markdown-evidence" class="secondary" disabled>Download Markdown evidence</button>
122
+ </div>
123
+ </article>
124
+ </section>
125
+
126
+ <section class="card notice" aria-labelledby="states-title">
127
+ <div class="eyebrow">Match states</div>
128
+ <h2 id="states-title">What the matcher reports</h2>
129
+ <div class="metric-grid" aria-label="Arc match states">
130
+ <div class="metric"><span>match</span><strong>Receipt succeeded and a USDC Transfer log matches the intent recipient, token, and amount.</strong></div>
131
+ <div class="metric"><span>mismatch</span><strong>Receipt succeeded but no USDC Transfer log matched the intent.</strong></div>
132
+ <div class="metric"><span>revert</span><strong>Receipt exists and status is 0x0.</strong></div>
133
+ <div class="metric"><span>not_found</span><strong>No receipt yet for this hash.</strong></div>
134
+ <div class="metric"><span>unknown</span><strong>RPC unavailable, wrong chain, malformed envelope, or ambiguous status.</strong></div>
135
+ <div class="metric"><span>Chain</span><strong>5042002 / 0x4cef52</strong></div>
136
+ </div>
137
+ </section>
138
+
139
+ <section class="card" aria-labelledby="json-title">
140
+ <div class="eyebrow">Machine-readable output</div>
141
+ <h2 id="json-title">Match evidence JSON</h2>
142
+ <pre id="match-json" class="json-preview" aria-live="polite"></pre>
143
+ </section>
144
+
145
+ <section class="card danger" aria-labelledby="boundary-title">
146
+ <div class="eyebrow">Trust boundary</div>
147
+ <h2 id="boundary-title">What this does not prove</h2>
148
+ <ul class="mini-list">
149
+ <li>A <code>match</code> only means the receipt contains a USDC Transfer with the expected recipient and amount. It does not prove business acceptance, offchain fulfillment, or product settlement.</li>
150
+ <li>The matcher relies on the public Arc Testnet RPC and the pinned USDC address. A different token contract will not match even if the call data looks similar.</li>
151
+ <li>The matcher does not estimate gas, simulate calls, submit transactions, or retry failed payments.</li>
152
+ <li>Use the <a href="../receipt-viewer/">receipt viewer</a> and <a href="../transaction-status-playground/">transaction status playground</a> for earlier/later stages of the payment lifecycle.</li>
153
+ </ul>
154
+ </section>
155
+ </main>
156
+ </body>
157
+ </html>