proof402-verify 0.0.0-stage → 0.1.0

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.
package/dist/bin.js ADDED
@@ -0,0 +1,450 @@
1
+ #!/usr/bin/env node
2
+
3
+ // ../inspector/src/verify.ts
4
+ var CHAIN_ID = 84532;
5
+ var RPCS = ["https://sepolia.base.org", "https://base-sepolia-rpc.publicnode.com"];
6
+ var DEPLOYMENTS_URL = "https://raw.githubusercontent.com/proof402/proof402/main/deployments/basesepolia.json";
7
+ var CIRCLE_USDC = "0x036cbd53842c5426634e7929541ec2318f3dcf7e";
8
+ var STATES = ["None", "Open", "Captured", "Reclaimed", "Voided"];
9
+ var POLICY = {
10
+ name: "policy",
11
+ type: "tuple",
12
+ components: [
13
+ { name: "version", type: "uint16" },
14
+ { name: "chainId", type: "uint64" },
15
+ { name: "buyer", type: "address" },
16
+ { name: "seller", type: "address" },
17
+ { name: "verifier", type: "address" },
18
+ { name: "target", type: "address" },
19
+ { name: "invariantId", type: "bytes32" },
20
+ { name: "maxAmount", type: "uint256" },
21
+ { name: "deadline", type: "uint64" },
22
+ { name: "salt", type: "uint256" }
23
+ ]
24
+ };
25
+ var ESCROW_ABI = [
26
+ {
27
+ type: "function",
28
+ name: "tasks",
29
+ stateMutability: "view",
30
+ inputs: [{ name: "", type: "uint256" }],
31
+ outputs: [POLICY, { name: "policyHash", type: "bytes32" }, { name: "state", type: "uint8" }, { name: "attemptCount", type: "uint16" }]
32
+ },
33
+ { type: "function", name: "token", stateMutability: "view", inputs: [], outputs: [{ name: "", type: "address" }] },
34
+ {
35
+ type: "event",
36
+ name: "TaskCreated",
37
+ inputs: [{ name: "taskId", type: "uint256", indexed: true }, { ...POLICY, indexed: false }, { name: "policyHash", type: "bytes32", indexed: false }]
38
+ },
39
+ {
40
+ type: "event",
41
+ name: "EvidenceSubmitted",
42
+ inputs: [
43
+ { name: "taskId", type: "uint256", indexed: true },
44
+ { name: "evidenceHash", type: "bytes32", indexed: true },
45
+ { name: "attempt", type: "uint256", indexed: false },
46
+ { name: "passed", type: "bool", indexed: false }
47
+ ]
48
+ },
49
+ {
50
+ type: "event",
51
+ name: "TaskCaptured",
52
+ inputs: [
53
+ { name: "taskId", type: "uint256", indexed: true },
54
+ { name: "seller", type: "address", indexed: true },
55
+ { name: "payout", type: "uint256", indexed: false },
56
+ { name: "fee", type: "uint256", indexed: false }
57
+ ]
58
+ },
59
+ {
60
+ type: "event",
61
+ name: "TaskReclaimed",
62
+ inputs: [{ name: "taskId", type: "uint256", indexed: true }, { name: "buyer", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }]
63
+ },
64
+ {
65
+ type: "event",
66
+ name: "TaskVoided",
67
+ inputs: [{ name: "taskId", type: "uint256", indexed: true }, { name: "buyer", type: "address", indexed: true }, { name: "amount", type: "uint256", indexed: false }]
68
+ },
69
+ {
70
+ type: "event",
71
+ name: "Transfer",
72
+ inputs: [{ name: "from", type: "address", indexed: true }, { name: "to", type: "address", indexed: true }, { name: "value", type: "uint256", indexed: false }]
73
+ }
74
+ ];
75
+ var VERIFY_CHECKS = [
76
+ { id: "anchor", label: "Escrow address matches the one published in the public repo" },
77
+ { id: "token", label: "Settlement token is Circle's testnet USDC" },
78
+ { id: "terms", label: "Terms stored on chain match the terms shown" },
79
+ { id: "hash", label: "Terms hash recomputed in your browser matches" },
80
+ { id: "state", label: "State and number of proofs match" },
81
+ { id: "opened", label: "Opening transaction created this task" },
82
+ { id: "proofs", label: "Every proof shown is in its transaction, with the same verdict" },
83
+ { id: "settled", label: "Settlement moved the money as shown" }
84
+ ];
85
+ var lc = (s) => (s ?? "").toLowerCase();
86
+ var shortAddr = (a) => `${a.slice(0, 6)}…${a.slice(-4)}`;
87
+ async function verifyTask(task, attempts, update, opts = {}) {
88
+ const viem = await import("viem");
89
+ const { baseSepolia } = await import("viem/chains");
90
+ let calls = 0;
91
+ const transport = viem.fallback(((opts.rpcUrls?.length) ? opts.rpcUrls : RPCS).map((url) => viem.http(url, { timeout: 12000, retryCount: 1, onFetchRequest: () => void calls++ })));
92
+ const client = viem.createPublicClient({ chain: baseSepolia, transport });
93
+ const escrow = viem.getAddress(task.escrow);
94
+ const run = async (id, fn) => {
95
+ update(id, "running");
96
+ try {
97
+ const r = await fn();
98
+ if (typeof r === "string")
99
+ update(id, "ok", r);
100
+ else
101
+ update(id, "skip", r.skip);
102
+ } catch (e) {
103
+ update(id, "fail", e instanceof Error ? e.message.split(`
104
+ `)[0].slice(0, 220) : String(e));
105
+ }
106
+ };
107
+ const must = (cond, msg) => {
108
+ if (!cond)
109
+ throw new Error(msg);
110
+ };
111
+ if (task.chain_id !== CHAIN_ID) {
112
+ for (const c of VERIFY_CHECKS)
113
+ update(c.id, "skip", "This check reads Base Sepolia; this task is on another chain.");
114
+ return 0;
115
+ }
116
+ await run("anchor", async () => {
117
+ let res;
118
+ try {
119
+ res = await fetch(opts.deploymentsUrl ?? DEPLOYMENTS_URL, { cache: "no-store", credentials: "omit" });
120
+ } catch {
121
+ return { skip: "Couldn't reach GitHub." };
122
+ }
123
+ if (!res.ok)
124
+ return { skip: `The public repo isn't reachable (HTTP ${res.status}).` };
125
+ const d = await res.json();
126
+ if (lc(d.escrow) === lc(escrow))
127
+ return `${shortAddr(escrow)}, as in deployments/basesepolia.json`;
128
+ const prev = (d.previousEscrows ?? []).find((p) => lc(p.address) === lc(escrow));
129
+ must(!!prev, `This page reads ${shortAddr(escrow)}, the repo publishes ${shortAddr(d.escrow ?? "none")}.`);
130
+ return `${shortAddr(escrow)}, listed in deployments/basesepolia.json as the escrow before ${shortAddr(d.escrow ?? "")}`;
131
+ });
132
+ await run("token", async () => {
133
+ const token = await client.readContract({ address: escrow, abi: ESCROW_ABI, functionName: "token" });
134
+ must(lc(token) === CIRCLE_USDC, `The escrow settles in ${shortAddr(token)}, not Circle USDC.`);
135
+ return `${shortAddr(token)} (USDC)`;
136
+ });
137
+ let stored;
138
+ try {
139
+ stored = await client.readContract({ address: escrow, abi: ESCROW_ABI, functionName: "tasks", args: [BigInt(task.task_id)] });
140
+ } catch (e) {
141
+ const why = `Couldn't read the task from the chain: ${e instanceof Error ? e.message.split(`
142
+ `)[0].slice(0, 160) : e}`;
143
+ for (const c of VERIFY_CHECKS.slice(2))
144
+ update(c.id, "fail", why);
145
+ return calls;
146
+ }
147
+ const [policy, policyHash, stateIx, attemptCount] = stored;
148
+ await run("terms", async () => {
149
+ const diffs = [];
150
+ const cmp = (name, chain, shown) => {
151
+ if (lc(String(chain)) !== lc(String(shown)))
152
+ diffs.push(`${name}: chain ${String(chain)}, shown ${String(shown)}`);
153
+ };
154
+ cmp("chain", policy.chainId, task.chain_id);
155
+ cmp("buyer", policy.buyer, task.buyer);
156
+ cmp("seller", policy.seller, task.seller);
157
+ cmp("verifier", policy.verifier, task.verifier);
158
+ cmp("target", policy.target, task.target);
159
+ cmp("rule", policy.invariantId, task.invariant_id);
160
+ cmp("amount", policy.maxAmount, task.max_amount);
161
+ cmp("deadline", policy.deadline, task.deadline);
162
+ must(diffs.length === 0, diffs.join("; "));
163
+ return "Buyer, seller, verifier, target, rule, amount and deadline all agree";
164
+ });
165
+ await run("hash", async () => {
166
+ const local = viem.keccak256(viem.encodeAbiParameters([POLICY], [policy]));
167
+ must(local === policyHash, `Recomputed ${local.slice(0, 12)}…, chain stores ${policyHash.slice(0, 12)}…`);
168
+ must(lc(local) === lc(task.policy_hash), `Chain and your browser agree on ${local.slice(0, 12)}…, but this page shows ${task.policy_hash.slice(0, 12)}…`);
169
+ return `${local.slice(0, 18)}…`;
170
+ });
171
+ await run("state", async () => {
172
+ const state = STATES[stateIx] ?? `unknown(${stateIx})`;
173
+ must(state === task.state, `Chain says ${state}, page says ${task.state}.`);
174
+ must(attemptCount === task.attempts && attemptCount === attempts.length, `Chain counts ${attemptCount} proofs; page shows ${attempts.length}.`);
175
+ return `${state}, ${attemptCount} proof${attemptCount === 1 ? "" : "s"}`;
176
+ });
177
+ const eventsIn = async (hash) => {
178
+ const rc = await client.getTransactionReceipt({ hash });
179
+ must(rc.status === "success", "The transaction reverted.");
180
+ const events = rc.logs.flatMap((l) => {
181
+ try {
182
+ return [{ address: lc(l.address), ...viem.decodeEventLog({ abi: ESCROW_ABI, data: l.data, topics: l.topics }) }];
183
+ } catch {
184
+ return [];
185
+ }
186
+ });
187
+ return { rc, events };
188
+ };
189
+ const id = BigInt(task.task_id);
190
+ await run("opened", async () => {
191
+ const { rc, events } = await eventsIn(task.created_tx);
192
+ must(Number(rc.blockNumber) === task.created_block, `Mined in block ${rc.blockNumber}, page says ${task.created_block}.`);
193
+ const ev = events.find((e) => e.address === lc(escrow) && e.eventName === "TaskCreated" && e.args.taskId === id);
194
+ must(!!ev, "No TaskCreated event for this task in that transaction.");
195
+ must(lc(ev.args.policyHash) === lc(policyHash), "The event's terms hash differs from storage.");
196
+ return `Block ${rc.blockNumber.toLocaleString("en-US")}`;
197
+ });
198
+ await run("proofs", async () => {
199
+ if (attempts.length === 0)
200
+ return { skip: "No proofs submitted yet." };
201
+ for (const a of attempts) {
202
+ const { events } = await eventsIn(a.tx_hash);
203
+ const ev = events.find((e) => {
204
+ if (e.address !== lc(escrow) || e.eventName !== "EvidenceSubmitted")
205
+ return false;
206
+ const g = e.args;
207
+ return g.taskId === id && Number(g.attempt) === a.attempt;
208
+ });
209
+ must(!!ev, `Proof ${a.attempt}: no matching event in its transaction.`);
210
+ const g = ev.args;
211
+ must(lc(g.evidenceHash) === lc(a.evidence_hash), `Proof ${a.attempt}: evidence hash differs.`);
212
+ must(g.passed === a.passed, `Proof ${a.attempt}: chain says ${g.passed ? "verified" : "refused"}, page says ${a.passed ? "verified" : "refused"}.`);
213
+ }
214
+ const ok = attempts.filter((a) => a.passed).length;
215
+ return `${attempts.length} of ${attempts.length} match (${ok} verified, ${attempts.length - ok} refused)`;
216
+ });
217
+ await run("settled", async () => {
218
+ if (task.state === "Open")
219
+ return { skip: "Not settled yet: the money is still held." };
220
+ must(!!task.terminal_tx, "The page shows no settlement transaction.");
221
+ const { events } = await eventsIn(task.terminal_tx);
222
+ const token = lc(CIRCLE_USDC);
223
+ const transfer = (to, value) => events.some((e) => {
224
+ if (e.address !== token || e.eventName !== "Transfer")
225
+ return false;
226
+ const g = e.args;
227
+ return lc(g.from) === lc(escrow) && lc(g.to) === lc(to) && g.value === value;
228
+ });
229
+ if (task.state === "Captured") {
230
+ const ev = events.find((e) => e.address === lc(escrow) && e.eventName === "TaskCaptured" && e.args.taskId === id);
231
+ must(!!ev, "No TaskCaptured event in the settlement transaction.");
232
+ const g = ev.args;
233
+ must(lc(g.seller) === lc(policy.seller), "Paid to someone other than the seller in the terms.");
234
+ must(String(g.payout) === task.payout && String(g.fee) === task.fee, `Chain: payout ${g.payout}, fee ${g.fee}; page: ${task.payout}, ${task.fee}.`);
235
+ must(transfer(policy.seller, g.payout), "The token contract shows no matching transfer to the seller.");
236
+ return `${viem.formatUnits(g.payout, 6)} USDC transferred to ${shortAddr(policy.seller)}`;
237
+ }
238
+ const name = task.state === "Reclaimed" ? "TaskReclaimed" : "TaskVoided";
239
+ const ev = events.find((e) => e.address === lc(escrow) && e.eventName === name && e.args.taskId === id);
240
+ must(!!ev, `No ${name} event in the settlement transaction.`);
241
+ const g = ev.args;
242
+ must(lc(g.buyer) === lc(policy.buyer) && String(g.amount) === task.refunded, "Refund amount or recipient differs.");
243
+ must(transfer(policy.buyer, g.amount), "The token contract shows no matching refund transfer.");
244
+ return `${viem.formatUnits(g.amount, 6)} USDC returned to ${shortAddr(policy.buyer)}`;
245
+ });
246
+ return calls;
247
+ }
248
+
249
+ // ../inspector/src/signature.ts
250
+ var SIGN_DOMAIN = "proof402-answer/v1";
251
+ function parseSignature(header) {
252
+ const out = {};
253
+ for (const part of header.split(",")) {
254
+ const i = part.indexOf("=");
255
+ if (i > 0)
256
+ out[part.slice(0, i).trim()] = part.slice(i + 1).trim();
257
+ }
258
+ return out;
259
+ }
260
+ function signedMessage(uri, body) {
261
+ const head = new TextEncoder().encode(`${SIGN_DOMAIN}
262
+ ${uri}
263
+ `);
264
+ const m = new Uint8Array(head.length + body.length);
265
+ m.set(head);
266
+ m.set(body, head.length);
267
+ return m;
268
+ }
269
+ var b64 = (s) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));
270
+ async function verifyAnswer(uri, body, header, keys) {
271
+ const p = parseSignature(header);
272
+ const key = keys.keys.find((k) => k.keyid === p.keyid);
273
+ if (!key)
274
+ return { keyid: p.keyid ?? "", signer: "", secp256k1: false, mldsa65: false, error: "signed by a key that is not published" };
275
+ const msg = signedMessage(uri, body);
276
+ const [{ keccak256, recoverMessageAddress }, { ml_dsa65 }] = await Promise.all([import("viem"), import("@noble/post-quantum/ml-dsa.js")]);
277
+ let ec = false;
278
+ try {
279
+ const who = await recoverMessageAddress({ message: { raw: keccak256(msg) }, signature: p.secp256k1 });
280
+ ec = who.toLowerCase() === key.secp256k1.toLowerCase();
281
+ } catch {
282
+ ec = false;
283
+ }
284
+ let ml = false;
285
+ try {
286
+ ml = ml_dsa65.verify(b64(p.mldsa65 ?? ""), msg, b64(key.mldsa65), { context: new TextEncoder().encode(SIGN_DOMAIN) });
287
+ } catch {
288
+ ml = false;
289
+ }
290
+ return { keyid: key.keyid, signer: key.secp256k1, secp256k1: ec, mldsa65: ml };
291
+ }
292
+
293
+ // src/api.ts
294
+ var DEFAULT_API = "https://proof402.isworking.dev";
295
+ var TIMEOUT_MS = 15000;
296
+ async function get(url) {
297
+ const res = await fetch(url, { headers: { accept: "application/json" }, signal: AbortSignal.timeout(TIMEOUT_MS) });
298
+ if (!res.ok) {
299
+ const hint = res.status === 404 ? " (no such task?)" : "";
300
+ throw new Error(`GET ${url} → HTTP ${res.status}${hint}`);
301
+ }
302
+ return res;
303
+ }
304
+ async function fetchSigned(url, keys) {
305
+ const res = await get(url);
306
+ const bytes = new Uint8Array(await res.arrayBuffer());
307
+ const header = res.headers.get("proof402-signature");
308
+ const u = new URL(url);
309
+ const signature = header ? await verifyAnswer(u.pathname + u.search, bytes, header, keys) : { keyid: "", signer: "", secp256k1: false, mldsa65: false, error: "the answer carries no signature" };
310
+ let body;
311
+ try {
312
+ body = JSON.parse(new TextDecoder().decode(bytes));
313
+ } catch {
314
+ throw new Error(`GET ${url} did not return JSON`);
315
+ }
316
+ return { url, body, signature };
317
+ }
318
+ async function fetchTask(taskId, chainId = 84532, api = DEFAULT_API) {
319
+ const base = api.replace(/\/+$/, "");
320
+ const keys = await (await get(`${base}/.well-known/proof402-keys.json`)).json();
321
+ if (!Array.isArray(keys?.keys) || keys.keys.length === 0)
322
+ throw new Error(`${base} publishes no signing keys`);
323
+ const [task, attempts] = await Promise.all([
324
+ fetchSigned(`${base}/v1/tasks/${chainId}/${taskId}`, keys),
325
+ fetchSigned(`${base}/v1/tasks/${chainId}/${taskId}/attempts`, keys)
326
+ ]);
327
+ if (task.body.task_id !== taskId || task.body.chain_id !== chainId)
328
+ throw new Error(`asked for task ${taskId} on chain ${chainId}, the API answered task ${task.body.task_id} on chain ${task.body.chain_id}`);
329
+ if (!Array.isArray(attempts.body.attempts) || attempts.body.attempts.some((a) => a.task_id !== taskId || a.chain_id !== chainId))
330
+ throw new Error(`the API's proof list for task ${taskId} contains another task's proofs`);
331
+ return { task, attempts };
332
+ }
333
+
334
+ // src/cli.ts
335
+ var USAGE = `Usage: proof402-verify <task-id> [options]
336
+
337
+ Re-checks a Proof402 task against Base Sepolia's public RPC: the terms, the terms hash,
338
+ every proof's verdict and the token transfer. The Proof402 API supplies the claim to
339
+ check, and its answers' signatures are verified too.
340
+
341
+ Options:
342
+ --api <url> Proof402 API to read the claim from (default ${DEFAULT_API})
343
+ --rpc <url> Base Sepolia JSON-RPC endpoint; repeat for fallbacks (default: public endpoints)
344
+ --anchor <url> where the escrow address is published (default: the repo's deployments file)
345
+ --json print one JSON object instead of text
346
+ -h, --help show this help
347
+ -v, --version show the version`;
348
+ var VERSION = "0.1.0";
349
+ var CHAIN_ID2 = 84532;
350
+ function parseArgs(argv) {
351
+ const a = { taskId: NaN, api: DEFAULT_API, rpc: [], json: false };
352
+ for (let i = 0;i < argv.length; i++) {
353
+ const v = argv[i];
354
+ const next = () => {
355
+ const n = argv[++i];
356
+ if (n === undefined || n.startsWith("--"))
357
+ throw new Error(`${v} needs a value`);
358
+ return n;
359
+ };
360
+ try {
361
+ if (v === "-h" || v === "--help")
362
+ return { exit: 0, out: USAGE };
363
+ if (v === "-v" || v === "--version")
364
+ return { exit: 0, out: VERSION };
365
+ if (v === "--json")
366
+ a.json = true;
367
+ else if (v === "--api")
368
+ a.api = httpUrl(next());
369
+ else if (v === "--rpc")
370
+ a.rpc.push(httpUrl(next()));
371
+ else if (v === "--anchor")
372
+ a.anchor = httpUrl(next());
373
+ else if (/^\d+$/.test(v) && Number.isNaN(a.taskId))
374
+ a.taskId = Number(v);
375
+ else
376
+ throw new Error(`unexpected argument: ${v}`);
377
+ } catch (e) {
378
+ return { exit: 2, out: `${e.message}
379
+
380
+ ${USAGE}` };
381
+ }
382
+ }
383
+ if (!Number.isSafeInteger(a.taskId) || a.taskId < 1)
384
+ return { exit: 2, out: USAGE };
385
+ return a;
386
+ }
387
+ function httpUrl(s) {
388
+ let u;
389
+ try {
390
+ u = new URL(s);
391
+ } catch {
392
+ throw new Error(`not a URL: ${s}`);
393
+ }
394
+ if (u.protocol !== "https:" && u.protocol !== "http:")
395
+ throw new Error(`not an http(s) URL: ${s}`);
396
+ return u.toString().replace(/\/+$/, "");
397
+ }
398
+ var MARK = { pending: " ", running: " ", ok: "✓", fail: "✗", skip: "–" };
399
+ var clean = (s) => s.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
400
+ async function main(argv) {
401
+ const args = parseArgs(argv);
402
+ if ("exit" in args) {
403
+ (args.exit === 0 ? console.log : console.error)(args.out);
404
+ return args.exit;
405
+ }
406
+ let fetched;
407
+ try {
408
+ fetched = await fetchTask(args.taskId, CHAIN_ID2, args.api);
409
+ } catch (e) {
410
+ console.error(`proof402-verify: ${clean(e.message)}`);
411
+ return 2;
412
+ }
413
+ const { task, attempts } = fetched;
414
+ const sigs = [task.signature, attempts.signature];
415
+ const signed = sigs.every((s) => s.secp256k1 && s.mldsa65);
416
+ const results = new Map;
417
+ let calls = 0;
418
+ try {
419
+ calls = await verifyTask(task.body, attempts.body.attempts, (id, status, detail) => {
420
+ if (status !== "running")
421
+ results.set(id, { status, detail });
422
+ }, { rpcUrls: args.rpc, deploymentsUrl: args.anchor });
423
+ } catch (e) {
424
+ console.error(`proof402-verify: ${clean(e.message)}`);
425
+ return 2;
426
+ }
427
+ const checks = VERIFY_CHECKS.map((c) => ({ id: c.id, label: c.label.replace("in your browser", "on this machine"), ...results.get(c.id) ?? { status: "skip", detail: "not run" } }));
428
+ const failed = checks.filter((c) => c.status === "fail").length;
429
+ const ok = !failed && signed;
430
+ if (args.json) {
431
+ console.log(JSON.stringify({ ok, task: args.taskId, chainId: CHAIN_ID2, state: task.body.state, api: args.api, signatures: sigs, checks, rpcCalls: calls }, null, 2));
432
+ } else {
433
+ console.log(`Proof402 task ${args.taskId} on Base Sepolia: ${clean(String(task.body.state))}, as reported by ${args.api}`);
434
+ const sigLine = (name, s) => s.error ? `${MARK.fail} ${name}: ${clean(s.error)}` : `${s.secp256k1 && s.mldsa65 ? MARK.ok : MARK.fail} ${name} signed by key ${clean(String(s.keyid ?? "?"))}: secp256k1 ${s.secp256k1 ? "valid" : "INVALID"}, ML-DSA-65 ${s.mldsa65 ? "valid" : "INVALID"}`;
435
+ console.log(sigLine("Task answer", task.signature));
436
+ console.log(sigLine("Proofs answer", attempts.signature));
437
+ for (const c of checks)
438
+ console.log(`${MARK[c.status]} ${c.label}${c.detail ? `
439
+ ${clean(c.detail)}` : ""}`);
440
+ const passed = checks.filter((c) => c.status === "ok").length;
441
+ const skipped = checks.filter((c) => c.status === "skip").length;
442
+ console.log(failed ? `
443
+ ${failed} check${failed === 1 ? "" : "s"} failed. The chain does not match what the API reports.` : `
444
+ ${passed} of ${passed + skipped} chain checks passed${skipped ? ` (${skipped} skipped)` : ""}, from ${calls} reads of Base Sepolia's RPC.${signed ? "" : " The API's signatures did not verify."}`);
445
+ }
446
+ return failed ? 1 : signed ? 0 : 1;
447
+ }
448
+
449
+ // src/bin.ts
450
+ main(process.argv.slice(2)).then((code) => process.exit(code));