@xyo-network/event-kit-node 0.1.8 → 1.0.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/node/filesystemEventKitReplayCheckpointStore.d.ts.map +1 -1
- package/dist/node/filesystemHandshakeMutationIntentStore.d.ts.map +1 -1
- package/dist/node/filesystemPublisherEndpointChallengeStore.d.ts.map +1 -1
- package/dist/node/filesystemPublisherOutbox.d.ts.map +1 -1
- package/dist/node/filesystemWakeInbox.d.ts.map +1 -1
- package/dist/node/handshake.mjs +32 -38
- package/dist/node/handshake.mjs.map +2 -2
- package/dist/node/handshakeClients.d.ts.map +1 -1
- package/dist/node/index.mjs +180 -161
- package/dist/node/index.mjs.map +3 -3
- package/dist/node/runtime/handshakeDiscovery.d.ts.map +1 -1
- package/dist/node/runtime/httpsTransport.d.ts.map +1 -1
- package/dist/node/runtime/publisherRuntime.d.ts.map +1 -1
- package/dist/node/runtime/sources.d.ts.map +1 -1
- package/dist/node/runtime.mjs +84 -64
- package/dist/node/runtime.mjs.map +2 -2
- package/dist/node/sqliteWakeQueue.d.ts.map +1 -1
- package/package.json +27 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handshakeClients.d.ts","sourceRoot":"","sources":["../../src/handshakeClients.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,qBAAqB,EACrB,2BAA2B,EAC3B,+BAA+B,EAG/B,0BAA0B,EAC3B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAKL,sCAAsC,EAEtC,gCAAgC,EAEhC,yBAAyB,EAEzB,gCAAgC,EAOjC,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,0BAA0B,EAE3B,MAAM,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,CAAC,MAAM,EAAE,mCAAmC,CAAA;IACpD,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;IACjB,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAA;CAC3C;AACD,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,mCAAmC,CAAA;IACpD,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAClB;AACD,MAAM,MAAM,iCAAiC,GAAG,gCAAgC,GAAG,yCAAyC,GAAG,wCAAwC,CAAA;AAavK,sFAAsF;AACtF,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,sCAAsC,GAAG,yBAAyB,CA8P1H"}
|
package/dist/node/index.mjs
CHANGED
|
@@ -126,7 +126,7 @@ function createFilesystemWakeQueue(options) {
|
|
|
126
126
|
} catch (error) {
|
|
127
127
|
if (!isAlreadyExists(error) && !isNotFound2(error)) throw error;
|
|
128
128
|
}
|
|
129
|
-
await
|
|
129
|
+
await unlinkIfMissing(PATH3.join(inflightDir, name));
|
|
130
130
|
}
|
|
131
131
|
return {
|
|
132
132
|
async append(wake) {
|
|
@@ -139,12 +139,12 @@ function createFilesystemWakeQueue(options) {
|
|
|
139
139
|
await link(tempPath, PATH3.join(pendingDir, name));
|
|
140
140
|
await syncDirectory(pendingDir);
|
|
141
141
|
} finally {
|
|
142
|
-
await
|
|
142
|
+
await unlinkIfMissing(tempPath);
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
async claim() {
|
|
146
146
|
await ensureDirs();
|
|
147
|
-
const names = (await readdir(pendingDir)).
|
|
147
|
+
const names = (await readdir(pendingDir)).toSorted();
|
|
148
148
|
for (const name of names) {
|
|
149
149
|
const inflightPath = PATH3.join(inflightDir, name);
|
|
150
150
|
const pendingPath = PATH3.join(pendingDir, name);
|
|
@@ -154,16 +154,16 @@ function createFilesystemWakeQueue(options) {
|
|
|
154
154
|
if (isAlreadyExists(error) || isNotFound2(error)) continue;
|
|
155
155
|
throw error;
|
|
156
156
|
}
|
|
157
|
-
await
|
|
157
|
+
await unlinkIfMissing(pendingPath);
|
|
158
158
|
const wake = await readJsonFile(inflightPath);
|
|
159
159
|
if (wake === void 0) {
|
|
160
|
-
await
|
|
160
|
+
await unlinkIfMissing(inflightPath);
|
|
161
161
|
continue;
|
|
162
162
|
}
|
|
163
163
|
return {
|
|
164
164
|
wake,
|
|
165
165
|
async ack() {
|
|
166
|
-
await
|
|
166
|
+
await unlinkIfMissing(inflightPath);
|
|
167
167
|
},
|
|
168
168
|
async release() {
|
|
169
169
|
await returnToPending(name);
|
|
@@ -206,8 +206,12 @@ function entryName(wake, sequence) {
|
|
|
206
206
|
const ordinal = String(sequence).padStart(6, "0");
|
|
207
207
|
return `${stamp}-${ordinal}-${randomBytes(6).toString("hex")}-${wake.wakeId}.json`;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
209
|
+
async function unlinkIfMissing(path) {
|
|
210
|
+
try {
|
|
211
|
+
await unlink(path);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
if (!isNotFound2(error)) throw error;
|
|
214
|
+
}
|
|
211
215
|
}
|
|
212
216
|
function isNotFound2(error) {
|
|
213
217
|
return errorCode2(error) === "ENOENT";
|
|
@@ -230,9 +234,7 @@ function createFilesystemPublisherOutbox(options) {
|
|
|
230
234
|
if (!isNotFound3(error)) throw error;
|
|
231
235
|
}
|
|
232
236
|
},
|
|
233
|
-
async
|
|
234
|
-
return await readJsonFile(filePath);
|
|
235
|
-
},
|
|
237
|
+
load: async () => await readJsonFile(filePath),
|
|
236
238
|
async save(pending) {
|
|
237
239
|
await mkdir3(PATH4.dirname(filePath), { recursive: true });
|
|
238
240
|
const tempPath = `${filePath}.${process.pid}.${randomBytes2(6).toString("hex")}.tmp`;
|
|
@@ -271,7 +273,14 @@ function createFilesystemWakeInbox(options) {
|
|
|
271
273
|
const tempDir = PATH5.join(root, "tmp");
|
|
272
274
|
let tail = Promise.resolve();
|
|
273
275
|
function exclusive(work) {
|
|
274
|
-
const
|
|
276
|
+
const previous = tail;
|
|
277
|
+
const run = (async () => {
|
|
278
|
+
try {
|
|
279
|
+
await previous;
|
|
280
|
+
} catch {
|
|
281
|
+
}
|
|
282
|
+
return await work();
|
|
283
|
+
})();
|
|
275
284
|
tail = Promise.allSettled([run]);
|
|
276
285
|
return run;
|
|
277
286
|
}
|
|
@@ -306,44 +315,40 @@ function createFilesystemWakeInbox(options) {
|
|
|
306
315
|
return { kind: "duplicate", receipt: wake.receipt };
|
|
307
316
|
}
|
|
308
317
|
return {
|
|
309
|
-
async
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
id: digest([attempt.audience, attempt.publisher, attempt.wakeId]),
|
|
324
|
-
publisher: attempt.publisher,
|
|
325
|
-
wakeId: attempt.wakeId
|
|
326
|
-
});
|
|
327
|
-
const record = {
|
|
328
|
-
audience: attempt.audience,
|
|
329
|
-
eventHash: attempt.eventHash,
|
|
330
|
-
publisher: attempt.publisher,
|
|
331
|
-
receipt,
|
|
332
|
-
wakeId: attempt.wakeId
|
|
333
|
-
};
|
|
334
|
-
await options.queue.append(wake);
|
|
335
|
-
const claimed = await writeRecordExclusive(tempDir, wakePath(attempt), record);
|
|
336
|
-
if (!claimed) {
|
|
337
|
-
const winner = await readRecord(wakePath(attempt));
|
|
338
|
-
if (winner === void 0) throw new Error("wake record vanished during commit");
|
|
339
|
-
if (winner.eventHash !== attempt.eventHash) return { kind: "wake-id-collision" };
|
|
340
|
-
await bindToken(attempt, winner);
|
|
341
|
-
return { kind: "duplicate", receipt: winner.receipt };
|
|
342
|
-
}
|
|
343
|
-
await bindToken(attempt, record);
|
|
344
|
-
return { kind: "enqueued", receipt };
|
|
318
|
+
resolveAttempt: async (attempt) => await exclusive(async () => {
|
|
319
|
+
await ensureDirs();
|
|
320
|
+
return await matchRecorded(attempt) ?? { kind: "new" };
|
|
321
|
+
}),
|
|
322
|
+
commitAuthorized: async ({ attempt, wake }) => await exclusive(async () => {
|
|
323
|
+
await ensureDirs();
|
|
324
|
+
const recorded = await matchRecorded(attempt);
|
|
325
|
+
if (recorded !== void 0) return recorded;
|
|
326
|
+
const receipt = Object.freeze({
|
|
327
|
+
audience: attempt.audience,
|
|
328
|
+
eventHash: attempt.eventHash,
|
|
329
|
+
id: digest([attempt.audience, attempt.publisher, attempt.wakeId]),
|
|
330
|
+
publisher: attempt.publisher,
|
|
331
|
+
wakeId: attempt.wakeId
|
|
345
332
|
});
|
|
346
|
-
|
|
333
|
+
const record = {
|
|
334
|
+
audience: attempt.audience,
|
|
335
|
+
eventHash: attempt.eventHash,
|
|
336
|
+
publisher: attempt.publisher,
|
|
337
|
+
receipt,
|
|
338
|
+
wakeId: attempt.wakeId
|
|
339
|
+
};
|
|
340
|
+
await options.queue.append(wake);
|
|
341
|
+
const claimed = await writeRecordExclusive(tempDir, wakePath(attempt), record);
|
|
342
|
+
if (!claimed) {
|
|
343
|
+
const winner = await readRecord(wakePath(attempt));
|
|
344
|
+
if (winner === void 0) throw new Error("wake record vanished during commit");
|
|
345
|
+
if (winner.eventHash !== attempt.eventHash) return { kind: "wake-id-collision" };
|
|
346
|
+
await bindToken(attempt, winner);
|
|
347
|
+
return { kind: "duplicate", receipt: winner.receipt };
|
|
348
|
+
}
|
|
349
|
+
await bindToken(attempt, record);
|
|
350
|
+
return { kind: "enqueued", receipt };
|
|
351
|
+
}),
|
|
347
352
|
async pruneExpiredTokens(nowSeconds) {
|
|
348
353
|
await ensureDirs();
|
|
349
354
|
let removed = 0;
|
|
@@ -351,7 +356,7 @@ function createFilesystemWakeInbox(options) {
|
|
|
351
356
|
const path = PATH5.join(tokensDir, name);
|
|
352
357
|
const token = await readRecord(path);
|
|
353
358
|
if (token === void 0 || token.retainJwtUntil > nowSeconds) continue;
|
|
354
|
-
await
|
|
359
|
+
await unlinkIfMissing2(path);
|
|
355
360
|
removed += 1;
|
|
356
361
|
}
|
|
357
362
|
return removed;
|
|
@@ -370,7 +375,7 @@ async function writeRecordExclusive(tempDir, path, record) {
|
|
|
370
375
|
if (isAlreadyExists2(error)) return false;
|
|
371
376
|
throw error;
|
|
372
377
|
} finally {
|
|
373
|
-
await
|
|
378
|
+
await unlinkIfMissing2(tempPath);
|
|
374
379
|
}
|
|
375
380
|
}
|
|
376
381
|
async function readRecord(path) {
|
|
@@ -393,8 +398,12 @@ function digest(parts) {
|
|
|
393
398
|
function randomSuffix() {
|
|
394
399
|
return randomBytes3(8).toString("hex");
|
|
395
400
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
401
|
+
async function unlinkIfMissing2(path) {
|
|
402
|
+
try {
|
|
403
|
+
await unlink3(path);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
if (!isNotFound4(error)) throw error;
|
|
406
|
+
}
|
|
398
407
|
}
|
|
399
408
|
function isNotFound4(error) {
|
|
400
409
|
return errorCode3(error) === "ENOENT";
|
|
@@ -441,7 +450,7 @@ async function replaceJsonFile(path, value, options = {}) {
|
|
|
441
450
|
await rename2(tempPath, path);
|
|
442
451
|
await syncDirectory(directory);
|
|
443
452
|
} catch (error) {
|
|
444
|
-
await
|
|
453
|
+
await unlinkIfMissing3(tempPath);
|
|
445
454
|
throw error;
|
|
446
455
|
}
|
|
447
456
|
}
|
|
@@ -459,7 +468,7 @@ async function publishJsonFile(path, value, options = {}) {
|
|
|
459
468
|
if (errorCode4(error) === "EEXIST") return false;
|
|
460
469
|
throw error;
|
|
461
470
|
} finally {
|
|
462
|
-
await
|
|
471
|
+
await unlinkIfMissing3(tempPath);
|
|
463
472
|
}
|
|
464
473
|
}
|
|
465
474
|
function suffix() {
|
|
@@ -477,8 +486,12 @@ function reviveJson(_key, candidate) {
|
|
|
477
486
|
}
|
|
478
487
|
return candidate;
|
|
479
488
|
}
|
|
480
|
-
function
|
|
481
|
-
|
|
489
|
+
async function unlinkIfMissing3(path) {
|
|
490
|
+
try {
|
|
491
|
+
await unlink4(path);
|
|
492
|
+
} catch (error) {
|
|
493
|
+
if (errorCode4(error) !== "ENOENT") throw error;
|
|
494
|
+
}
|
|
482
495
|
}
|
|
483
496
|
function errorCode4(error) {
|
|
484
497
|
return typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
@@ -494,8 +507,18 @@ function createFilesystemEventKitReplayCheckpointStore(options) {
|
|
|
494
507
|
return await readJsonFileStrict(path);
|
|
495
508
|
},
|
|
496
509
|
async save(checkpoint) {
|
|
497
|
-
const
|
|
498
|
-
|
|
510
|
+
const previous = tail;
|
|
511
|
+
const save = (async () => {
|
|
512
|
+
await previous;
|
|
513
|
+
await replaceJsonFile(path, checkpoint);
|
|
514
|
+
})();
|
|
515
|
+
tail = (async () => {
|
|
516
|
+
try {
|
|
517
|
+
await save;
|
|
518
|
+
} catch {
|
|
519
|
+
return false;
|
|
520
|
+
}
|
|
521
|
+
})();
|
|
499
522
|
await save;
|
|
500
523
|
}
|
|
501
524
|
};
|
|
@@ -527,7 +550,7 @@ function assertIntentShape(intent) {
|
|
|
527
550
|
if (!/^[0-9a-f]{40}$/u.test(intent.chainId)) {
|
|
528
551
|
throw new TypeError("publication chainId must be a canonical 20-byte lowercase hexadecimal chain id");
|
|
529
552
|
}
|
|
530
|
-
if (
|
|
553
|
+
if ([...intent.eventHashes, ...intent.attachmentHashes].some((hash) => !/^[0-9a-f]{64}$/u.test(hash))) {
|
|
531
554
|
throw new TypeError("publication intent hashes must be 32-byte lowercase hexadecimal");
|
|
532
555
|
}
|
|
533
556
|
}
|
|
@@ -888,9 +911,7 @@ function createFilesystemHandshakeMutationIntentStore(options) {
|
|
|
888
911
|
return intent;
|
|
889
912
|
}
|
|
890
913
|
return {
|
|
891
|
-
async
|
|
892
|
-
return await readIntent(parseHandshakeMutationIntentLookup(lookup2));
|
|
893
|
-
},
|
|
914
|
+
get: async (lookup2) => await readIntent(parseHandshakeMutationIntentLookup(lookup2)),
|
|
894
915
|
async getOrCreate(rawIntent) {
|
|
895
916
|
const proposed = await parseHandshakeMutationIntent(rawIntent);
|
|
896
917
|
const path = pathFor(proposed);
|
|
@@ -1078,9 +1099,7 @@ function createFilesystemPublisherEndpointChallengeStore(options) {
|
|
|
1078
1099
|
if (winner === void 0) throw new Error("verified challenge winner vanished");
|
|
1079
1100
|
return winner.responseHash === responseHash ? { kind: "duplicate", record: winner } : { kind: "collision", record: winner };
|
|
1080
1101
|
},
|
|
1081
|
-
async
|
|
1082
|
-
return await current(HashZod3.parse(rawHash));
|
|
1083
|
-
},
|
|
1102
|
+
get: async (rawHash) => await current(HashZod3.parse(rawHash)),
|
|
1084
1103
|
async issue(input) {
|
|
1085
1104
|
const challenge = EndpointChallengeZod2.parse(input.challenge);
|
|
1086
1105
|
const challengeHash = HashZod3.parse(input.challengeHash);
|
|
@@ -1231,27 +1250,13 @@ function createEventKitHandshakePublicationPort(transport) {
|
|
|
1231
1250
|
const chainId = ChainIdZod2.parse(transport.session.chainId);
|
|
1232
1251
|
const port = {
|
|
1233
1252
|
chainId,
|
|
1234
|
-
async
|
|
1235
|
-
|
|
1236
|
-
},
|
|
1237
|
-
async
|
|
1238
|
-
|
|
1239
|
-
},
|
|
1240
|
-
async
|
|
1241
|
-
return await publishPublisherServiceRevocation({ ...transport, ...input });
|
|
1242
|
-
},
|
|
1243
|
-
async publishWakeGrantRevocation(input) {
|
|
1244
|
-
return await publishWakeGrantRevocation({ ...transport, ...input });
|
|
1245
|
-
},
|
|
1246
|
-
async publishWakeSubscription(input) {
|
|
1247
|
-
return await publishWakeSubscription({ ...transport, ...input });
|
|
1248
|
-
},
|
|
1249
|
-
async publishWakeSubscriptionAcceptance(input) {
|
|
1250
|
-
return await publishWakeSubscriptionAcceptance({ ...transport, ...input });
|
|
1251
|
-
},
|
|
1252
|
-
async publishWakeSubscriptionRevocation(input) {
|
|
1253
|
-
return await publishWakeSubscriptionRevocation({ ...transport, ...input });
|
|
1254
|
-
},
|
|
1253
|
+
publishPublisherEncryptionKeyRevocation: async (input) => await publishPublisherEncryptionKeyRevocation({ ...transport, ...input }),
|
|
1254
|
+
publishPublisherService: async (input) => await publishPublisherService({ ...transport, ...input }),
|
|
1255
|
+
publishPublisherServiceRevocation: async (input) => await publishPublisherServiceRevocation({ ...transport, ...input }),
|
|
1256
|
+
publishWakeGrantRevocation: async (input) => await publishWakeGrantRevocation({ ...transport, ...input }),
|
|
1257
|
+
publishWakeSubscription: async (input) => await publishWakeSubscription({ ...transport, ...input }),
|
|
1258
|
+
publishWakeSubscriptionAcceptance: async (input) => await publishWakeSubscriptionAcceptance({ ...transport, ...input }),
|
|
1259
|
+
publishWakeSubscriptionRevocation: async (input) => await publishWakeSubscriptionRevocation({ ...transport, ...input }),
|
|
1255
1260
|
async source() {
|
|
1256
1261
|
const raw = String(await transport.signer.address());
|
|
1257
1262
|
const normalized = NormalizedAddressZod3.parse(normalizeAddress(raw));
|
|
@@ -2162,9 +2167,7 @@ function createSubscriberHandshakeClient(options) {
|
|
|
2162
2167
|
});
|
|
2163
2168
|
return await publishSubscriberSubscriptionIntent(resolvedIntent.intent, resolvedIntent.disposition);
|
|
2164
2169
|
},
|
|
2165
|
-
async
|
|
2166
|
-
return await lookup2(subscriptionId);
|
|
2167
|
-
}
|
|
2170
|
+
subscriptions: async (subscriptionId) => await lookup2(subscriptionId)
|
|
2168
2171
|
};
|
|
2169
2172
|
return Object.freeze(client);
|
|
2170
2173
|
}
|
|
@@ -2177,7 +2180,7 @@ function subscriberPlaintext(service, input, maxPositionsPerWake) {
|
|
|
2177
2180
|
queueId: input.queueId
|
|
2178
2181
|
};
|
|
2179
2182
|
const source = input.source;
|
|
2180
|
-
if (
|
|
2183
|
+
if (service.events.every((event) => canonicalJson(event.source) !== canonicalJson(source))) {
|
|
2181
2184
|
throw new Error("Requested source is not advertised by the selected service");
|
|
2182
2185
|
}
|
|
2183
2186
|
return createWakeSubscriptionPlaintext({
|
|
@@ -2337,9 +2340,13 @@ function createPublisherHandshakeDiscovery(options) {
|
|
|
2337
2340
|
};
|
|
2338
2341
|
async function activeView(signal) {
|
|
2339
2342
|
signal.throwIfAborted();
|
|
2340
|
-
viewing ??=
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
+
viewing ??= (async () => {
|
|
2344
|
+
try {
|
|
2345
|
+
return await options.client.subscriptions();
|
|
2346
|
+
} finally {
|
|
2347
|
+
viewing = void 0;
|
|
2348
|
+
}
|
|
2349
|
+
})();
|
|
2343
2350
|
const view = await viewing;
|
|
2344
2351
|
signal.throwIfAborted();
|
|
2345
2352
|
if (!view.ok || view.indexedThrough !== view.finalizedHead)
|
|
@@ -2496,19 +2503,21 @@ function createPublisherHandshakeDiscovery(options) {
|
|
|
2496
2503
|
async acceptPending(signal) {
|
|
2497
2504
|
if (accepting === void 0) {
|
|
2498
2505
|
const scope = publisherAbortScope([owner.signal, signal]);
|
|
2499
|
-
accepting =
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2506
|
+
accepting = (async () => {
|
|
2507
|
+
try {
|
|
2508
|
+
await accept(scope.signal);
|
|
2509
|
+
} finally {
|
|
2510
|
+
scope.dispose();
|
|
2511
|
+
accepting = void 0;
|
|
2512
|
+
}
|
|
2513
|
+
})();
|
|
2503
2514
|
}
|
|
2504
2515
|
await accepting;
|
|
2505
2516
|
},
|
|
2506
2517
|
async close() {
|
|
2507
2518
|
await Promise.allSettled([accepting, viewing].filter((item) => item !== void 0));
|
|
2508
2519
|
},
|
|
2509
|
-
status() {
|
|
2510
|
-
return { ...status, challengeFailures: options.state.entries("challenge-failures").reduce((sum, item) => sum + item.value, 0) };
|
|
2511
|
-
}
|
|
2520
|
+
status: () => ({ ...status, challengeFailures: options.state.entries("challenge-failures").reduce((sum, item) => sum + item.value, 0) })
|
|
2512
2521
|
};
|
|
2513
2522
|
}
|
|
2514
2523
|
|
|
@@ -2602,16 +2611,17 @@ function createEthereumFinalizedPublisherSource(options) {
|
|
|
2602
2611
|
};
|
|
2603
2612
|
async function read() {
|
|
2604
2613
|
const requests = [provider.getNetwork(), provider.getBlock(0), provider.getBlock("finalized")];
|
|
2605
|
-
|
|
2614
|
+
try {
|
|
2615
|
+
const [network, genesis, block] = await Promise.all(requests);
|
|
2616
|
+
if (network.chainId.toString() !== chainId || genesis?.hash?.slice(2).toLowerCase() !== genesisHash) {
|
|
2617
|
+
throw new Error("Ethereum source chain identity mismatch");
|
|
2618
|
+
}
|
|
2619
|
+
if (block?.hash === null || block === null || !/^0x[0-9a-fA-F]{64}$/u.test(block.hash) || !Number.isSafeInteger(block.number) || block.number < 0) throw new Error("Ethereum finalized head is unavailable");
|
|
2620
|
+
return { position: block.number, hash: block.hash.slice(2).toLowerCase() };
|
|
2621
|
+
} catch (error) {
|
|
2606
2622
|
await Promise.allSettled(requests);
|
|
2607
2623
|
throw error;
|
|
2608
|
-
});
|
|
2609
|
-
const [network, genesis, block] = values;
|
|
2610
|
-
if (network.chainId.toString() !== chainId || genesis?.hash?.slice(2).toLowerCase() !== genesisHash) {
|
|
2611
|
-
throw new Error("Ethereum source chain identity mismatch");
|
|
2612
2624
|
}
|
|
2613
|
-
if (block?.hash === null || block === null || !/^0x[0-9a-fA-F]{64}$/u.test(block.hash) || !Number.isSafeInteger(block.number) || block.number < 0) throw new Error("Ethereum finalized head is unavailable");
|
|
2614
|
-
return { position: block.number, hash: block.hash.slice(2).toLowerCase() };
|
|
2615
2625
|
}
|
|
2616
2626
|
return {
|
|
2617
2627
|
source,
|
|
@@ -2620,9 +2630,13 @@ function createEthereumFinalizedPublisherSource(options) {
|
|
|
2620
2630
|
signal.throwIfAborted();
|
|
2621
2631
|
if (closed) throw new Error("Ethereum source is closed");
|
|
2622
2632
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
2623
|
-
reading ??=
|
|
2624
|
-
|
|
2625
|
-
|
|
2633
|
+
reading ??= (async () => {
|
|
2634
|
+
try {
|
|
2635
|
+
return await read();
|
|
2636
|
+
} finally {
|
|
2637
|
+
reading = void 0;
|
|
2638
|
+
}
|
|
2639
|
+
})();
|
|
2626
2640
|
try {
|
|
2627
2641
|
return await boundedPublisherOperation(reading, signal, options.requestTimeoutMs ?? 1e4);
|
|
2628
2642
|
} finally {
|
|
@@ -2653,13 +2667,12 @@ var OptionsZod = z2.strictObject({
|
|
|
2653
2667
|
allowedEndpoints: z2.array(z2.url()).min(1).max(64),
|
|
2654
2668
|
endpointHeaders: z2.array(z2.strictObject({
|
|
2655
2669
|
endpoint: z2.url(),
|
|
2656
|
-
headers: z2.strictObject({ "x-vercel-protection-bypass": z2.string().min(1).max(4096).regex(/^[\
|
|
2670
|
+
headers: z2.strictObject({ "x-vercel-protection-bypass": z2.string().min(1).max(4096).regex(/^[\u{21}-\u{7E}]+$/u) })
|
|
2657
2671
|
})).max(64).default([]),
|
|
2658
2672
|
maxResponseBytes: z2.number().int().min(1).max(1048576).default(65536),
|
|
2659
2673
|
requestTimeoutMs: z2.number().int().min(100).max(6e4).default(1e4)
|
|
2660
2674
|
});
|
|
2661
|
-
var
|
|
2662
|
-
for (const [address, prefix] of [
|
|
2675
|
+
var NON_PUBLIC_IPV4_SUBNETS = [
|
|
2663
2676
|
["0.0.0.0", 8],
|
|
2664
2677
|
["10.0.0.0", 8],
|
|
2665
2678
|
["100.64.0.0", 10],
|
|
@@ -2675,24 +2688,40 @@ for (const [address, prefix] of [
|
|
|
2675
2688
|
["203.0.113.0", 24],
|
|
2676
2689
|
["224.0.0.0", 4],
|
|
2677
2690
|
["240.0.0.0", 4]
|
|
2678
|
-
]
|
|
2679
|
-
|
|
2680
|
-
var globalIpv6 = new BlockList();
|
|
2681
|
-
globalIpv6.addSubnet("2000::", 3, "ipv6");
|
|
2682
|
-
var nonPublicIpv6 = new BlockList();
|
|
2683
|
-
for (const [address, prefix] of [
|
|
2691
|
+
];
|
|
2692
|
+
var NON_PUBLIC_IPV6_SUBNETS = [
|
|
2684
2693
|
["2001::", 23],
|
|
2685
2694
|
["2001:db8::", 32],
|
|
2686
2695
|
["2002::", 16],
|
|
2687
2696
|
["3fff::", 20]
|
|
2688
|
-
]
|
|
2689
|
-
|
|
2697
|
+
];
|
|
2698
|
+
var publisherAddressPolicy;
|
|
2699
|
+
function loadPublisherAddressPolicy() {
|
|
2700
|
+
if (publisherAddressPolicy !== void 0) return publisherAddressPolicy;
|
|
2701
|
+
const nonPublicIpv4 = new BlockList();
|
|
2702
|
+
for (const [address, prefix] of NON_PUBLIC_IPV4_SUBNETS) {
|
|
2703
|
+
nonPublicIpv4.addSubnet(address, prefix, "ipv4");
|
|
2704
|
+
}
|
|
2705
|
+
const globalIpv6 = new BlockList();
|
|
2706
|
+
globalIpv6.addSubnet("2000::", 3, "ipv6");
|
|
2707
|
+
const nonPublicIpv6 = new BlockList();
|
|
2708
|
+
for (const [address, prefix] of NON_PUBLIC_IPV6_SUBNETS) {
|
|
2709
|
+
nonPublicIpv6.addSubnet(address, prefix, "ipv6");
|
|
2710
|
+
}
|
|
2711
|
+
publisherAddressPolicy = {
|
|
2712
|
+
globalIpv6,
|
|
2713
|
+
nonPublicIpv4,
|
|
2714
|
+
nonPublicIpv6
|
|
2715
|
+
};
|
|
2716
|
+
return publisherAddressPolicy;
|
|
2717
|
+
}
|
|
2690
2718
|
function isPublicPublisherAddress(address) {
|
|
2719
|
+
const policy = loadPublisherAddressPolicy();
|
|
2691
2720
|
if (isIP(address) === 4)
|
|
2692
|
-
return !nonPublicIpv4.check(address, "ipv4");
|
|
2721
|
+
return !policy.nonPublicIpv4.check(address, "ipv4");
|
|
2693
2722
|
if (isIP(address) !== 6)
|
|
2694
2723
|
return false;
|
|
2695
|
-
return globalIpv6.check(address, "ipv6") && !nonPublicIpv6.check(address, "ipv6");
|
|
2724
|
+
return policy.globalIpv6.check(address, "ipv6") && !policy.nonPublicIpv6.check(address, "ipv6");
|
|
2696
2725
|
}
|
|
2697
2726
|
function createPublisherHttpsTransport(input) {
|
|
2698
2727
|
const parsed = OptionsZod.safeParse(input);
|
|
@@ -2849,7 +2878,7 @@ function activationReady(status) {
|
|
|
2849
2878
|
function assertDeliveryState(record, subscription) {
|
|
2850
2879
|
if (!isDeepStrictEqual2(record.subscription, subscription))
|
|
2851
2880
|
throw new Error("Subscription revision changed without a new identity");
|
|
2852
|
-
if (!Number.isSafeInteger(record.cursor) || record.cursor < subscription.fromPosition - 1 ||
|
|
2881
|
+
if (!Number.isSafeInteger(record.cursor) || record.cursor < subscription.fromPosition - 1 || [record.delivered, record.failures, record.nextAttemptMs].some((value) => !(Number.isSafeInteger(value) && value >= 0)) || !["active", "blocked", "cancelled"].includes(record.state))
|
|
2853
2882
|
throw new Error("Persisted publisher delivery state is invalid");
|
|
2854
2883
|
if (record.pending !== void 0) {
|
|
2855
2884
|
const pending = WakeEnvelopeZod2.parse(record.pending);
|
|
@@ -3039,7 +3068,7 @@ async function createPersistentEventPublisherRuntime(options) {
|
|
|
3039
3068
|
sourcesHealthy = results.every((item) => item.status === "fulfilled");
|
|
3040
3069
|
for (const [index, result] of results.entries())
|
|
3041
3070
|
if (result.status === "rejected") {
|
|
3042
|
-
const key =
|
|
3071
|
+
const key = sourceReaders.keys().toArray()[index];
|
|
3043
3072
|
if (key !== void 0)
|
|
3044
3073
|
heads.set(key, new Error("Source read failed"));
|
|
3045
3074
|
}
|
|
@@ -3123,32 +3152,30 @@ async function createPersistentEventPublisherRuntime(options) {
|
|
|
3123
3152
|
throw new Error("Publisher is stopped");
|
|
3124
3153
|
await actor.runOnce();
|
|
3125
3154
|
},
|
|
3126
|
-
stop() {
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3155
|
+
stop: () => stop ??= (async () => {
|
|
3156
|
+
abort.abort();
|
|
3157
|
+
const failures = [];
|
|
3158
|
+
try {
|
|
3159
|
+
await actor.stop();
|
|
3160
|
+
} catch (error) {
|
|
3161
|
+
failures.push(error);
|
|
3162
|
+
}
|
|
3163
|
+
try {
|
|
3164
|
+
await options.discovery.close?.();
|
|
3165
|
+
} catch (error) {
|
|
3166
|
+
failures.push(error);
|
|
3167
|
+
}
|
|
3168
|
+
for (const source of options.sources)
|
|
3135
3169
|
try {
|
|
3136
|
-
await
|
|
3170
|
+
await source.close?.();
|
|
3137
3171
|
} catch (error) {
|
|
3138
3172
|
failures.push(error);
|
|
3139
3173
|
}
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
}
|
|
3146
|
-
running = false;
|
|
3147
|
-
ready = false;
|
|
3148
|
-
if (failures.length > 0)
|
|
3149
|
-
throw new AggregateError(failures, "Publisher runtime shutdown failed");
|
|
3150
|
-
})();
|
|
3151
|
-
},
|
|
3174
|
+
running = false;
|
|
3175
|
+
ready = false;
|
|
3176
|
+
if (failures.length > 0)
|
|
3177
|
+
throw new AggregateError(failures, "Publisher runtime shutdown failed");
|
|
3178
|
+
})(),
|
|
3152
3179
|
status() {
|
|
3153
3180
|
const deliveries = state.entries("deliveries").map((item) => item.value);
|
|
3154
3181
|
return {
|
|
@@ -3282,16 +3309,14 @@ function samePublicationIntent(left, right) {
|
|
|
3282
3309
|
return left.chainId === right.chainId && left.source === right.source && left.operationId === right.operationId && isDeepStrictEqual3(left.eventHashes, right.eventHashes) && isDeepStrictEqual3(left.attachmentHashes, right.attachmentHashes);
|
|
3283
3310
|
}
|
|
3284
3311
|
function publicationKey(intent) {
|
|
3285
|
-
if (!/^[0-9a-f]{40}$/u.test(intent.chainId) || !/^[0-9a-f]{40}$/u.test(intent.source) || intent.operationId.length === 0 || intent.operationId.length > 256 ||
|
|
3312
|
+
if (!/^[0-9a-f]{40}$/u.test(intent.chainId) || !/^[0-9a-f]{40}$/u.test(intent.source) || intent.operationId.length === 0 || intent.operationId.length > 256 || [...intent.eventHashes, ...intent.attachmentHashes].some((hash) => !HashZod5.safeParse(hash).success)) {
|
|
3286
3313
|
throw new Error("Invalid publication intent");
|
|
3287
3314
|
}
|
|
3288
3315
|
return JSON.stringify([intent.chainId, intent.source, intent.operationId]);
|
|
3289
3316
|
}
|
|
3290
3317
|
function createSqlitePublisherHandshakeStores(state) {
|
|
3291
3318
|
const replay = {
|
|
3292
|
-
async
|
|
3293
|
-
return state.get("replay", "checkpoint");
|
|
3294
|
-
},
|
|
3319
|
+
load: async () => state.get("replay", "checkpoint"),
|
|
3295
3320
|
async save(checkpoint) {
|
|
3296
3321
|
state.set("replay", "checkpoint", checkpoint);
|
|
3297
3322
|
}
|
|
@@ -3342,9 +3367,7 @@ function createSqlitePublisherHandshakeStores(state) {
|
|
|
3342
3367
|
const current = (hash) => state.get("challenges", HashZod5.parse(hash));
|
|
3343
3368
|
const live = (record, now) => record.challenge.issuedAt <= now && now < record.challenge.expiresAt;
|
|
3344
3369
|
const challenges = {
|
|
3345
|
-
async
|
|
3346
|
-
return current(hash);
|
|
3347
|
-
},
|
|
3370
|
+
get: async (hash) => current(hash),
|
|
3348
3371
|
async issue(input) {
|
|
3349
3372
|
const challenge = EndpointChallengeZod3.parse(input.challenge);
|
|
3350
3373
|
const hash = HashZod5.parse(input.challengeHash);
|
|
@@ -3638,12 +3661,8 @@ async function createSqliteWakeQueue(options) {
|
|
|
3638
3661
|
close() {
|
|
3639
3662
|
database.close();
|
|
3640
3663
|
},
|
|
3641
|
-
async
|
|
3642
|
-
|
|
3643
|
-
},
|
|
3644
|
-
async recoverInflight() {
|
|
3645
|
-
return Number(recoverAll.run().changes);
|
|
3646
|
-
}
|
|
3664
|
+
pendingCount: async () => Number(countPending.get().total),
|
|
3665
|
+
recoverInflight: async () => Number(recoverAll.run().changes)
|
|
3647
3666
|
};
|
|
3648
3667
|
}
|
|
3649
3668
|
export {
|