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

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 (36) hide show
  1. package/README.md +23 -3
  2. package/dist/node/handshake.mjs +122 -249
  3. package/dist/node/handshake.mjs.map +2 -2
  4. package/dist/node/handshakeClients.d.ts +7 -4
  5. package/dist/node/handshakeClients.d.ts.map +1 -1
  6. package/dist/node/handshakeMutationIntent.d.ts +118 -34
  7. package/dist/node/handshakeMutationIntent.d.ts.map +1 -1
  8. package/dist/node/index.d.ts +1 -0
  9. package/dist/node/index.d.ts.map +1 -1
  10. package/dist/node/index.mjs +1582 -291
  11. package/dist/node/index.mjs.map +4 -4
  12. package/dist/node/runtime/abort.d.ts +6 -0
  13. package/dist/node/runtime/abort.d.ts.map +1 -0
  14. package/dist/node/runtime/boundedFetch.d.ts +20 -0
  15. package/dist/node/runtime/boundedFetch.d.ts.map +1 -0
  16. package/dist/node/runtime/handshakeDiscovery.d.ts +16 -0
  17. package/dist/node/runtime/handshakeDiscovery.d.ts.map +1 -0
  18. package/dist/node/runtime/httpsTransport.d.ts +24 -0
  19. package/dist/node/runtime/httpsTransport.d.ts.map +1 -0
  20. package/dist/node/runtime/publisherRuntime.d.ts +84 -0
  21. package/dist/node/runtime/publisherRuntime.d.ts.map +1 -0
  22. package/dist/node/runtime/restGateway.d.ts +36 -0
  23. package/dist/node/runtime/restGateway.d.ts.map +1 -0
  24. package/dist/node/runtime/sourceSigner.d.ts +41 -0
  25. package/dist/node/runtime/sourceSigner.d.ts.map +1 -0
  26. package/dist/node/runtime/sources.d.ts +35 -0
  27. package/dist/node/runtime/sources.d.ts.map +1 -0
  28. package/dist/node/runtime/sqliteHandshakeStores.d.ts +15 -0
  29. package/dist/node/runtime/sqliteHandshakeStores.d.ts.map +1 -0
  30. package/dist/node/runtime/sqlitePublisherState.d.ts +21 -0
  31. package/dist/node/runtime/sqlitePublisherState.d.ts.map +1 -0
  32. package/dist/node/runtime.d.ts +10 -0
  33. package/dist/node/runtime.d.ts.map +1 -0
  34. package/dist/node/runtime.mjs +1640 -0
  35. package/dist/node/runtime.mjs.map +7 -0
  36. package/package.json +16 -11
@@ -0,0 +1,6 @@
1
+ /** Own every listener/timer used by a bounded operation; disposal is mandatory. */
2
+ export declare function publisherAbortScope(signals: readonly AbortSignal[], timeoutMs?: number): {
3
+ signal: AbortSignal;
4
+ dispose(): void;
5
+ };
6
+ //# sourceMappingURL=abort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/runtime/abort.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM;;;EAgBtF"}
@@ -0,0 +1,20 @@
1
+ import type { FetchGetUrlFunc } from 'ethers';
2
+ export interface BoundedPublisherFetchOptions {
3
+ readonly maxConcurrency?: number;
4
+ readonly maxResponseBytes?: number;
5
+ readonly requestTimeoutMs?: number;
6
+ readonly signal?: AbortSignal;
7
+ }
8
+ /** Per-instance SDK transport: aborts the real request, including its body, without changing global fetch. */
9
+ export declare function createBoundedPublisherFetch(options?: BoundedPublisherFetchOptions): {
10
+ fetchFn: typeof fetch;
11
+ close(): Promise<void>;
12
+ readonly activeRequests: number;
13
+ };
14
+ /** Ethers' documented per-request HTTP hook, without its unbounded Node body reader. */
15
+ export declare function createBoundedPublisherEthersTransport(options?: BoundedPublisherFetchOptions): {
16
+ getUrl: FetchGetUrlFunc;
17
+ close(): Promise<void>;
18
+ readonly activeRequests: number;
19
+ };
20
+ //# sourceMappingURL=boundedFetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundedFetch.d.ts","sourceRoot":"","sources":["../../../src/runtime/boundedFetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAG7C,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AACD,8GAA8G;AAC9G,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,4BAAiC;;;;EAwErF;AAED,wFAAwF;AACxF,wBAAgB,qCAAqC,CAAC,OAAO,GAAE,4BAAiC;;;;EAwB/F"}
@@ -0,0 +1,16 @@
1
+ import type { PublisherEncryptionKeyCustody, PublisherHandshakeClient } from '../handshakeClients.ts';
2
+ import type { PublisherHttpsTransport } from './httpsTransport.ts';
3
+ import type { PublisherRuntimeDiscovery } from './publisherRuntime.ts';
4
+ import type { SqlitePublisherState } from './sqlitePublisherState.ts';
5
+ /** Real D005 lifecycle discovery. Off-chain configuration never grants delivery authority. */
6
+ export declare function createPublisherHandshakeDiscovery(options: {
7
+ readonly authorizationChainId: string;
8
+ readonly client: PublisherHandshakeClient;
9
+ readonly keys: PublisherEncryptionKeyCustody;
10
+ readonly maxSubscriptions?: number;
11
+ readonly nowSeconds?: () => number;
12
+ readonly publisher: string;
13
+ readonly state: SqlitePublisherState;
14
+ readonly transport: PublisherHttpsTransport;
15
+ }): PublisherRuntimeDiscovery;
16
+ //# sourceMappingURL=handshakeDiscovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handshakeDiscovery.d.ts","sourceRoot":"","sources":["../../../src/runtime/handshakeDiscovery.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAErG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EACV,yBAAyB,EAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAQrE,8FAA8F;AAC9F,wBAAgB,iCAAiC,CAAC,OAAO,EAAE;IACzD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAA;IAC5C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAA;IACpC,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAA;CAC5C,GAAG,yBAAyB,CAyL5B"}
@@ -0,0 +1,24 @@
1
+ export interface PublisherHttpsTransportOptions {
2
+ /** Exact public HTTPS destinations approved by the operator, including their path. */
3
+ readonly allowedEndpoints: readonly string[];
4
+ /** Private operator-provisioned Vercel automation credential, bound to one exact destination. */
5
+ readonly endpointHeaders?: readonly {
6
+ readonly endpoint: string;
7
+ readonly headers: Readonly<Record<string, string>>;
8
+ }[];
9
+ readonly maxResponseBytes?: number;
10
+ readonly requestTimeoutMs?: number;
11
+ }
12
+ export interface PublisherHttpsResponse {
13
+ readonly body: unknown;
14
+ readonly retryAfterMs?: number;
15
+ readonly status: number;
16
+ }
17
+ export interface PublisherHttpsTransport {
18
+ assertAllowed(endpoint: string): void;
19
+ post(endpoint: string, body: unknown, signal: AbortSignal, jwt?: string): Promise<PublisherHttpsResponse>;
20
+ }
21
+ /** Conservative public-unicast policy, with numeric subnet checks for every IPv6 spelling. */
22
+ export declare function isPublicPublisherAddress(address: string): boolean;
23
+ export declare function createPublisherHttpsTransport(input: PublisherHttpsTransportOptions): PublisherHttpsTransport;
24
+ //# sourceMappingURL=httpsTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpsTransport.d.ts","sourceRoot":"","sources":["../../../src/runtime/httpsTransport.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,8BAA8B;IAC7C,sFAAsF;IACtF,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5C,iGAAiG;IACjG,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KAAE,EAAE,CAAA;IACvH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CACnC;AACD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AACD,MAAM,WAAW,uBAAuB;IACtC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC1G;AA2BD,8FAA8F;AAC9F,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAMjE;AACD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,8BAA8B,GAAG,uBAAuB,CAuG5G"}
@@ -0,0 +1,84 @@
1
+ import type { WakeSource } from '@xyo-network/event-kit-schemas';
2
+ import type { AccountInstance } from '@xyo-network/sdk';
3
+ import type { PublisherHttpsTransport } from './httpsTransport.ts';
4
+ import type { PublisherSourceReader } from './sources.ts';
5
+ import type { SqlitePublisherState } from './sqlitePublisherState.ts';
6
+ export interface PublisherRuntimeSubscription {
7
+ readonly audience: string;
8
+ readonly authorizationChainId: string;
9
+ readonly controller: string;
10
+ readonly deploymentId: string;
11
+ readonly endpoint: string;
12
+ readonly filterHash: string;
13
+ readonly fromPosition: number;
14
+ readonly maxPositionsPerWake: number;
15
+ readonly queueId?: string;
16
+ readonly source: WakeSource;
17
+ readonly subscriptionHash: string;
18
+ }
19
+ /** Discovery MUST return only current finalized, accepted subscriptions. */
20
+ export interface PublisherRuntimeDiscovery {
21
+ acceptPending?(signal: AbortSignal): Promise<void>;
22
+ close?(): Promise<void>;
23
+ discover(signal: AbortSignal): Promise<readonly PublisherRuntimeSubscription[]>;
24
+ /** Re-check the exact current revision before each attempt, including retries. */
25
+ isActive(subscription: PublisherRuntimeSubscription, signal: AbortSignal): Promise<boolean>;
26
+ status?(): PublisherRuntimeDiscoveryStatus;
27
+ }
28
+ export interface PublisherRuntimeDiscoveryStatus {
29
+ readonly activeKeyIds: readonly string[];
30
+ readonly authorizationChainId: string;
31
+ readonly challengeFailures: number;
32
+ readonly finalizedHead?: number;
33
+ readonly indexedThrough?: number;
34
+ readonly keyLoaded: boolean;
35
+ readonly pendingSubscriptions: number;
36
+ readonly rejectedSubscriptions: number;
37
+ }
38
+ export interface PersistentEventPublisherOptions {
39
+ readonly account: AccountInstance;
40
+ readonly concurrency?: number;
41
+ readonly discovery: PublisherRuntimeDiscovery;
42
+ readonly intervalMs?: number;
43
+ readonly maxSubscriptions?: number;
44
+ readonly nowSeconds?: () => number;
45
+ readonly publisher: string;
46
+ readonly requestTimeoutMs?: number;
47
+ readonly sources: readonly PublisherSourceReader[];
48
+ readonly state: SqlitePublisherState;
49
+ readonly transport: PublisherHttpsTransport;
50
+ }
51
+ export interface PersistentEventPublisherStatus {
52
+ readonly activeSubscriptions: number;
53
+ readonly clockHealthy: boolean;
54
+ readonly degraded: boolean;
55
+ readonly delivered: number;
56
+ readonly failures: number;
57
+ readonly handshake?: PublisherRuntimeDiscoveryStatus;
58
+ readonly lastError?: string;
59
+ readonly passes: number;
60
+ readonly pendingDeliveries: number;
61
+ readonly publisher: string;
62
+ readonly ready: boolean;
63
+ readonly running: boolean;
64
+ readonly sources: readonly {
65
+ readonly hash?: string;
66
+ readonly id: string;
67
+ readonly position: number;
68
+ }[];
69
+ readonly subscriptions: readonly {
70
+ readonly cursor: number;
71
+ readonly failures: number;
72
+ readonly id: string;
73
+ readonly pending: boolean;
74
+ readonly state: string;
75
+ }[];
76
+ }
77
+ export interface PersistentEventPublisher {
78
+ runOnce(): Promise<void>;
79
+ start(): Promise<void>;
80
+ status(): PersistentEventPublisherStatus;
81
+ stop(): Promise<void>;
82
+ }
83
+ export declare function createPersistentEventPublisherRuntime(options: PersistentEventPublisherOptions): Promise<PersistentEventPublisher>;
84
+ //# sourceMappingURL=publisherRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publisherRuntime.d.ts","sourceRoot":"","sources":["../../../src/runtime/publisherRuntime.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAgB,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAE9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAIvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAuB,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAG9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,UAAU,EA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AAE,SAAS;QAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KACvB,EAAE,CAAA;CACJ;AACD,MAAM,WAAW,wBAAwB;IACvC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,MAAM,IAAI,8BAA8B,CAAA;IACxC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACtB;AA6BD,wBAAsB,qCAAqC,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA+QvI"}
@@ -0,0 +1,36 @@
1
+ import { FetchJsonClient } from '@ariestools/sdk';
2
+ import type { AccountInstance } from '@xyo-network/sdk';
3
+ import type { GatewaySession, XyoGateway, XyoGatewayRunner } from '@xyo-network/xl1-sdk';
4
+ import { RestDataLakeRunner, RestDataLakeViewer } from '@xyo-network/xl1-sdk';
5
+ export interface PublisherRestGatewayOptions {
6
+ readonly chainStateUrl: string;
7
+ readonly fetchFn: typeof globalThis.fetch;
8
+ readonly finalizedUrl: string;
9
+ readonly indexUrl?: string;
10
+ readonly rpcUrl: string;
11
+ }
12
+ /** Owned public SDK REST gateway; only the optional mutation runner uses RPC. */
13
+ export declare function openPublisherRestGateway(options: PublisherRestGatewayOptions & {
14
+ readonly account: AccountInstance;
15
+ }): Promise<GatewaySession<XyoGatewayRunner>>;
16
+ export declare function openPublisherRestGateway(options: PublisherRestGatewayOptions & {
17
+ readonly account?: undefined;
18
+ }): Promise<GatewaySession<XyoGateway>>;
19
+ declare class BoundedRestDataLakeViewer extends RestDataLakeViewer {
20
+ get client(): FetchJsonClient;
21
+ }
22
+ declare class BoundedRestDataLakeRunner extends RestDataLakeRunner {
23
+ get client(): FetchJsonClient;
24
+ }
25
+ /** Keeps SDK datalake methods and response semantics, overriding only its per-instance HTTP client. */
26
+ export declare function openPublisherDataLake(options: {
27
+ readonly fetchFn: typeof globalThis.fetch;
28
+ readonly url: string;
29
+ readonly writable: boolean;
30
+ }): Promise<{
31
+ reader: import("@xyo-network/xl1-sdk").CreatableProviderInstance<BoundedRestDataLakeViewer>;
32
+ writer: import("@xyo-network/xl1-sdk").CreatableProviderInstance<BoundedRestDataLakeRunner> | undefined;
33
+ close(): Promise<void>;
34
+ }>;
35
+ export {};
36
+ //# sourceMappingURL=restGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restGateway.d.ts","sourceRoot":"","sources":["../../../src/runtime/restGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EACV,cAAc,EAAE,UAAU,EAAE,gBAAgB,EAC7C,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAE0B,kBAAkB,EAAE,kBAAkB,EACtE,MAAM,sBAAsB,CAAA;AAC7B,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;IACzC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AACD,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,2BAA2B,GAAG;IAC9E,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAClC,GAAG,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAC7C,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,2BAA2B,GAAG;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAC7B,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAA;AAyBvC,cACM,yBAA0B,SAAQ,kBAAkB;IACxD,IAAa,MAAM,oBAIlB;CACF;AACD,cACM,yBAA0B,SAAQ,kBAAkB;IACxD,IAAa,MAAM,oBAIlB;CACF;AACD,uGAAuG;AACvG,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,QAAQ,CAAC,OAAO,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;IACzC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAC3B;;;;GAoBA"}
@@ -0,0 +1,41 @@
1
+ import type { WakeEnvelope } from '@xyo-network/event-kit-schemas';
2
+ import type { AccountInstance } from '@xyo-network/sdk';
3
+ /** The wallet-JWT profile commits to the complete strict source-aware body. */
4
+ export declare function createAccountSourceWakeSigner(options: {
5
+ readonly account: AccountInstance;
6
+ readonly nowSeconds?: () => number;
7
+ readonly publisher: string;
8
+ }): {
9
+ sign(input: WakeEnvelope, audience: string): Promise<{
10
+ event: {
11
+ schema: "network.xyo.event.wake.envelope" & {
12
+ readonly __schema: true;
13
+ };
14
+ authorizationChainId: string;
15
+ deploymentId: string;
16
+ wakeId: string;
17
+ source: {
18
+ kind: "xl1-finalized";
19
+ chainId: string;
20
+ } | {
21
+ kind: "ethereum-finalized";
22
+ chainId: string;
23
+ genesisHash: string;
24
+ } | {
25
+ kind: "utc-interval";
26
+ scheduleId: string;
27
+ anchorSeconds: number;
28
+ intervalSeconds: number;
29
+ };
30
+ fromPosition: number;
31
+ toPosition: number;
32
+ filterHash: string;
33
+ issuedAt: number;
34
+ queueId?: string | undefined;
35
+ };
36
+ eventHash: import("@ariestools/sdk").BrandedHash;
37
+ jwt: string;
38
+ publisher: string;
39
+ }>;
40
+ };
41
+ //# sourceMappingURL=sourceSigner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourceSigner.d.ts","sourceRoot":"","sources":["../../../src/runtime/sourceSigner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAIlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,+EAA+E;AAC/E,wBAAgB,6BAA6B,CAAC,OAAO,EAAE;IACrD,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;gBAKqB,YAAY,YAAY,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBnD"}
@@ -0,0 +1,35 @@
1
+ import type { WakeSource } from '@xyo-network/event-kit-schemas';
2
+ import type { XyoGateway } from '@xyo-network/xl1-sdk';
3
+ export interface PublisherSourceHead {
4
+ readonly hash?: string;
5
+ readonly position: number;
6
+ }
7
+ export interface PublisherSourceReader {
8
+ readonly source: WakeSource;
9
+ close?(): void | Promise<void>;
10
+ head(signal: AbortSignal): Promise<PublisherSourceHead>;
11
+ }
12
+ export declare function publisherSourceKey(source: WakeSource): string;
13
+ export declare function boundedPublisherOperation<T>(operation: Promise<T>, signal: AbortSignal, timeoutMs?: number): Promise<T>;
14
+ type GatewayViewer = NonNullable<XyoGateway['connection']['viewer']>;
15
+ export declare function createXl1PublisherSource(options: {
16
+ readonly source: Extract<WakeSource, {
17
+ kind: 'xl1-finalized';
18
+ }>;
19
+ readonly viewer: Pick<GatewayViewer, 'block' | 'chainId' | 'finalization'>;
20
+ }): PublisherSourceReader;
21
+ export declare function createEthereumFinalizedPublisherSource(options: {
22
+ readonly requestTimeoutMs?: number;
23
+ readonly rpcUrl: string;
24
+ readonly source: Extract<WakeSource, {
25
+ kind: 'ethereum-finalized';
26
+ }>;
27
+ }): PublisherSourceReader;
28
+ export declare function createUtcIntervalPublisherSource(options: {
29
+ readonly nowSeconds?: () => number;
30
+ readonly source: Extract<WakeSource, {
31
+ kind: 'utc-interval';
32
+ }>;
33
+ }): PublisherSourceReader;
34
+ export {};
35
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/runtime/sources.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAMtD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AACD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACxD;AACD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAE7D;AACD,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAgB7H;AACD,KAAK,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;AACpE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;QACnC,IAAI,EAAE,eAAe,CAAA;KACtB,CAAC,CAAA;IACF,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC,CAAA;CAC3E,GAAG,qBAAqB,CAuBxB;AACD,wBAAgB,sCAAsC,CAAC,OAAO,EAAE;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;QACnC,IAAI,EAAE,oBAAoB,CAAA;KAC3B,CAAC,CAAA;CACH,GAAG,qBAAqB,CA6DxB;AAED,wBAAgB,gCAAgC,CAAC,OAAO,EAAE;IACxD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;QACnC,IAAI,EAAE,cAAc,CAAA;KACrB,CAAC,CAAA;CACH,GAAG,qBAAqB,CAexB"}
@@ -0,0 +1,15 @@
1
+ import type { PublisherEndpointChallengeStore } from '@xyo-network/event-kit-protocol';
2
+ import type { EventKitReplayCheckpointStore } from '@xyo-network/event-kit-statement-graph';
3
+ import type { FinalizedStatementPublicationJournal } from '@xyo-network/event-kit-xl1';
4
+ import type { PublisherEncryptionKeyCustody } from '../handshakeClients.ts';
5
+ import type { HandshakeMutationIntentStore } from '../handshakeMutationIntent.ts';
6
+ import type { SqlitePublisherState } from './sqlitePublisherState.ts';
7
+ /** All handshake durability uses the same single-owner SQLite authority as delivery. */
8
+ export declare function createSqlitePublisherHandshakeStores(state: SqlitePublisherState): {
9
+ readonly challenges: PublisherEndpointChallengeStore;
10
+ readonly intents: HandshakeMutationIntentStore;
11
+ readonly journal: FinalizedStatementPublicationJournal;
12
+ readonly keys: PublisherEncryptionKeyCustody;
13
+ readonly replay: EventKitReplayCheckpointStore;
14
+ };
15
+ //# sourceMappingURL=sqliteHandshakeStores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqliteHandshakeStores.d.ts","sourceRoot":"","sources":["../../../src/runtime/sqliteHandshakeStores.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoC,+BAA+B,EAAE,MAAM,iCAAiC,CAAA;AAKxH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAA;AAC3F,OAAO,KAAK,EAC2B,oCAAoC,EAC1E,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAK,EAA2B,4BAA4B,EAAE,MAAM,+BAA+B,CAAA;AAI1G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAyBrE,wFAAwF;AACxF,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,oBAAoB,GAAG;IACjF,QAAQ,CAAC,UAAU,EAAE,+BAA+B,CAAA;IACpD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAA;IAC9C,QAAQ,CAAC,OAAO,EAAE,oCAAoC,CAAA;IACtD,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAA;IAC5C,QAAQ,CAAC,MAAM,EAAE,6BAA6B,CAAA;CAC/C,CA0IA"}
@@ -0,0 +1,21 @@
1
+ export interface SqlitePublisherStateOptions {
2
+ /** Immutable chain/publisher binding. A database must never silently change owners. */
3
+ readonly identity: string;
4
+ readonly path: string;
5
+ }
6
+ /** Single-process SQLite authority for publisher checkpoints, custody and delivery records. */
7
+ export interface SqlitePublisherState {
8
+ readonly path: string;
9
+ close(): void;
10
+ entries<T>(namespace: string): readonly {
11
+ readonly key: string;
12
+ readonly value: T;
13
+ }[];
14
+ get<T>(namespace: string, key: string): T | undefined;
15
+ insert(namespace: string, key: string, value: unknown): boolean;
16
+ remove(namespace: string, key: string): void;
17
+ set(namespace: string, key: string, value: unknown): void;
18
+ transaction<T>(work: () => T): T;
19
+ }
20
+ export declare function openSqlitePublisherState(options: SqlitePublisherStateOptions): Promise<SqlitePublisherState>;
21
+ //# sourceMappingURL=sqlitePublisherState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlitePublisherState.d.ts","sourceRoot":"","sources":["../../../src/runtime/sqlitePublisherState.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,2BAA2B;IAC1C,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AASD,+FAA+F;AAC/F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,KAAK,IAAI,IAAI,CAAA;IACb,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS;QACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;KAClB,EAAE,CAAA;IACH,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAA;IACrD,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAA;IAC/D,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IACzD,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;CACjC;AAsBD,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgHlH"}
@@ -0,0 +1,10 @@
1
+ export * from './runtime/boundedFetch.ts';
2
+ export * from './runtime/handshakeDiscovery.ts';
3
+ export * from './runtime/httpsTransport.ts';
4
+ export * from './runtime/publisherRuntime.ts';
5
+ export * from './runtime/restGateway.ts';
6
+ export * from './runtime/sources.ts';
7
+ export * from './runtime/sourceSigner.ts';
8
+ export * from './runtime/sqliteHandshakeStores.ts';
9
+ export * from './runtime/sqlitePublisherState.ts';
10
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA"}