@xyo-network/event-kit-node 0.0.1 → 0.1.1

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 (31) hide show
  1. package/LICENSE +310 -0
  2. package/README.md +37 -3
  3. package/dist/node/filesystemDurability.d.ts +11 -0
  4. package/dist/node/filesystemDurability.d.ts.map +1 -0
  5. package/dist/node/filesystemEventKitReplayCheckpointStore.d.ts +8 -0
  6. package/dist/node/filesystemEventKitReplayCheckpointStore.d.ts.map +1 -0
  7. package/dist/node/filesystemFinalizedStatementPublicationJournal.d.ts +14 -0
  8. package/dist/node/filesystemFinalizedStatementPublicationJournal.d.ts.map +1 -0
  9. package/dist/node/filesystemHandshakeMutationIntentStore.d.ts +12 -0
  10. package/dist/node/filesystemHandshakeMutationIntentStore.d.ts.map +1 -0
  11. package/dist/node/filesystemJson.d.ts +14 -0
  12. package/dist/node/filesystemJson.d.ts.map +1 -0
  13. package/dist/node/filesystemPublisherEncryptionKeyStore.d.ts +15 -0
  14. package/dist/node/filesystemPublisherEncryptionKeyStore.d.ts.map +1 -0
  15. package/dist/node/filesystemPublisherEndpointChallengeStore.d.ts +12 -0
  16. package/dist/node/filesystemPublisherEndpointChallengeStore.d.ts.map +1 -0
  17. package/dist/node/filesystemWakeQueue.d.ts +2 -8
  18. package/dist/node/filesystemWakeQueue.d.ts.map +1 -1
  19. package/dist/node/handshake.d.ts +16 -0
  20. package/dist/node/handshake.d.ts.map +1 -0
  21. package/dist/node/handshake.mjs +1977 -0
  22. package/dist/node/handshake.mjs.map +7 -0
  23. package/dist/node/handshakeClients.d.ts +287 -0
  24. package/dist/node/handshakeClients.d.ts.map +1 -0
  25. package/dist/node/handshakeMutationIntent.d.ts +606 -0
  26. package/dist/node/handshakeMutationIntent.d.ts.map +1 -0
  27. package/dist/node/index.d.ts +1 -0
  28. package/dist/node/index.d.ts.map +1 -1
  29. package/dist/node/index.mjs +2015 -61
  30. package/dist/node/index.mjs.map +4 -4
  31. package/package.json +37 -19
@@ -0,0 +1,606 @@
1
+ import type { ChainId, Hash, NormalizedAddress } from '@xyo-network/event-kit-schemas';
2
+ import { z } from 'zod';
3
+ export declare const HandshakeMutationIntentKinds: readonly ["publisher-encryption-key-retire", "publisher-service-publish", "publisher-service-retire", "publisher-service-rotate-key", "publisher-subscription-accept", "subscriber-grant-revoke", "subscriber-subscription-revoke", "subscriber-subscription-subscribe"];
4
+ export type HandshakeMutationIntentKind = typeof HandshakeMutationIntentKinds[number];
5
+ export type HandshakeMutationIntentDisposition = 'created' | 'resumed';
6
+ declare const PublisherServicePublishIntentZod: z.ZodObject<{
7
+ kind: z.ZodLiteral<"publisher-service-publish">;
8
+ operationId: z.ZodString;
9
+ encryptionKey: z.ZodObject<{
10
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
11
+ readonly __schema: true;
12
+ }>;
13
+ keyId: z.ZodString;
14
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
15
+ publicKey: z.ZodString;
16
+ validFromBlock: z.ZodNumber;
17
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strict>;
19
+ privateKey: z.ZodObject<{
20
+ encryptionKey: z.ZodString;
21
+ keyId: z.ZodString;
22
+ privateKey: z.ZodString;
23
+ }, z.core.$strict>;
24
+ service: z.ZodObject<{
25
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
26
+ readonly __schema: true;
27
+ }>;
28
+ serviceId: z.ZodString;
29
+ revision: z.ZodNumber;
30
+ supersedes: z.ZodOptional<z.ZodString>;
31
+ validFromBlock: z.ZodNumber;
32
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
33
+ events: z.ZodTuple<[z.ZodObject<{
34
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
35
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
36
+ }, z.core.$strict>], null>;
37
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
38
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
39
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
40
+ encryptionKeys: z.ZodArray<z.ZodString>;
41
+ preferredEncryptionKey: z.ZodString;
42
+ limits: z.ZodObject<{
43
+ maxBlocksPerWake: z.ZodNumber;
44
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
45
+ maxPlaintextBytes: z.ZodLiteral<4096>;
46
+ }, z.core.$strict>;
47
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
48
+ }, z.core.$strict>;
49
+ chainId: z.ZodString;
50
+ publisher: z.ZodString;
51
+ requestFingerprint: z.ZodString;
52
+ source: z.ZodString;
53
+ version: z.ZodLiteral<1>;
54
+ }, z.core.$strict>;
55
+ declare const PublisherServiceRotateKeyIntentZod: z.ZodObject<{
56
+ kind: z.ZodLiteral<"publisher-service-rotate-key">;
57
+ operationId: z.ZodString;
58
+ encryptionKey: z.ZodObject<{
59
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
60
+ readonly __schema: true;
61
+ }>;
62
+ keyId: z.ZodString;
63
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
64
+ publicKey: z.ZodString;
65
+ validFromBlock: z.ZodNumber;
66
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
67
+ }, z.core.$strict>;
68
+ privateKey: z.ZodObject<{
69
+ encryptionKey: z.ZodString;
70
+ keyId: z.ZodString;
71
+ privateKey: z.ZodString;
72
+ }, z.core.$strict>;
73
+ selectedKey: z.ZodString;
74
+ selectedService: z.ZodString;
75
+ service: z.ZodObject<{
76
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
77
+ readonly __schema: true;
78
+ }>;
79
+ serviceId: z.ZodString;
80
+ revision: z.ZodNumber;
81
+ supersedes: z.ZodOptional<z.ZodString>;
82
+ validFromBlock: z.ZodNumber;
83
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
84
+ events: z.ZodTuple<[z.ZodObject<{
85
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
86
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
87
+ }, z.core.$strict>], null>;
88
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
89
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
90
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
91
+ encryptionKeys: z.ZodArray<z.ZodString>;
92
+ preferredEncryptionKey: z.ZodString;
93
+ limits: z.ZodObject<{
94
+ maxBlocksPerWake: z.ZodNumber;
95
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
96
+ maxPlaintextBytes: z.ZodLiteral<4096>;
97
+ }, z.core.$strict>;
98
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
99
+ }, z.core.$strict>;
100
+ chainId: z.ZodString;
101
+ publisher: z.ZodString;
102
+ requestFingerprint: z.ZodString;
103
+ source: z.ZodString;
104
+ version: z.ZodLiteral<1>;
105
+ }, z.core.$strict>;
106
+ declare const SubscriberSubscriptionIntentZod: z.ZodObject<{
107
+ kind: z.ZodLiteral<"subscriber-subscription-subscribe">;
108
+ operationId: z.ZodString;
109
+ encryptionKey: z.ZodObject<{
110
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
111
+ readonly __schema: true;
112
+ }>;
113
+ keyId: z.ZodString;
114
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
115
+ publicKey: z.ZodString;
116
+ validFromBlock: z.ZodNumber;
117
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
118
+ }, z.core.$strict>;
119
+ grant: z.ZodObject<{
120
+ schema: z.ZodLiteral<"network.xyo.event.wake.grant" & {
121
+ readonly __schema: true;
122
+ }>;
123
+ grantId: z.ZodString;
124
+ deploymentId: z.ZodString;
125
+ publisher: z.ZodString;
126
+ queueId: z.ZodOptional<z.ZodString>;
127
+ permissions: z.ZodArray<z.ZodEnum<{
128
+ enqueue: "enqueue";
129
+ }>>;
130
+ }, z.core.$strict>;
131
+ selectedKey: z.ZodString;
132
+ selectedService: z.ZodString;
133
+ service: z.ZodObject<{
134
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
135
+ readonly __schema: true;
136
+ }>;
137
+ serviceId: z.ZodString;
138
+ revision: z.ZodNumber;
139
+ supersedes: z.ZodOptional<z.ZodString>;
140
+ validFromBlock: z.ZodNumber;
141
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
142
+ events: z.ZodTuple<[z.ZodObject<{
143
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
144
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
145
+ }, z.core.$strict>], null>;
146
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
147
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
148
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
149
+ encryptionKeys: z.ZodArray<z.ZodString>;
150
+ preferredEncryptionKey: z.ZodString;
151
+ limits: z.ZodObject<{
152
+ maxBlocksPerWake: z.ZodNumber;
153
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
154
+ maxPlaintextBytes: z.ZodLiteral<4096>;
155
+ }, z.core.$strict>;
156
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
157
+ }, z.core.$strict>;
158
+ subscription: z.ZodObject<{
159
+ encryption: z.ZodObject<{
160
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
161
+ enc: z.ZodString;
162
+ ciphertext: z.ZodString;
163
+ }, z.core.$strict>;
164
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription" & {
165
+ readonly __schema: true;
166
+ }>;
167
+ subscriptionId: z.ZodString;
168
+ revision: z.ZodNumber;
169
+ supersedes: z.ZodOptional<z.ZodString>;
170
+ chainId: z.ZodString;
171
+ publisher: z.ZodString;
172
+ service: z.ZodString;
173
+ encryptionKey: z.ZodString;
174
+ keyId: z.ZodString;
175
+ grant: z.ZodString;
176
+ eventKind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
177
+ expiresAtBlock: z.ZodNumber;
178
+ }, z.core.$strict>;
179
+ chainId: z.ZodString;
180
+ publisher: z.ZodString;
181
+ requestFingerprint: z.ZodString;
182
+ source: z.ZodString;
183
+ version: z.ZodLiteral<1>;
184
+ }, z.core.$strict>;
185
+ declare const PublisherAcceptanceIntentZod: z.ZodObject<{
186
+ acceptance: z.ZodObject<{
187
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription.acceptance" & {
188
+ readonly __schema: true;
189
+ }>;
190
+ service: z.ZodString;
191
+ encryptionKey: z.ZodString;
192
+ subscription: z.ZodString;
193
+ grant: z.ZodString;
194
+ challenge: z.ZodString;
195
+ response: z.ZodString;
196
+ }, z.core.$strict>;
197
+ challenge: z.ZodObject<{
198
+ schema: z.ZodLiteral<"network.xyo.event.wake.challenge" & {
199
+ readonly __schema: true;
200
+ }>;
201
+ challengeId: z.ZodString;
202
+ chainId: z.ZodString;
203
+ publisher: z.ZodString;
204
+ subscriber: z.ZodString;
205
+ service: z.ZodString;
206
+ encryptionKey: z.ZodString;
207
+ keyId: z.ZodString;
208
+ subscription: z.ZodString;
209
+ grant: z.ZodString;
210
+ eventKind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
211
+ nonce: z.ZodString;
212
+ issuedAt: z.ZodNumber;
213
+ expiresAt: z.ZodNumber;
214
+ }, z.core.$strict>;
215
+ kind: z.ZodLiteral<"publisher-subscription-accept">;
216
+ operationId: z.ZodString;
217
+ response: z.ZodObject<{
218
+ schema: z.ZodLiteral<"network.xyo.event.wake.challenge.response" & {
219
+ readonly __schema: true;
220
+ }>;
221
+ challenge: z.ZodString;
222
+ proof: z.ZodString;
223
+ }, z.core.$strict>;
224
+ chainId: z.ZodString;
225
+ publisher: z.ZodString;
226
+ requestFingerprint: z.ZodString;
227
+ source: z.ZodString;
228
+ version: z.ZodLiteral<1>;
229
+ }, z.core.$strict>;
230
+ declare const PublisherServiceRetireIntentZod: z.ZodObject<{
231
+ kind: z.ZodLiteral<"publisher-service-retire">;
232
+ operationId: z.ZodString;
233
+ revocation: z.ZodObject<{
234
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.revocation" & {
235
+ readonly __schema: true;
236
+ }>;
237
+ service: z.ZodString;
238
+ }, z.core.$strict>;
239
+ chainId: z.ZodString;
240
+ publisher: z.ZodString;
241
+ requestFingerprint: z.ZodString;
242
+ source: z.ZodString;
243
+ version: z.ZodLiteral<1>;
244
+ }, z.core.$strict>;
245
+ declare const PublisherEncryptionKeyRetireIntentZod: z.ZodObject<{
246
+ kind: z.ZodLiteral<"publisher-encryption-key-retire">;
247
+ operationId: z.ZodString;
248
+ revocation: z.ZodObject<{
249
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key.revocation" & {
250
+ readonly __schema: true;
251
+ }>;
252
+ key: z.ZodString;
253
+ }, z.core.$strict>;
254
+ chainId: z.ZodString;
255
+ publisher: z.ZodString;
256
+ requestFingerprint: z.ZodString;
257
+ source: z.ZodString;
258
+ version: z.ZodLiteral<1>;
259
+ }, z.core.$strict>;
260
+ declare const SubscriberGrantRevokeIntentZod: z.ZodObject<{
261
+ kind: z.ZodLiteral<"subscriber-grant-revoke">;
262
+ operationId: z.ZodString;
263
+ revocation: z.ZodObject<{
264
+ schema: z.ZodLiteral<"network.xyo.event.wake.grant.revocation" & {
265
+ readonly __schema: true;
266
+ }>;
267
+ grant: z.ZodString;
268
+ }, z.core.$strict>;
269
+ chainId: z.ZodString;
270
+ publisher: z.ZodString;
271
+ requestFingerprint: z.ZodString;
272
+ source: z.ZodString;
273
+ version: z.ZodLiteral<1>;
274
+ }, z.core.$strict>;
275
+ declare const SubscriberSubscriptionRevokeIntentZod: z.ZodObject<{
276
+ kind: z.ZodLiteral<"subscriber-subscription-revoke">;
277
+ operationId: z.ZodString;
278
+ revocation: z.ZodObject<{
279
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription.revocation" & {
280
+ readonly __schema: true;
281
+ }>;
282
+ subscription: z.ZodString;
283
+ }, z.core.$strict>;
284
+ chainId: z.ZodString;
285
+ publisher: z.ZodString;
286
+ requestFingerprint: z.ZodString;
287
+ source: z.ZodString;
288
+ version: z.ZodLiteral<1>;
289
+ }, z.core.$strict>;
290
+ export declare const HandshakeMutationIntentZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
291
+ kind: z.ZodLiteral<"publisher-encryption-key-retire">;
292
+ operationId: z.ZodString;
293
+ revocation: z.ZodObject<{
294
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key.revocation" & {
295
+ readonly __schema: true;
296
+ }>;
297
+ key: z.ZodString;
298
+ }, z.core.$strict>;
299
+ chainId: z.ZodString;
300
+ publisher: z.ZodString;
301
+ requestFingerprint: z.ZodString;
302
+ source: z.ZodString;
303
+ version: z.ZodLiteral<1>;
304
+ }, z.core.$strict>, z.ZodObject<{
305
+ kind: z.ZodLiteral<"publisher-service-publish">;
306
+ operationId: z.ZodString;
307
+ encryptionKey: z.ZodObject<{
308
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
309
+ readonly __schema: true;
310
+ }>;
311
+ keyId: z.ZodString;
312
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
313
+ publicKey: z.ZodString;
314
+ validFromBlock: z.ZodNumber;
315
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
316
+ }, z.core.$strict>;
317
+ privateKey: z.ZodObject<{
318
+ encryptionKey: z.ZodString;
319
+ keyId: z.ZodString;
320
+ privateKey: z.ZodString;
321
+ }, z.core.$strict>;
322
+ service: z.ZodObject<{
323
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
324
+ readonly __schema: true;
325
+ }>;
326
+ serviceId: z.ZodString;
327
+ revision: z.ZodNumber;
328
+ supersedes: z.ZodOptional<z.ZodString>;
329
+ validFromBlock: z.ZodNumber;
330
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
331
+ events: z.ZodTuple<[z.ZodObject<{
332
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
333
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
334
+ }, z.core.$strict>], null>;
335
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
336
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
337
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
338
+ encryptionKeys: z.ZodArray<z.ZodString>;
339
+ preferredEncryptionKey: z.ZodString;
340
+ limits: z.ZodObject<{
341
+ maxBlocksPerWake: z.ZodNumber;
342
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
343
+ maxPlaintextBytes: z.ZodLiteral<4096>;
344
+ }, z.core.$strict>;
345
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
346
+ }, z.core.$strict>;
347
+ chainId: z.ZodString;
348
+ publisher: z.ZodString;
349
+ requestFingerprint: z.ZodString;
350
+ source: z.ZodString;
351
+ version: z.ZodLiteral<1>;
352
+ }, z.core.$strict>, z.ZodObject<{
353
+ kind: z.ZodLiteral<"publisher-service-retire">;
354
+ operationId: z.ZodString;
355
+ revocation: z.ZodObject<{
356
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.revocation" & {
357
+ readonly __schema: true;
358
+ }>;
359
+ service: z.ZodString;
360
+ }, z.core.$strict>;
361
+ chainId: z.ZodString;
362
+ publisher: z.ZodString;
363
+ requestFingerprint: z.ZodString;
364
+ source: z.ZodString;
365
+ version: z.ZodLiteral<1>;
366
+ }, z.core.$strict>, z.ZodObject<{
367
+ kind: z.ZodLiteral<"publisher-service-rotate-key">;
368
+ operationId: z.ZodString;
369
+ encryptionKey: z.ZodObject<{
370
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
371
+ readonly __schema: true;
372
+ }>;
373
+ keyId: z.ZodString;
374
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
375
+ publicKey: z.ZodString;
376
+ validFromBlock: z.ZodNumber;
377
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
378
+ }, z.core.$strict>;
379
+ privateKey: z.ZodObject<{
380
+ encryptionKey: z.ZodString;
381
+ keyId: z.ZodString;
382
+ privateKey: z.ZodString;
383
+ }, z.core.$strict>;
384
+ selectedKey: z.ZodString;
385
+ selectedService: z.ZodString;
386
+ service: z.ZodObject<{
387
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
388
+ readonly __schema: true;
389
+ }>;
390
+ serviceId: z.ZodString;
391
+ revision: z.ZodNumber;
392
+ supersedes: z.ZodOptional<z.ZodString>;
393
+ validFromBlock: z.ZodNumber;
394
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
395
+ events: z.ZodTuple<[z.ZodObject<{
396
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
397
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
398
+ }, z.core.$strict>], null>;
399
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
400
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
401
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
402
+ encryptionKeys: z.ZodArray<z.ZodString>;
403
+ preferredEncryptionKey: z.ZodString;
404
+ limits: z.ZodObject<{
405
+ maxBlocksPerWake: z.ZodNumber;
406
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
407
+ maxPlaintextBytes: z.ZodLiteral<4096>;
408
+ }, z.core.$strict>;
409
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
410
+ }, z.core.$strict>;
411
+ chainId: z.ZodString;
412
+ publisher: z.ZodString;
413
+ requestFingerprint: z.ZodString;
414
+ source: z.ZodString;
415
+ version: z.ZodLiteral<1>;
416
+ }, z.core.$strict>, z.ZodObject<{
417
+ acceptance: z.ZodObject<{
418
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription.acceptance" & {
419
+ readonly __schema: true;
420
+ }>;
421
+ service: z.ZodString;
422
+ encryptionKey: z.ZodString;
423
+ subscription: z.ZodString;
424
+ grant: z.ZodString;
425
+ challenge: z.ZodString;
426
+ response: z.ZodString;
427
+ }, z.core.$strict>;
428
+ challenge: z.ZodObject<{
429
+ schema: z.ZodLiteral<"network.xyo.event.wake.challenge" & {
430
+ readonly __schema: true;
431
+ }>;
432
+ challengeId: z.ZodString;
433
+ chainId: z.ZodString;
434
+ publisher: z.ZodString;
435
+ subscriber: z.ZodString;
436
+ service: z.ZodString;
437
+ encryptionKey: z.ZodString;
438
+ keyId: z.ZodString;
439
+ subscription: z.ZodString;
440
+ grant: z.ZodString;
441
+ eventKind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
442
+ nonce: z.ZodString;
443
+ issuedAt: z.ZodNumber;
444
+ expiresAt: z.ZodNumber;
445
+ }, z.core.$strict>;
446
+ kind: z.ZodLiteral<"publisher-subscription-accept">;
447
+ operationId: z.ZodString;
448
+ response: z.ZodObject<{
449
+ schema: z.ZodLiteral<"network.xyo.event.wake.challenge.response" & {
450
+ readonly __schema: true;
451
+ }>;
452
+ challenge: z.ZodString;
453
+ proof: z.ZodString;
454
+ }, z.core.$strict>;
455
+ chainId: z.ZodString;
456
+ publisher: z.ZodString;
457
+ requestFingerprint: z.ZodString;
458
+ source: z.ZodString;
459
+ version: z.ZodLiteral<1>;
460
+ }, z.core.$strict>, z.ZodObject<{
461
+ kind: z.ZodLiteral<"subscriber-grant-revoke">;
462
+ operationId: z.ZodString;
463
+ revocation: z.ZodObject<{
464
+ schema: z.ZodLiteral<"network.xyo.event.wake.grant.revocation" & {
465
+ readonly __schema: true;
466
+ }>;
467
+ grant: z.ZodString;
468
+ }, z.core.$strict>;
469
+ chainId: z.ZodString;
470
+ publisher: z.ZodString;
471
+ requestFingerprint: z.ZodString;
472
+ source: z.ZodString;
473
+ version: z.ZodLiteral<1>;
474
+ }, z.core.$strict>, z.ZodObject<{
475
+ kind: z.ZodLiteral<"subscriber-subscription-revoke">;
476
+ operationId: z.ZodString;
477
+ revocation: z.ZodObject<{
478
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription.revocation" & {
479
+ readonly __schema: true;
480
+ }>;
481
+ subscription: z.ZodString;
482
+ }, z.core.$strict>;
483
+ chainId: z.ZodString;
484
+ publisher: z.ZodString;
485
+ requestFingerprint: z.ZodString;
486
+ source: z.ZodString;
487
+ version: z.ZodLiteral<1>;
488
+ }, z.core.$strict>, z.ZodObject<{
489
+ kind: z.ZodLiteral<"subscriber-subscription-subscribe">;
490
+ operationId: z.ZodString;
491
+ encryptionKey: z.ZodObject<{
492
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher.key" & {
493
+ readonly __schema: true;
494
+ }>;
495
+ keyId: z.ZodString;
496
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
497
+ publicKey: z.ZodString;
498
+ validFromBlock: z.ZodNumber;
499
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
500
+ }, z.core.$strict>;
501
+ grant: z.ZodObject<{
502
+ schema: z.ZodLiteral<"network.xyo.event.wake.grant" & {
503
+ readonly __schema: true;
504
+ }>;
505
+ grantId: z.ZodString;
506
+ deploymentId: z.ZodString;
507
+ publisher: z.ZodString;
508
+ queueId: z.ZodOptional<z.ZodString>;
509
+ permissions: z.ZodArray<z.ZodEnum<{
510
+ enqueue: "enqueue";
511
+ }>>;
512
+ }, z.core.$strict>;
513
+ selectedKey: z.ZodString;
514
+ selectedService: z.ZodString;
515
+ service: z.ZodObject<{
516
+ schema: z.ZodLiteral<"network.xyo.event.wake.publisher" & {
517
+ readonly __schema: true;
518
+ }>;
519
+ serviceId: z.ZodString;
520
+ revision: z.ZodNumber;
521
+ supersedes: z.ZodOptional<z.ZodString>;
522
+ validFromBlock: z.ZodNumber;
523
+ expiresAtBlock: z.ZodOptional<z.ZodNumber>;
524
+ events: z.ZodTuple<[z.ZodObject<{
525
+ kind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
526
+ filterProfile: z.ZodLiteral<"network.xyo.event.wake.filter.finalizedhead">;
527
+ }, z.core.$strict>], null>;
528
+ deliveryProfile: z.ZodLiteral<"network.xyo.event.wake.delivery.walletjwt">;
529
+ challengeProfile: z.ZodLiteral<"network.xyo.event.wake.challenge.hmacsha256">;
530
+ encryptionProfile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
531
+ encryptionKeys: z.ZodArray<z.ZodString>;
532
+ preferredEncryptionKey: z.ZodString;
533
+ limits: z.ZodObject<{
534
+ maxBlocksPerWake: z.ZodNumber;
535
+ maxSubscriptionLifetimeBlocks: z.ZodNumber;
536
+ maxPlaintextBytes: z.ZodLiteral<4096>;
537
+ }, z.core.$strict>;
538
+ retirementPolicy: z.ZodLiteral<"existing-acceptances-continue">;
539
+ }, z.core.$strict>;
540
+ subscription: z.ZodObject<{
541
+ encryption: z.ZodObject<{
542
+ profile: z.ZodLiteral<"network.xyo.event.wake.subscription.hpke">;
543
+ enc: z.ZodString;
544
+ ciphertext: z.ZodString;
545
+ }, z.core.$strict>;
546
+ schema: z.ZodLiteral<"network.xyo.event.wake.subscription" & {
547
+ readonly __schema: true;
548
+ }>;
549
+ subscriptionId: z.ZodString;
550
+ revision: z.ZodNumber;
551
+ supersedes: z.ZodOptional<z.ZodString>;
552
+ chainId: z.ZodString;
553
+ publisher: z.ZodString;
554
+ service: z.ZodString;
555
+ encryptionKey: z.ZodString;
556
+ keyId: z.ZodString;
557
+ grant: z.ZodString;
558
+ eventKind: z.ZodLiteral<"network.xyo.event.wake.finalizedhead">;
559
+ expiresAtBlock: z.ZodNumber;
560
+ }, z.core.$strict>;
561
+ chainId: z.ZodString;
562
+ publisher: z.ZodString;
563
+ requestFingerprint: z.ZodString;
564
+ source: z.ZodString;
565
+ version: z.ZodLiteral<1>;
566
+ }, z.core.$strict>], "kind">;
567
+ export type HandshakeMutationIntent = z.infer<typeof HandshakeMutationIntentZod>;
568
+ export type PublisherServicePublishIntent = z.infer<typeof PublisherServicePublishIntentZod>;
569
+ export type PublisherServiceRotateKeyIntent = z.infer<typeof PublisherServiceRotateKeyIntentZod>;
570
+ export type SubscriberSubscriptionIntent = z.infer<typeof SubscriberSubscriptionIntentZod>;
571
+ export type PublisherAcceptanceIntent = z.infer<typeof PublisherAcceptanceIntentZod>;
572
+ export type PublisherServiceRetireIntent = z.infer<typeof PublisherServiceRetireIntentZod>;
573
+ export type PublisherEncryptionKeyRetireIntent = z.infer<typeof PublisherEncryptionKeyRetireIntentZod>;
574
+ export type SubscriberGrantRevokeIntent = z.infer<typeof SubscriberGrantRevokeIntentZod>;
575
+ export type SubscriberSubscriptionRevokeIntent = z.infer<typeof SubscriberSubscriptionRevokeIntentZod>;
576
+ export interface HandshakeMutationIntentLookup {
577
+ readonly chainId: ChainId;
578
+ readonly kind: HandshakeMutationIntentKind;
579
+ readonly operationId: string;
580
+ readonly publisher: NormalizedAddress;
581
+ readonly source: NormalizedAddress;
582
+ }
583
+ export interface HandshakeMutationIntentResolution<TIntent extends HandshakeMutationIntent = HandshakeMutationIntent> {
584
+ readonly disposition: HandshakeMutationIntentDisposition;
585
+ readonly intent: TIntent;
586
+ }
587
+ /** Durable, first-writer-wins boundary for exact logical handshake mutations. */
588
+ export interface HandshakeMutationIntentStore {
589
+ get(lookup: HandshakeMutationIntentLookup): Promise<HandshakeMutationIntent | undefined>;
590
+ getOrCreate<TIntent extends HandshakeMutationIntent>(intent: TIntent): Promise<HandshakeMutationIntentResolution<TIntent>>;
591
+ }
592
+ /** Stable error for reuse of one operation ID with different request or chain context. */
593
+ export declare class HandshakeMutationIntentConflictError extends Error {
594
+ constructor(message?: string);
595
+ }
596
+ /** SHA-256 over the canonical private/public caller-input representation. */
597
+ export declare function handshakeMutationRequestFingerprint(value: unknown): Promise<Hash>;
598
+ export declare function parseHandshakeMutationIntentLookup(value: HandshakeMutationIntentLookup): HandshakeMutationIntentLookup;
599
+ /** Strictly validates an intent and recomputes every canonical object binding. */
600
+ export declare function parseHandshakeMutationIntent(value: unknown): Promise<HandshakeMutationIntent>;
601
+ /** In-memory first-writer-wins adapter for focused tests and ephemeral composition. */
602
+ export declare function createMemoryHandshakeMutationIntentStore(): HandshakeMutationIntentStore;
603
+ export declare function intentLookupKey(lookup: HandshakeMutationIntentLookup): string;
604
+ export declare function assertSameIntentBinding(left: HandshakeMutationIntent, right: HandshakeMutationIntent): void;
605
+ export {};
606
+ //# sourceMappingURL=handshakeMutationIntent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handshakeMutationIntent.d.ts","sourceRoot":"","sources":["../../src/handshakeMutationIntent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAmBvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,4BAA4B,0QAS/B,CAAA;AAEV,MAAM,MAAM,2BAA2B,GAAG,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAA;AACrF,MAAM,MAAM,kCAAkC,GAAG,SAAS,GAAG,SAAS,CAAA;AAmBtE,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOpC,CAAA;AAEF,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAStC,CAAA;AAEF,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAInG;AAED,uFAAuF;AACvF,wBAAgB,wCAAwC,IAAI,4BAA4B,CAmBvF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,6BAA6B,GAAG,MAAM,CAG7E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAgB3G"}
@@ -6,6 +6,7 @@ export type { FilesystemWakeInbox, FilesystemWakeInboxOptions, } from './filesys
6
6
  export { createFilesystemWakeInbox } from './filesystemWakeInbox.ts';
7
7
  export type { FilesystemWakeQueue, FilesystemWakeQueueOptions, } from './filesystemWakeQueue.ts';
8
8
  export { createFilesystemWakeQueue } from './filesystemWakeQueue.ts';
9
+ export * from './handshake.ts';
9
10
  export type { SqliteWakeQueue, SqliteWakeQueueOptions, } from './sqliteWakeQueue.ts';
10
11
  export { createSqliteWakeQueue } from './sqliteWakeQueue.ts';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,YAAY,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAA;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAA;AAChF,YAAY,EACV,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EACV,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EACV,eAAe,EACf,sBAAsB,GACvB,MAAM,sBAAsB,CAAA;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