@xyo-network/event-kit-protocol 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +17 -2
  2. package/dist/neutral/canonicalJson.d.ts +5 -0
  3. package/dist/neutral/canonicalJson.d.ts.map +1 -0
  4. package/dist/neutral/endpointChallenge.d.ts +36 -0
  5. package/dist/neutral/endpointChallenge.d.ts.map +1 -0
  6. package/dist/neutral/handshakeConstruction.d.ts +91 -0
  7. package/dist/neutral/handshakeConstruction.d.ts.map +1 -0
  8. package/dist/neutral/index.d.ts +13 -0
  9. package/dist/neutral/index.d.ts.map +1 -1
  10. package/dist/neutral/index.mjs +1067 -47
  11. package/dist/neutral/index.mjs.map +4 -4
  12. package/dist/neutral/lifecycleSelection.d.ts +105 -0
  13. package/dist/neutral/lifecycleSelection.d.ts.map +1 -0
  14. package/dist/neutral/memoryStatementGrantGraph.d.ts +4 -0
  15. package/dist/neutral/memoryStatementGrantGraph.d.ts.map +1 -1
  16. package/dist/neutral/memoryWakeInbox.d.ts +3 -2
  17. package/dist/neutral/memoryWakeInbox.d.ts.map +1 -1
  18. package/dist/neutral/publisherHandshakeStores.d.ts +97 -0
  19. package/dist/neutral/publisherHandshakeStores.d.ts.map +1 -0
  20. package/dist/neutral/publisherSubscription.d.ts +127 -0
  21. package/dist/neutral/publisherSubscription.d.ts.map +1 -0
  22. package/dist/neutral/statementGraphPorts.d.ts +5 -2
  23. package/dist/neutral/statementGraphPorts.d.ts.map +1 -1
  24. package/dist/neutral/statementGraphWakeGrantAuthorizer.d.ts +4 -4
  25. package/dist/neutral/statementGraphWakeGrantAuthorizer.d.ts.map +1 -1
  26. package/dist/neutral/wakeSubscriptionEncoding.d.ts +12 -0
  27. package/dist/neutral/wakeSubscriptionEncoding.d.ts.map +1 -0
  28. package/dist/neutral/wakeSubscriptionHpke.d.ts +52 -0
  29. package/dist/neutral/wakeSubscriptionHpke.d.ts.map +1 -0
  30. package/package.json +11 -10
package/README.md CHANGED
@@ -20,12 +20,27 @@ Paper §6 and §13.
20
20
  D-002's target is a raw strict XYO Payload plus a real short-lived wallet JWT;
21
21
  there is no separate event signature.
22
22
 
23
+ D-005 adds a second, independent pure-protocol surface for the on-chain
24
+ subscription handshake. It provides canonical RFC 8785 bytes, one fixed RFC
25
+ 9180 Base-mode suite (X25519/HKDF-SHA256/AES-128-GCM), dedicated encryption-key
26
+ generation, strict one-shot subscription encryption/decryption, HMAC-SHA256
27
+ endpoint challenge proof, and deterministic fail-closed service/key/
28
+ subscription lifecycle selection. Clear routing fields and the structural
29
+ subscriber claim source are HPKE associated data. This package still performs
30
+ no XL1, datalake, filesystem, HTTP, or cloud I/O.
31
+
32
+ See the normative
33
+ [on-chain handshake profile](../../docs/ON_CHAIN_HANDSHAKE_PROFILE.md) and the
34
+ language-neutral fixture at
35
+ `../../conformance/vectors/subscription-hpke.json`.
36
+
23
37
  `createMemoryWakeInbox` ships one conformant `AtomicWakeInbox`: it serializes
24
38
  the critical section, binds a fresh `jti` to an existing wake receipt, and hands
25
39
  the wake to its sink before consuming either identity, so a failing sink leaves
26
40
  the attempt retryable. It is single-process and loses state on restart — a
27
- durable adapter and full runtime qualification are still pending, so this is not
28
- production evidence.
41
+ durable adapter is available from `@xyo-network/event-kit-node`, but full
42
+ resident-runtime and network qualification remain pending. The memory adapter
43
+ is not production evidence.
29
44
 
30
45
  The pre-D-002 `admitWake` / `acceptWake` callback scaffold, its injected crypto
31
46
  port, the split `has`/`remember` replay store, and the `isPublisherEnabled`
@@ -0,0 +1,5 @@
1
+ /** RFC 8785 JSON Canonicalization Scheme for I-JSON-compatible values. */
2
+ export declare function canonicalJson(value: unknown): string;
3
+ /** UTF-8 bytes of {@link canonicalJson}. */
4
+ export declare function canonicalJsonBytes(value: unknown): Uint8Array;
5
+ //# sourceMappingURL=canonicalJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalJson.d.ts","sourceRoot":"","sources":["../../src/canonicalJson.ts"],"names":[],"mappings":"AA6CA,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD;AAED,4CAA4C;AAC5C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAE7D"}
@@ -0,0 +1,36 @@
1
+ import type { Base64Url32Bytes, ChainId, EndpointChallenge, EndpointChallengeResponse, FinalizedHeadEventKind, HandshakeId, Hash, NormalizedAddress } from '@xyo-network/event-kit-schemas';
2
+ export interface CreateEndpointChallengeInput {
3
+ chainId: ChainId;
4
+ encryptionKey: Hash;
5
+ eventKind: FinalizedHeadEventKind;
6
+ grant: Hash;
7
+ issuedAt: number;
8
+ keyId: HandshakeId;
9
+ lifetimeSeconds?: number;
10
+ publisher: NormalizedAddress;
11
+ service: Hash;
12
+ subscriber: NormalizedAddress;
13
+ subscription: Hash;
14
+ }
15
+ export interface VerifyEndpointChallengeResponseInput {
16
+ challenge: EndpointChallenge;
17
+ nowSeconds: number;
18
+ response: EndpointChallengeResponse;
19
+ secret: Base64Url32Bytes;
20
+ }
21
+ type VerifyEndpointChallengeProofInput = Omit<VerifyEndpointChallengeResponseInput, 'nowSeconds'>;
22
+ export declare function endpointChallengeHash(challenge: EndpointChallenge): Promise<Hash>;
23
+ /** Construct a fresh, strict challenge request without exposing the expected proof. */
24
+ export declare function createEndpointChallenge(input: CreateEndpointChallengeInput): EndpointChallenge;
25
+ /** Build the endpoint's HMAC-SHA256 proof over the raw 32-byte challenge data hash. */
26
+ export declare function createEndpointChallengeResponse(challenge: EndpointChallenge, secret: Base64Url32Bytes): Promise<EndpointChallengeResponse>;
27
+ /**
28
+ * Cryptographic proof/binding check without authorizing a new time-bounded
29
+ * decision. This remains package-internal and exists only so an exact durable
30
+ * verified decision can be resumed after its Unix window closes.
31
+ */
32
+ export declare function verifyEndpointChallengeProof(input: VerifyEndpointChallengeProofInput): Promise<boolean>;
33
+ /** Pure proof/time check. Durable one-time consumption belongs to the runtime admission path. */
34
+ export declare function verifyEndpointChallengeResponse(input: VerifyEndpointChallengeResponseInput): Promise<boolean>;
35
+ export {};
36
+ //# sourceMappingURL=endpointChallenge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpointChallenge.d.ts","sourceRoot":"","sources":["../../src/endpointChallenge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,WAAW,EACX,IAAI,EACJ,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAevC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,IAAI,CAAA;IACnB,SAAS,EAAE,sBAAsB,CAAA;IACjC,KAAK,EAAE,IAAI,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,WAAW,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,iBAAiB,CAAA;IAC5B,OAAO,EAAE,IAAI,CAAA;IACb,UAAU,EAAE,iBAAiB,CAAA;IAC7B,YAAY,EAAE,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,oCAAoC;IACnD,SAAS,EAAE,iBAAiB,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,yBAAyB,CAAA;IACnC,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED,KAAK,iCAAiC,GAAG,IAAI,CAAC,oCAAoC,EAAE,YAAY,CAAC,CAAA;AA6BjG,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvF;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,iBAAiB,CA6B9F;AAED,uFAAuF;AACvF,wBAAsB,+BAA+B,CACnD,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,yBAAyB,CAAC,CAQpC;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,iCAAiC,GACvC,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED,iGAAiG;AACjG,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,oCAAoC,GAC1C,OAAO,CAAC,OAAO,CAAC,CAUlB"}
@@ -0,0 +1,91 @@
1
+ import type { Base64Url32Bytes, ChainId, EncryptedWakeSubscription, EndpointChallenge, EndpointChallengeResponse, HandshakeId, Hash, NormalizedAddress, PublisherEncryptionKey, PublisherEncryptionKeyRevocation, PublisherService, PublisherServiceRevocation, WakeGrantObject, WakeGrantRevocation, WakeSubscriptionAcceptance, WakeSubscriptionAcceptanceRevocation, WakeSubscriptionPlaintext, WakeSubscriptionRevocation } from '@xyo-network/event-kit-schemas';
2
+ import type { WakeSubscriptionPrivateKey, WakeSubscriptionPublicKey } from './wakeSubscriptionHpke.ts';
3
+ export type EventKitHandshakePublicObject = EncryptedWakeSubscription | EndpointChallenge | EndpointChallengeResponse | PublisherEncryptionKey | PublisherEncryptionKeyRevocation | PublisherService | PublisherServiceRevocation | WakeGrantObject | WakeGrantRevocation | WakeSubscriptionAcceptance | WakeSubscriptionAcceptanceRevocation | WakeSubscriptionRevocation;
4
+ export interface HashedHandshakeObject<T extends EventKitHandshakePublicObject> {
5
+ readonly body: T;
6
+ readonly objectHash: Hash;
7
+ }
8
+ export interface CreatePublisherEncryptionKeyInput {
9
+ readonly expiresAtBlock?: number;
10
+ readonly keyId?: HandshakeId;
11
+ readonly publicKey: Base64Url32Bytes;
12
+ readonly validFromBlock: number;
13
+ }
14
+ export interface GeneratePublisherEncryptionKeyInput {
15
+ readonly expiresAtBlock?: number;
16
+ readonly validFromBlock: number;
17
+ }
18
+ export interface GeneratedPublisherEncryptionKey {
19
+ readonly descriptor: PublisherEncryptionKey;
20
+ readonly descriptorHash: Hash;
21
+ readonly privateKey: WakeSubscriptionPrivateKey;
22
+ readonly publicKey: WakeSubscriptionPublicKey;
23
+ }
24
+ export interface CreatePublisherServiceInput {
25
+ readonly encryptionKeys: readonly Hash[];
26
+ readonly expiresAtBlock?: number;
27
+ readonly maxBlocksPerWake: number;
28
+ readonly maxSubscriptionLifetimeBlocks: number;
29
+ readonly preferredEncryptionKey: Hash;
30
+ readonly revision?: number;
31
+ readonly serviceId?: HandshakeId;
32
+ readonly supersedes?: Hash;
33
+ readonly validFromBlock: number;
34
+ }
35
+ export interface CreateWakeGrantInput {
36
+ readonly deploymentId: string;
37
+ readonly grantId?: string;
38
+ readonly publisher: NormalizedAddress;
39
+ readonly queueId?: string;
40
+ }
41
+ export interface CreateWakeSubscriptionPlaintextInput {
42
+ readonly audience: string;
43
+ readonly challengeSecret?: Base64Url32Bytes;
44
+ readonly deploymentId: string;
45
+ readonly endpoint: string;
46
+ readonly maxBlocksPerWake: number;
47
+ readonly queueId?: string | null;
48
+ }
49
+ export interface CreateEncryptedWakeSubscriptionInput {
50
+ readonly chainId: ChainId;
51
+ readonly expiresAtBlock: number;
52
+ readonly grant: Hash;
53
+ readonly plaintext: WakeSubscriptionPlaintext;
54
+ readonly publisher: NormalizedAddress;
55
+ readonly publisherKey: WakeSubscriptionPublicKey;
56
+ readonly revision?: number;
57
+ readonly service: Hash;
58
+ readonly subscriber: NormalizedAddress;
59
+ readonly subscriptionId?: HandshakeId;
60
+ readonly supersedes?: Hash;
61
+ }
62
+ export interface CreateWakeSubscriptionAcceptanceInput {
63
+ readonly challenge: Hash;
64
+ readonly encryptionKey: Hash;
65
+ readonly grant: Hash;
66
+ readonly response: Hash;
67
+ readonly service: Hash;
68
+ readonly subscription: Hash;
69
+ }
70
+ /** Canonical XYO data hash after strict validation of a public handshake object. */
71
+ export declare function handshakeObjectHash(object: EventKitHandshakePublicObject): Promise<Hash>;
72
+ export declare function withHandshakeObjectHash<T extends EventKitHandshakePublicObject>(body: T): Promise<HashedHandshakeObject<T>>;
73
+ /** Build one strict publisher X25519 key descriptor. */
74
+ export declare function createPublisherEncryptionKey(input: CreatePublisherEncryptionKeyInput): PublisherEncryptionKey;
75
+ /** Generate dedicated encryption material and bind both halves to its descriptor hash. */
76
+ export declare function generatePublisherEncryptionKey(input: GeneratePublisherEncryptionKeyInput): Promise<GeneratedPublisherEncryptionKey>;
77
+ /** Build the fixed initial finalized-head publisher advertisement profile. */
78
+ export declare function createPublisherService(input: CreatePublisherServiceInput): PublisherService;
79
+ /** Build a fresh exact D-002 enqueue grant for one publisher and route scope. */
80
+ export declare function createWakeGrant(input: CreateWakeGrantInput): WakeGrantObject;
81
+ /** Generate a new 32-byte endpoint challenge secret when one is not supplied. */
82
+ export declare function createWakeSubscriptionPlaintext(input: CreateWakeSubscriptionPlaintextInput): WakeSubscriptionPlaintext;
83
+ /** Construct and encrypt one strict subscription with fresh HPKE ephemeral material. */
84
+ export declare function createEncryptedWakeSubscription(input: CreateEncryptedWakeSubscriptionInput): Promise<EncryptedWakeSubscription>;
85
+ export declare function createWakeSubscriptionAcceptance(input: CreateWakeSubscriptionAcceptanceInput): WakeSubscriptionAcceptance;
86
+ export declare function createPublisherServiceRevocation(service: Hash): PublisherServiceRevocation;
87
+ export declare function createPublisherEncryptionKeyRevocation(key: Hash): PublisherEncryptionKeyRevocation;
88
+ export declare function createWakeGrantRevocation(grant: Hash): WakeGrantRevocation;
89
+ export declare function createWakeSubscriptionRevocation(subscription: Hash): WakeSubscriptionRevocation;
90
+ export declare function createWakeSubscriptionAcceptanceRevocation(acceptance: Hash): WakeSubscriptionAcceptanceRevocation;
91
+ //# sourceMappingURL=handshakeConstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handshakeConstruction.d.ts","sourceRoot":"","sources":["../../src/handshakeConstruction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,OAAO,EACP,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EAC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,yBAAyB,CAwB3B;AAED,wFAAwF;AACxF,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,oCAAoC,GAC1C,OAAO,CAAC,yBAAyB,CAAC,CAyBpC;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,qCAAqC,GAC3C,0BAA0B,CAW5B;AAED,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,IAAI,GAAG,0BAA0B,CAI1F;AAED,wBAAgB,sCAAsC,CAAC,GAAG,EAAE,IAAI,GAAG,gCAAgC,CAIlG;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,IAAI,GAAG,mBAAmB,CAI1E;AAED,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,IAAI,GAAG,0BAA0B,CAI/F;AAED,wBAAgB,0CAA0C,CACxD,UAAU,EAAE,IAAI,GACf,oCAAoC,CAItC"}
@@ -2,12 +2,22 @@ export type { AtomicWakeInbox, AuthorizedWakeGrant, WakeAdmissionAttempt, WakeAd
2
2
  export { EVENT_KIT_REPLAY_RETENTION_SKEW_SECONDS } from './admissionTypes.ts';
3
3
  export type { AdmitAndEnqueueFailure, AdmitAndEnqueueFailureReason, AdmitAndEnqueueInput, AdmitAndEnqueueResult, AdmitAndEnqueueSuccess, } from './admitAndEnqueue.ts';
4
4
  export { admitAndEnqueue } from './admitAndEnqueue.ts';
5
+ export { canonicalJson, canonicalJsonBytes, } from './canonicalJson.ts';
6
+ export type { CreateEndpointChallengeInput, VerifyEndpointChallengeResponseInput, } from './endpointChallenge.ts';
7
+ export { createEndpointChallenge, createEndpointChallengeResponse, endpointChallengeHash, verifyEndpointChallengeResponse, } from './endpointChallenge.ts';
8
+ export type { CreateEncryptedWakeSubscriptionInput, CreatePublisherEncryptionKeyInput, CreatePublisherServiceInput, CreateWakeGrantInput, CreateWakeSubscriptionAcceptanceInput, CreateWakeSubscriptionPlaintextInput, EventKitHandshakePublicObject, GeneratedPublisherEncryptionKey, GeneratePublisherEncryptionKeyInput, HashedHandshakeObject, } from './handshakeConstruction.ts';
9
+ export { createEncryptedWakeSubscription, createPublisherEncryptionKey, createPublisherEncryptionKeyRevocation, createPublisherService, createPublisherServiceRevocation, createWakeGrant, createWakeGrantRevocation, createWakeSubscriptionAcceptance, createWakeSubscriptionAcceptanceRevocation, createWakeSubscriptionPlaintext, createWakeSubscriptionRevocation, generatePublisherEncryptionKey, handshakeObjectHash, withHandshakeObjectHash, } from './handshakeConstruction.ts';
10
+ export type { LifecycleRevisionEvidence, PreferredEncryptionKeyFailure, PreferredEncryptionKeyFailureReason, PreferredEncryptionKeyInput, PreferredEncryptionKeyResolution, PreferredEncryptionKeySuccess, PublisherAcceptanceLifecycle, PublisherEncryptionKeyLifecycle, PublisherServiceLifecycleRevision, PublisherServiceSelection, PublisherServiceSelectionFailure, PublisherServiceSelectionFailureReason, PublisherServiceSelectionInput, PublisherServiceSelectionSuccess, SubscriptionActivation, SubscriptionActivationFailure, SubscriptionActivationFailureReason, SubscriptionActivationInput, SubscriptionActivationSuccess, WakeSubscriptionLifecycleRevision, } from './lifecycleSelection.ts';
11
+ export { resolvePreferredEncryptionKey, selectPublisherService, selectSubscriptionActivation, } from './lifecycleSelection.ts';
5
12
  export type { MemoryStatementGrantGraph } from './memoryStatementGrantGraph.ts';
6
13
  export { createMemoryStatementGrantGraph } from './memoryStatementGrantGraph.ts';
7
14
  export type { MemoryWakeInbox, MemoryWakeInboxOptions, } from './memoryWakeInbox.ts';
8
15
  export { createMemoryWakeInbox } from './memoryWakeInbox.ts';
9
16
  export type { MemoryWakeQueue } from './memoryWakeQueue.ts';
10
17
  export { createMemoryWakeQueue } from './memoryWakeQueue.ts';
18
+ export type { BeginPublisherEndpointChallengeAttemptInput, BeginPublisherEndpointChallengeAttemptResult, CompletePublisherEndpointChallengeInput, CompletePublisherEndpointChallengeResult, IssuePublisherEndpointChallengeInput, IssuePublisherEndpointChallengeResult, PublisherEncryptionKeyLookup, PublisherEncryptionKeyStore, PublisherEndpointChallengeRecord, PublisherEndpointChallengeState, PublisherEndpointChallengeStore, } from './publisherHandshakeStores.ts';
19
+ export type { BeginPublisherEndpointChallengeAttemptApiInput, BeginPublisherEndpointChallengeAttemptApiResult, CompletePublisherEndpointChallengeApiInput, CompletePublisherEndpointChallengeApiResult, CompletePublisherEndpointChallengeFailure, CompletePublisherEndpointChallengeFailureReason, CompletePublisherEndpointChallengeSuccess, IssuePublisherEndpointChallengeApiInput, IssuePublisherEndpointChallengeApiResult, PublisherEndpointChallengeContext, PublisherSubscriptionCandidate, PublisherSubscriptionValidation, PublisherSubscriptionValidationFailure, PublisherSubscriptionValidationFailureReason, ValidatedPublisherSubscription, } from './publisherSubscription.ts';
20
+ export { beginPublisherEndpointChallengeAttempt, completePublisherEndpointChallenge, endpointChallengeMatchesPublisherContext, issuePublisherEndpointChallenge, validateAndDecryptPublisherSubscription, } from './publisherSubscription.ts';
11
21
  export type { StatementGrantClaim, StatementGrantClaimQuery, StatementGrantObject, StatementGraphGrantReadModel, } from './statementGraphPorts.ts';
12
22
  export type { StatementGraphWakeGrantAuthorizerOptions } from './statementGraphWakeGrantAuthorizer.ts';
13
23
  export { createStatementGraphWakeGrantAuthorizer } from './statementGraphWakeGrantAuthorizer.ts';
@@ -16,4 +26,7 @@ export type { VerifiedWakeRequest, VerifyWakeRequestFailure, VerifyWakeRequestIn
16
26
  export { EVENT_KIT_MAX_FUTURE_IAT_SECONDS, EVENT_KIT_MAX_JWT_LIFETIME_SECONDS, verifyWakeRequest, } from './verifyWakeRequest.ts';
17
27
  export type { LeasedWake, WakeHandler, WakeQueue, } from './wakeQueue.ts';
18
28
  export { drainQueue } from './wakeQueue.ts';
29
+ export { wakeSubscriptionAadBytes, wakeSubscriptionPlaintextBytes, wakeSubscriptionPlaintextFromBytes, } from './wakeSubscriptionEncoding.ts';
30
+ export type { DecryptWakeSubscriptionInput, EncryptWakeSubscriptionInput, WakeSubscriptionEncryptionKeyPair, WakeSubscriptionPrivateKey, WakeSubscriptionPublicKey, } from './wakeSubscriptionHpke.ts';
31
+ export { decryptWakeSubscription, encryptWakeSubscription, generateWakeSubscriptionEncryptionKeyPair, WakeSubscriptionDecryptionError, } from './wakeSubscriptionHpke.ts';
19
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAA;AAC7E,YAAY,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAA;AAChF,YAAY,EACV,eAAe,EACf,sBAAsB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,wCAAwC,EAAE,MAAM,wCAAwC,CAAA;AACtG,OAAO,EAAE,uCAAuC,EAAE,MAAM,wCAAwC,CAAA;AAChG,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,gCAAgC,EAChC,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,GAClB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EACV,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAA;AAC7E,YAAY,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACL,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,4BAA4B,EAC5B,oCAAoC,GACrC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EACV,oCAAoC,EACpC,iCAAiC,EACjC,2BAA2B,EAC3B,oBAAoB,EACpB,qCAAqC,EACrC,oCAAoC,EACpC,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,qBAAqB,GACtB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