ccip-router 0.2.0 → 0.3.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/README.md CHANGED
@@ -108,7 +108,7 @@ graph TB
108
108
  S["EIP-191 · Record signing\nkeccak256(inputHash · namespace · valueHash · ts)"]
109
109
  W["WYRIWE · Input provenance\nsentinel path: inputHash = rawInputHash\nnon-sentinel: inputHash = keccak256(abi.encode(raw, pipelineHash))"]
110
110
  I["ERC-8004 · Agent identity\nagentId · registryAddress declared on-chain"]
111
- O["OCP / ERC-8263 · Observation commitment\ncommitmentHash = keccak256(agentId · modelHash · inputHash · outputHash · ts)"]
111
+ O["OCP / ERC-8263 · Observation commitment\ncommitmentHash = keccak256(agentId · modelHash · inputHash · outputHash · ts)\nproofHash in TruthAnchorV1 = commitmentHash"]
112
112
  A["EIP-712 · WyriweAttestation\nstructured signing · verifiable by any peer · synced by mesh"]
113
113
  V["VNI · Node identity\nEIP-191 signed { nodeId · signerAddress · url · version · ts }"]
114
114
  C["On-chain anchoring · Sepolia\nAttestationIndex — signerOf · commitmentOf\nNodeRegistry — register(url, sig)"]
@@ -120,13 +120,24 @@ graph TB
120
120
 
121
121
  ## Contracts
122
122
 
123
- Both contracts are permissionless — no owner, no admin. One deployment per chain serves all nodes.
123
+ All ccip-router contracts are permissionless — no owner, no admin. One deployment per chain serves all nodes.
124
124
 
125
125
  | Contract | Sepolia address | Purpose |
126
126
  |---|---|---|
127
- | `AttestationIndex` | [`0x107D706112225aC57eCf6692FBbDC283fb6E3698`](https://sepolia.etherscan.io/address/0x107D706112225aC57eCf6692FBbDC283fb6E3698) | Anchors EIP-712 `WyriweAttestation` records on-chain. Stores `signerOf[commitmentHash]` and `commitmentOf[inputHash]`. |
127
+ | `AttestationIndex` | [`0x107D706112225aC57eCf6692FBbDC283fb6E3698`](https://sepolia.etherscan.io/address/0x107D706112225aC57eCf6692FBbDC283fb6E3698) | ccip-router's OCP-compatible commitment store. Stores `signerOf[commitmentHash]` and `commitmentOf[inputHash]`. Valid OCP anchor — distinct from the ERC-8263 canonical contract. |
128
128
  | `NodeRegistry` | [`0x6be4966596A9CBaa7260ab6EbbFFA69bBC9a42b7`](https://sepolia.etherscan.io/address/0x6be4966596A9CBaa7260ab6EbbFFA69bBC9a42b7) | Public directory of nodes. `register(url, sig)` proves key ownership via EIP-191 — the relayer (`msg.sender`) does not need to be the signing key. |
129
- | `WyriweAttestationVerifier` | [`0x9515D6e53D2D45C1CFE6181943ca11C150C2bf61`](https://sepolia.etherscan.io/address/0x9515D6e53D2D45C1CFE6181943ca11C150C2bf61) | ERC-8183 `IAttestationVerifier` implementation. `verify(commitmentHash, abi.encode(WyriweAttestation, sig))` — recovers signer, recomputes OCP commitment, returns bool. No external calls. |
129
+ | `WyriweProofVerifier` | [`0x001eFFa0fD1D171b164808644678F3301d8EDC96`](https://sepolia.etherscan.io/address/0x001eFFa0fD1D171b164808644678F3301d8EDC96) | ERC-8274 `IProofVerifier` implementation. `verify(inputHash, outputHash, abi.encode(agentId, registry), abi.encode(modelHash, rawInputHash, sanitizationPipelineHash, commitmentHash, timestamp, sig))` — recomputes OCP commitment, recovers signer, returns bool. No external calls. |
130
+ | `WyriweAttestationVerifier` *(deprecated)* | [`0x9515D6e53D2D45C1CFE6181943ca11C150C2bf61`](https://sepolia.etherscan.io/address/0x9515D6e53D2D45C1CFE6181943ca11C150C2bf61) | ERC-8183 `IAttestationVerifier`. Superseded by `WyriweProofVerifier`. |
131
+
132
+ **ERC-8263 canonical reference contract** (Vincent Wu, not ccip-router):
133
+
134
+ | Contract | Sepolia | Mainnet |
135
+ |---|---|---|
136
+ | `TruthAnchorV1` | [`0x89EE9b68c3b2f50cbE9D0fC4Dc134939a0475c1C`](https://sepolia.etherscan.io/address/0x89EE9b68c3b2f50cbE9D0fC4Dc134939a0475c1C) | [`0xe95d6a15966984c209a62a2c188828555eb5ec3d`](https://etherscan.io/address/0xe95d6a15966984c209a62a2c188828555eb5ec3d) |
137
+
138
+ `TruthAnchorV1` emits the canonical `AnchorProof(uint8 agentIdScheme, bytes32 agentId, bytes32 proofHash, address operator, bytes aux)` event that OCP's ERC-8263 extraction rule is written against. `AttestationIndex` sits alongside it as the transport-layer commitment store — the two are separate primitives by design.
139
+
140
+ **How ccip-router connects to ERC-8263:** `proofHash` in `TruthAnchorV1` = `commitmentHash` in the `WyriweAttestation` struct = `keccak256(abi.encode(agentId, modelHash, inputHash, outputHash, timestamp))`. The full chain: inference runs → gateway signs `WyriweAttestation` (producing `commitmentHash`) → `anchor(commitmentHash)` is called on `TruthAnchorV1` → `AnchorProof` event is emitted. To verify L3 anchoring, filter `AnchorProof` by the `proofHash` topic (= your `commitmentHash`) and compare the anchoring block's timestamp against your execution time. This is an `eth_getLogs` read — V1 is event-only by design (no per-anchor storage cost). A synchronous on-chain view (`IAnchorReader`) is proposed for ERC-8263 v0.3.
130
141
 
131
142
  Deployed by [`0xFf9a176577Fb42b6bc9c19fd05a241e8fCd0ca14`](https://sepolia.etherscan.io/address/0xFf9a176577Fb42b6bc9c19fd05a241e8fCd0ca14) · Solc 0.8.24 · optimizer 200 runs.
132
143
 
@@ -134,7 +145,7 @@ Deployed by [`0xFf9a176577Fb42b6bc9c19fd05a241e8fCd0ca14`](https://sepolia.ether
134
145
 
135
146
  **To deploy to another chain:** open the admin panel → Deploy contracts → select the chain → connect wallet → three transactions (one per contract). No private key is stored — MetaMask signs everything in-browser.
136
147
 
137
- Source: [`contracts/AttestationIndex.sol`](contracts/AttestationIndex.sol) · [`contracts/NodeRegistry.sol`](contracts/NodeRegistry.sol) · [`contracts/WyriweAttestationVerifier.sol`](contracts/WyriweAttestationVerifier.sol)
148
+ Source: [`contracts/AttestationIndex.sol`](contracts/AttestationIndex.sol) · [`contracts/NodeRegistry.sol`](contracts/NodeRegistry.sol) · [`contracts/IProofVerifier.sol`](contracts/IProofVerifier.sol) · [`contracts/WyriweProofVerifier.sol`](contracts/WyriweProofVerifier.sol)
138
149
 
139
150
  ---
140
151
 
@@ -165,6 +176,40 @@ What you get:
165
176
  - Admin dashboard at `/admin` with peer management + sync controls
166
177
  - Setup wizard at `/setup` on first boot
167
178
 
179
+ ### ENS — built-in wildcard resolver
180
+
181
+ `withEns()` decodes `resolve(bytes name, bytes data)` calldata (EIP-137 wildcard pattern), dispatches to a clean handler, and ABI-encodes the response. DNS wire-format, selector dispatch, and null-to-zero-value fallbacks are handled for you.
182
+
183
+ ```typescript
184
+ import { CcipRouter, withEns } from 'ccip-router'
185
+ import type { EnsResolverFn } from 'ccip-router'
186
+
187
+ const resolver: EnsResolverFn = async (name, record) => {
188
+ // name → "vitalik.eth"
189
+ // record → { type: 'addr' } | { type: 'addr', coinType: 60n }
190
+ // { type: 'text', key: 'avatar' } | { type: 'contenthash' }
191
+ return db.lookup(name, record) // return string or null
192
+ }
193
+
194
+ const ccip = new CcipRouter({
195
+ namespace: 'ens-offchain',
196
+ db,
197
+ gatewayKey: process.env.GATEWAY_PRIVATE_KEY,
198
+ resolver: withEns(resolver),
199
+ })
200
+ ```
201
+
202
+ **Standalone mode:** ENS records are managed from the admin panel ("ENS Records" panel — no code required). Any name pointing to this gateway via an on-chain CCIP-Read wildcard resolver is served automatically.
203
+
204
+ **Compose with attestation:**
205
+ ```typescript
206
+ resolver: withWyriwe(withEns(resolver), attestationOpts)
207
+ ```
208
+
209
+ Use `isEnsCalldata(calldata)` to safely gate `withEns()` in a multi-purpose resolver that also handles non-ENS calldata.
210
+
211
+ ---
212
+
168
213
  ### Advanced — wrap any resolver with WYRIWE EIP-712 attestation
169
214
 
170
215
  ```typescript
@@ -200,9 +245,13 @@ What `withWyriwe()` adds on top of basic:
200
245
  ```bash
201
246
  npm install
202
247
  npm run dev
203
- # → open http://localhost:3000
204
- # → setup wizard walks you through key generation + config
205
- # → config.json is written, node restarts, /admin loads
248
+ # → open http://localhost:3000/setup
249
+ # → step 1: generate or import your signing key
250
+ # → step 2: optional Bearer secret for CLI access
251
+ # → step 3: namespace, port, sync interval
252
+ # → step 4: confirm → config.json written, node restarts
253
+ # → /admin/login: connect any MetaMask wallet → first signer claims admin
254
+ # → /admin: dashboard ready
206
255
  ```
207
256
 
208
257
  Or configure via environment (no wizard needed):
@@ -244,12 +293,17 @@ Visit `/admin` after setup. Features:
244
293
  - Live stats: record count, peer count, last sync time
245
294
  - Peer panel: add/remove peers, per-peer health + signer address + last sync
246
295
  - Recent records panel: local vs peer-synced, timestamps
296
+ - ENS records panel — add/edit/delete addr, text, contenthash records without a restart
247
297
  - Manual sync trigger
248
298
  - Auto-refresh every 15 seconds
249
299
 
250
- **Auth:** If `ADMIN_SECRET` is set, `/admin` requires a login (cookie session, 7-day). API routes also accept `Authorization: Bearer <secret>` for programmatic access.
300
+ **Auth — claim on first login (EIP-4361 SIWE):** On a fresh node the login page shows an amber "Unclaimed node" banner. Connect any browser wallet and sign once — that wallet address is saved to `config.json` as the permanent admin. Subsequent logins must match that address. Admin wallet is completely decoupled from the gateway signing key (`GATEWAY_PRIVATE_KEY` stays server-side).
301
+
302
+ **Transfer admin:** While logged in, open the "Admin wallet" panel → Transfer. Switch MetaMask to the new wallet, sign a transfer message to prove ownership — `adminAddress` is updated live and a new session is issued, no restart required.
303
+
304
+ **Bearer fallback:** `Authorization: Bearer <ADMIN_SECRET>` always works for CLI / scripts regardless of SIWE state.
251
305
 
252
- **Stack status row:** A compact pill row below the header shows which tiers are active — Signing / ERC-8004 / WYRIWE / OCP — derived from `/admin/api/status`. Green = active, grey = unconfigured.
306
+ **Stack status row:** A compact pill row below the header shows which tiers are active — Signing / ERC-8004 / WYRIWE / OCP / VNI / On-chain — derived from `/admin/api/status`. Green = active, grey = unconfigured.
253
307
 
254
308
  **Node logs panel:** Live ring buffer of the last 200 log lines (info/warn/error), colour-coded. Auto-refreshes every 10 seconds.
255
309
 
@@ -314,7 +368,7 @@ GET /{sender}/{data}.json
314
368
  GET /records?namespace=<str>&since=<unix>&limit=<n>&cursor=<str>
315
369
  → {
316
370
  protocol: 1,
317
- node_version: "0.1.0",
371
+ node_version: "0.2.0",
318
372
  namespace: "agent-attestations",
319
373
  records: [{ inputHash, namespace, key, value, timestamp, signature, sourcePeer }],
320
374
  cursor: "<next>" | null
@@ -402,19 +456,37 @@ GET /health
402
456
  }
403
457
  ```
404
458
 
405
- ### Admin API (requires auth if ADMIN_SECRET set)
459
+ ### Admin auth (SIWE + Bearer)
406
460
  ```
407
- GET /admin/api/status node info, peers, recent records, tiers
461
+ GET /admin/siwe/nonce { nonce, domain, chainId, authorizedAddress, claimed }
462
+ POST /admin/siwe/verify { message, signature }
463
+ unclaimed node → first caller claims admin, saved to config.json
464
+ claimed node → must match stored adminAddress
465
+ → { ok, address, claimed, redirect }
466
+ POST /admin/siwe/transfer { message, signature } — signed by NEW wallet
467
+ current session required; updates adminAddress live
468
+ → { ok, address }
469
+ POST /admin/logout clear session cookie
470
+ ```
471
+
472
+ ### Admin API (requires auth)
473
+ ```
474
+ GET /admin/api/status node info, peers, recent records, tiers, adminAddress
408
475
  GET /admin/api/logs last 200 log lines [{ ts, level, msg }]
409
- GET /admin/api/audit per-spec compliance report (EIP-3668/WYRIWE/ERC-8004/OCP)
476
+ GET /admin/api/audit per-spec compliance report (EIP-3668/WYRIWE/ERC-8004/OCP/VNI)
410
477
  POST /admin/api/sync trigger immediate peer sync
411
478
  POST /admin/api/publish batch-publish recent WYRIWE records to AttestationIndex
412
479
  body: { limit?: number } (default 50, max 200)
413
480
  → { published, skipped, errors }
414
481
  POST /admin/api/peers { url } — add peer
415
482
  DEL /admin/api/peers { url } — remove peer
416
- POST /admin/login { secret } set session cookie
417
- POST /admin/logout clear session cookie
483
+ GET /admin/api/ens-records ?name=list ENS records
484
+ POST /admin/api/ens-records { name, type, coinType?, textKey?, value } — upsert
485
+ DEL /admin/api/ens-records { name, type, coinType?, textKey? } — delete
486
+ GET /admin/api/config safe config snapshot (never exposes private key)
487
+ POST /admin/api/config update config fields → writes config.json, restarts node
488
+ POST /admin/api/key { gatewayKey } — rotate signing key → restart
489
+ POST /admin/api/register register node on-chain via NodeRegistry
418
490
  ```
419
491
 
420
492
  ---
@@ -445,7 +517,7 @@ Protocol version `1` is the current stable spec. Nodes on a different version ar
445
517
  | EIP-3668 | Transport | CCIP-Read client-to-gateway | ✅ implemented |
446
518
  | WYRIWE | L2 Input trust | Triple-hash commitment, EIP-712 attestation | ✅ implemented |
447
519
  | ERC-8004 | L1 Identity | Agent identity `agentId` + `registryAddress` in attestation | ✅ implemented |
448
- | OCP / ERC-8263 | L3 Observation | Observation commitment hash | ✅ implemented |
520
+ | OCP / ERC-8263 | L3 Observation | Observation commitment hash. `AttestationIndex` = OCP-compatible anchor. Canonical ERC-8263 reference: `TruthAnchorV1` (Vincent Wu). | ✅ implemented |
449
521
  | EIP-712 | L4 Attestation | Structured signing (via `withWyriwe`) | ✅ implemented |
450
522
  | VNI | L5 Node Identity | Signed node identity, peer gossip | ✅ implemented |
451
523
  | ERC-8275 | L6 Economics | Contribution attribution (MVP) | ✅ implemented |
@@ -512,6 +584,12 @@ Protocol version `1` is the current stable spec. Nodes on a different version ar
512
584
  **Setup wizard — node owner onboarding**
513
585
  - [x] Admin secret as dedicated step 2 — prominent warning box, two-step skip confirmation
514
586
  - [x] Post-setup checklist — signing ✓, admin ✓/⚠, WYRIWE/ERC-8004/VNI ○ with next-step hints
587
+ - [x] Spawn-based node restart (setup + config save) — works without a process manager
588
+ - [x] Claim-on-first-login — first MetaMask wallet to sign becomes permanent admin, no pre-configuration required
589
+ - [x] Admin transfer — logged-in admin proves new wallet ownership via SIWE, `adminAddress` updated live with no restart
590
+ - [x] ENS records panel — live table, add/delete addr / text / addr_coin / contenthash records, changes take effect immediately
591
+ - [x] Admin wallet panel in dashboard — current address, two-step transfer UI
592
+ - [x] `withEns()` — ENS wildcard resolver wrapper; DNS wire-format decode, selector dispatch (addr / addr_coin / text / contenthash), null → zero-value fallbacks, `isEnsCalldata()` guard
515
593
 
516
594
  ---
517
595
 
@@ -526,9 +604,9 @@ npm test
526
604
  Expected output:
527
605
 
528
606
  ```
529
- ℹ tests 49
530
- ℹ suites 16
531
- ℹ pass 49
607
+ ℹ tests 61
608
+ ℹ suites 22
609
+ ℹ pass 61
532
610
  ℹ fail 0
533
611
  ```
534
612
 
@@ -538,15 +616,37 @@ Expected output:
538
616
  |---|---|
539
617
  | `src/__tests__/gateway.test.ts` | `decodeRequest` — address + calldata parsing, `.json` suffix stripping, `CcipRequestError` on bad inputs; `encodeResponse` envelope |
540
618
  | `src/__tests__/crypto.test.ts` | `signRecord` / `recoverRecordSigner` round-trip; `verifyRecord` correct signer → `true`, wrong signer / tampered value → `false` |
541
- | `src/__tests__/db.test.ts` | `insertRecord`, `getRecord` (with/without namespace), `getRecordsByInputHash`, `INSERT OR IGNORE` deduplication, cursor pagination, `getContributions` grouping, peer upsert + remove |
619
+ | `src/__tests__/db.test.ts` | `insertRecord`, `getRecord` (with/without namespace), `getRecordsByInputHash`, `INSERT OR IGNORE` deduplication, cursor pagination, `getContributions` grouping, peer upsert + remove, ENS record upsert/delete/list |
542
620
  | `src/__tests__/ocp.test.ts` | `buildCommitmentHash` determinism, 32-byte hex output, field-sensitivity (agentId / outputHash / timestamp) |
543
621
  | `src/__tests__/wyriwe.test.ts` | Sentinel path (`inputHash === rawInputHash`), non-sentinel path (`keccak256(abi.encode(rawInputHash, sanitizationPipelineHash))`), paths produce distinct hashes for same calldata |
544
622
  | `src/__tests__/vni.test.ts` | `makeVni` field shape + stable `nodeId`; `verifyVni` round-trip; tamper detection (url / signerAddress / nodeId → `null`) |
623
+ | `src/__tests__/ens.test.ts` | DNS wire-format encode/decode round-trip; `withEns()` dispatch for all 4 record types (addr, addr_coin, text, contenthash); null → zero-value fallbacks; unknown selector → `0x`; wrong outer selector throws |
545
624
 
546
625
  Tests use `SQLiteDB(':memory:')` directly (bypassing the runtime singleton) and Hardhat dev key 0 for any signing operations — both are safe to commit and require no external services.
547
626
 
548
627
  ---
549
628
 
629
+ ## Roadmap
630
+
631
+ ### v0.3.0 — IPFS browser resolution
632
+ Native ENS browsers (Brave, eth.link) resolve `contenthash` directly on-chain — they don't follow CCIP-Read. v0.3.0 will add an **IPFS + Browser resolution** admin panel that closes this gap:
633
+
634
+ - Pin a file or CID to IPFS (via Pinata) from the admin panel
635
+ - Set the resulting CID as the ENS name's `contenthash` on-chain (MetaMask, no stored key)
636
+ - Manage multiple names from one panel
637
+
638
+ Combined with `withEns()` (CCIP-Read, dynamic records) this makes the gateway handle both resolution paths:
639
+
640
+ | Path | Who | How |
641
+ |---|---|---|
642
+ | Static pages | Brave / native ENS browsers | `contenthash` on-chain → IPFS |
643
+ | Dynamic data | dapps / smart contracts | `offchainLookup` → CCIP-Read → `withEns()` |
644
+
645
+ ### v0.4.0+ — Phase 2 / Phase 3
646
+ See [GATEWAY_DECENTRALIZATION_PLAN.md](https://github.com/Echo-Merlini/ccip-router) for the full decentralisation roadmap (chain as source of truth, incentivised node network).
647
+
648
+ ---
649
+
550
650
  ## Related
551
651
 
552
652
  - [ens-boiler](https://github.com/Echo-Merlini/ens-boiler) — opinionated ENS agent stack built on `ccip-router`
@@ -102,6 +102,55 @@ export declare const ATTESTATION_INDEX_ABI: readonly [{
102
102
  readonly indexed: false;
103
103
  }];
104
104
  }];
105
+ export declare const WYRIWE_PROOF_VERIFIER_ABI: readonly [{
106
+ readonly type: "function";
107
+ readonly name: "verify";
108
+ readonly inputs: readonly [{
109
+ readonly name: "inputHash";
110
+ readonly type: "bytes32";
111
+ }, {
112
+ readonly name: "outputHash";
113
+ readonly type: "bytes32";
114
+ }, {
115
+ readonly name: "metadata";
116
+ readonly type: "bytes";
117
+ }, {
118
+ readonly name: "proof";
119
+ readonly type: "bytes";
120
+ }];
121
+ readonly outputs: readonly [{
122
+ readonly name: "";
123
+ readonly type: "bool";
124
+ }];
125
+ readonly stateMutability: "view";
126
+ }, {
127
+ readonly type: "function";
128
+ readonly name: "name";
129
+ readonly inputs: readonly [];
130
+ readonly outputs: readonly [{
131
+ readonly name: "";
132
+ readonly type: "string";
133
+ }];
134
+ readonly stateMutability: "pure";
135
+ }, {
136
+ readonly type: "function";
137
+ readonly name: "version";
138
+ readonly inputs: readonly [];
139
+ readonly outputs: readonly [{
140
+ readonly name: "";
141
+ readonly type: "string";
142
+ }];
143
+ readonly stateMutability: "pure";
144
+ }, {
145
+ readonly type: "function";
146
+ readonly name: "proofProfile";
147
+ readonly inputs: readonly [];
148
+ readonly outputs: readonly [{
149
+ readonly name: "";
150
+ readonly type: "bytes32";
151
+ }];
152
+ readonly stateMutability: "pure";
153
+ }];
105
154
  export declare const WYRIWE_ATTESTATION_VERIFIER_ABI: readonly [{
106
155
  readonly type: "function";
107
156
  readonly name: "verify";
@@ -1 +1 @@
1
- {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../../src/chain/abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDxB,CAAA;AAEV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAWlC,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCpB,CAAA"}
1
+ {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../../src/chain/abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDxB,CAAA;AAIV,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC5B,CAAA;AAGV,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAWlC,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCpB,CAAA"}
package/dist/chain/abi.js CHANGED
@@ -55,6 +55,44 @@ export const ATTESTATION_INDEX_ABI = [
55
55
  ],
56
56
  },
57
57
  ];
58
+ // ERC-8274 IProofVerifier — verify(inputHash, outputHash, metadata, proof)
59
+ // WyriweProofVerifier deployed on Sepolia: 0x001eFFa0fD1D171b164808644678F3301d8EDC96
60
+ export const WYRIWE_PROOF_VERIFIER_ABI = [
61
+ {
62
+ type: 'function',
63
+ name: 'verify',
64
+ inputs: [
65
+ { name: 'inputHash', type: 'bytes32' },
66
+ { name: 'outputHash', type: 'bytes32' },
67
+ { name: 'metadata', type: 'bytes' },
68
+ { name: 'proof', type: 'bytes' },
69
+ ],
70
+ outputs: [{ name: '', type: 'bool' }],
71
+ stateMutability: 'view',
72
+ },
73
+ {
74
+ type: 'function',
75
+ name: 'name',
76
+ inputs: [],
77
+ outputs: [{ name: '', type: 'string' }],
78
+ stateMutability: 'pure',
79
+ },
80
+ {
81
+ type: 'function',
82
+ name: 'version',
83
+ inputs: [],
84
+ outputs: [{ name: '', type: 'string' }],
85
+ stateMutability: 'pure',
86
+ },
87
+ {
88
+ type: 'function',
89
+ name: 'proofProfile',
90
+ inputs: [],
91
+ outputs: [{ name: '', type: 'bytes32' }],
92
+ stateMutability: 'pure',
93
+ },
94
+ ];
95
+ // @deprecated — ERC-8183 IAttestationVerifier. Use WYRIWE_PROOF_VERIFIER_ABI (ERC-8274) instead.
58
96
  export const WYRIWE_ATTESTATION_VERIFIER_ABI = [
59
97
  {
60
98
  type: 'function',
@@ -1 +1 @@
1
- {"version":3,"file":"abi.js","sourceRoot":"","sources":["../../src/chain/abi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;QACE,IAAI,EAAE,UAAU;QAChB,IA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EAAE,CAAC;QACpD,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU;QAClC,MAAM,EAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAClF,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,SAAS,EAAK,IAAI,EAAE,WAAW,EAAE;YACzC,EAAE,IAAI,EAAE,MAAM,EAAQ,IAAI,EAAE,UAAU,EAAE;YACxC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE;SAC1C;QACD,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB;QACrC,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;YAClD,EAAE,IAAI,EAAE,KAAK,EAAK,IAAI,EAAE,QAAQ,EAAG,OAAO,EAAE,KAAK,EAAE;SACpD;KACF;CACO,CAAA"}
package/dist/lib.d.ts CHANGED
@@ -6,7 +6,7 @@ export type { DB, MeshRecord, PeerState } from './db/types.js';
6
6
  export { publishAttestation, checkOnChain } from './chain/publish.js';
7
7
  export type { ChainOpts, PublishResult, OnChainProof } from './chain/publish.js';
8
8
  export { registerNode } from './chain/register.js';
9
- export { ATTESTATION_INDEX_ABI, NODE_REGISTRY_ABI, WYRIWE_ATTESTATION_VERIFIER_ABI } from './chain/abi.js';
9
+ export { ATTESTATION_INDEX_ABI, NODE_REGISTRY_ABI, WYRIWE_PROOF_VERIFIER_ABI, WYRIWE_ATTESTATION_VERIFIER_ABI } from './chain/abi.js';
10
10
  export { makeVni, verifyVni, fetchPeerVni } from './mesh/vni.js';
11
11
  export type { SignedVni, VniDocument } from './mesh/vni.js';
12
12
  export { withEns, isEnsCalldata } from './ens/withEns.js';
package/dist/lib.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACrE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAA;AAC1G,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAChE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACzD,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACrE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAA;AACrI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAChE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACzD,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
package/dist/lib.js CHANGED
@@ -3,7 +3,7 @@ export { CcipRouter } from './router/index.js';
3
3
  export { withWyriwe } from './attestation/withWyriwe.js';
4
4
  export { publishAttestation, checkOnChain } from './chain/publish.js';
5
5
  export { registerNode } from './chain/register.js';
6
- export { ATTESTATION_INDEX_ABI, NODE_REGISTRY_ABI, WYRIWE_ATTESTATION_VERIFIER_ABI } from './chain/abi.js';
6
+ export { ATTESTATION_INDEX_ABI, NODE_REGISTRY_ABI, WYRIWE_PROOF_VERIFIER_ABI, WYRIWE_ATTESTATION_VERIFIER_ABI } from './chain/abi.js';
7
7
  export { makeVni, verifyVni, fetchPeerVni } from './mesh/vni.js';
8
8
  export { withEns, isEnsCalldata } from './ens/withEns.js';
9
9
  export { encodeDnsName, decodeDnsName } from './ens/dns.js';
package/dist/lib.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAGxD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAA;AAC1G,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAGxD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAA;AACrI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA"}
@@ -18,7 +18,7 @@ recordsRouter.get('/', async (c) => {
18
18
  : null;
19
19
  return c.json({
20
20
  protocol: 1,
21
- node_version: '0.1.0',
21
+ node_version: '0.2.0',
22
22
  namespace,
23
23
  records,
24
24
  cursor: nextCursor,
@@ -34,7 +34,7 @@ peersRouter.get('/', async (c) => {
34
34
  const signerAddress = config.gatewayKey ? privateKeyToAccount(config.gatewayKey).address : null;
35
35
  return c.json({
36
36
  protocol: 1,
37
- node_version: '0.1.0',
37
+ node_version: '0.2.0',
38
38
  signerAddress,
39
39
  peers: peers.map((p) => ({
40
40
  url: p.url,
package/dist/mesh/vni.js CHANGED
@@ -5,7 +5,7 @@ function vniMessage(doc) {
5
5
  return 'ccip-router:vni:' + JSON.stringify(doc);
6
6
  }
7
7
  // Produce a fresh signed VNI for this node.
8
- export async function makeVni(gatewayKey, url, version = '0.1.0') {
8
+ export async function makeVni(gatewayKey, url, version = '0.2.0') {
9
9
  const account = privateKeyToAccount(gatewayKey);
10
10
  const timestamp = Math.floor(Date.now() / 1000);
11
11
  const nodeId = keccak256(toBytes(account.address));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccip-router",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The coordination layer CCIP-Read was missing. Peer sync, deduplication, and cryptographic attestation for any CCIP-Read gateway.",
5
5
  "type": "module",
6
6
  "main": "./dist/lib.js",