p2party 0.14.2 → 0.14.7

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 (126) hide show
  1. package/README.md +230 -30
  2. package/docs/getting-started.md +15 -0
  3. package/docs/protocol-v4-security.md +40 -0
  4. package/docs/references.md +28 -8
  5. package/docs/session-api.md +10 -2
  6. package/lib/api/signalingServerApi.d.ts +13 -2
  7. package/lib/api/webrtc/applyIceConfiguration.d.ts +9 -0
  8. package/lib/api/webrtc/dataChannelHandler.d.ts +10 -0
  9. package/lib/api/webrtc/deleteRoomData.d.ts +13 -0
  10. package/lib/api/webrtc/disconnectFromAllRoomsQuery.d.ts +2 -1
  11. package/lib/api/webrtc/disconnectFromRoomQuery.d.ts +2 -1
  12. package/lib/api/webrtc/disconnectQuery.d.ts +2 -1
  13. package/lib/api/webrtc/iceRepair.d.ts +3 -1
  14. package/lib/api/webrtc/index.d.ts +2 -1
  15. package/lib/api/webrtc/interfaces.d.ts +37 -0
  16. package/lib/api/webrtc/negotiationLock.d.ts +24 -0
  17. package/lib/api/webrtc/pendingOffer.d.ts +29 -0
  18. package/lib/api/webrtc/rebindDeadline.d.ts +61 -0
  19. package/lib/api/webrtc/remoteTransportChange.d.ts +142 -0
  20. package/lib/api/webrtc/retiredRemoteTransports.d.ts +70 -0
  21. package/lib/api/webrtc/roomEdgeBudget.d.ts +10 -0
  22. package/lib/api/webrtc/setDescriptionQuery.d.ts +8 -1
  23. package/lib/api/webrtc/settleOnClose.d.ts +36 -0
  24. package/lib/blindRendezvous/admissionInput.d.ts +11 -0
  25. package/lib/blindRendezvous/admissionPolicy.d.ts +217 -0
  26. package/lib/blindRendezvous/canonicalSchema.d.ts +139 -0
  27. package/lib/blindRendezvous/carrierEnvelope.d.ts +105 -0
  28. package/lib/blindRendezvous/coreReduce.d.ts +199 -0
  29. package/lib/blindRendezvous/derivations.d.ts +381 -0
  30. package/lib/blindRendezvous/identityHelloAdmission.d.ts +89 -0
  31. package/lib/blindRendezvous/identityHelloAdmissionPersistence.d.ts +133 -0
  32. package/lib/blindRendezvous/identityHelloHistoricalEvidence.d.ts +52 -0
  33. package/lib/blindRendezvous/identityHelloOpen.d.ts +167 -0
  34. package/lib/blindRendezvous/identityHelloTrial.d.ts +271 -0
  35. package/lib/blindRendezvous/localAdmissibleProject.d.ts +101 -0
  36. package/lib/blindRendezvous/localPresenceKeyBinding.d.ts +108 -0
  37. package/lib/blindRendezvous/localStableIdentityCustody.d.ts +46 -0
  38. package/lib/blindRendezvous/normativeKernel.d.ts +222 -0
  39. package/lib/blindRendezvous/operation.d.ts +137 -0
  40. package/lib/blindRendezvous/operationPayload.d.ts +134 -0
  41. package/lib/blindRendezvous/pairBootstrapSuite.d.ts +93 -0
  42. package/lib/blindRendezvous/pairCrypto.d.ts +122 -0
  43. package/lib/blindRendezvous/pairLedger.d.ts +154 -0
  44. package/lib/blindRendezvous/pairOpenBudget.d.ts +67 -0
  45. package/lib/blindRendezvous/pairOpenReservation.d.ts +157 -0
  46. package/lib/blindRendezvous/pairPlaintext.d.ts +240 -0
  47. package/lib/blindRendezvous/pairStepEnvelope.d.ts +60 -0
  48. package/lib/blindRendezvous/plannerState.d.ts +61 -0
  49. package/lib/blindRendezvous/projections.d.ts +71 -0
  50. package/lib/blindRendezvous/publicWindow.d.ts +330 -0
  51. package/lib/blindRendezvous/retainedOperationStore.d.ts +187 -0
  52. package/lib/blindRendezvous/roomInviteV2.d.ts +92 -0
  53. package/lib/blindRendezvous/roomPolicyV4.d.ts +90 -0
  54. package/lib/blindRendezvous/schemas.d.ts +221 -0
  55. package/lib/blindRendezvous/storeDescriptor.d.ts +160 -0
  56. package/lib/cryptography/aeadWasm.d.ts +18 -0
  57. package/lib/cryptography/byteInput.d.ts +12 -0
  58. package/lib/cryptography/carrierAead.d.ts +23 -0
  59. package/lib/cryptography/chacha20poly1305.d.ts +7 -0
  60. package/lib/cryptography/fips202.d.ts +10 -0
  61. package/lib/cryptography/hpke.d.ts +84 -0
  62. package/lib/cryptography/hpkeSuite.d.ts +39 -0
  63. package/lib/cryptography/hybridKem.d.ts +42 -0
  64. package/lib/cryptography/hybridKemSuite.d.ts +22 -0
  65. package/lib/cryptography/interfaces.d.ts +3 -0
  66. package/lib/cryptography/mlkem.d.ts +27 -1
  67. package/lib/cryptography/mnemonic.d.ts +65 -1
  68. package/lib/cryptography/ownedEd25519KeyMaterial.d.ts +27 -0
  69. package/lib/cryptography/webCryptoSha256.d.ts +20 -0
  70. package/lib/cryptography/x25519.d.ts +18 -0
  71. package/lib/cryptography/xchacha20poly1305.d.ts +7 -0
  72. package/lib/db/api.d.ts +6 -3
  73. package/lib/db/identityEd25519ClientBoundary.d.ts +13 -0
  74. package/lib/db/src/getDB.d.ts +2 -2
  75. package/lib/db/types.d.ts +52 -4
  76. package/lib/db.worker.js +1 -1
  77. package/lib/handlers/coverChannelRegistry.d.ts +22 -0
  78. package/lib/handlers/edgeTeardownFollowUp.d.ts +35 -0
  79. package/lib/handlers/handleChallenge.d.ts +2 -1
  80. package/lib/handlers/handleConnectToPeer.d.ts +1 -1
  81. package/lib/handlers/handleHandshake.d.ts +2 -6
  82. package/lib/handlers/handleSendMessage.d.ts +60 -7
  83. package/lib/handlers/handleWebSocketMessage.d.ts +1 -1
  84. package/lib/handlers/handshakeCore.d.ts +2 -7
  85. package/lib/handlers/handshakeFrame.d.ts +25 -0
  86. package/lib/handlers/ratchetGateWait.d.ts +13 -0
  87. package/lib/handlers/reconcile.d.ts +24 -0
  88. package/lib/handlers/requestRoom.d.ts +30 -0
  89. package/lib/handlers/roomResponse.d.ts +53 -0
  90. package/lib/index.d.ts +99 -12
  91. package/lib/index.js +1 -1
  92. package/lib/index.min.js +1 -1
  93. package/lib/index.mjs +1 -1
  94. package/lib/libcrypto.provenance.json +5 -5
  95. package/lib/libcrypto.wasm +0 -0
  96. package/lib/middleware/roomListenerMiddleware.d.ts +4 -1
  97. package/lib/reducers/commonSlice.d.ts +3 -2
  98. package/lib/reducers/keyPairSlice.d.ts +3 -6
  99. package/lib/reducers/roomSlice.d.ts +81 -5
  100. package/lib/reducers/signalingServerSlice.d.ts +3 -2
  101. package/lib/session.d.ts +6 -3
  102. package/lib/session.js +1 -1
  103. package/lib/session.mjs +1 -1
  104. package/lib/store.d.ts +4 -2
  105. package/lib/utils/constants.d.ts +12 -0
  106. package/lib/utils/correlationId.d.ts +4 -0
  107. package/lib/utils/identityRestore.d.ts +108 -0
  108. package/lib/utils/interfaces.d.ts +25 -6
  109. package/lib/utils/roomConnectAdmission.d.ts +15 -0
  110. package/lib/utils/roomLeaveCoordinator.d.ts +38 -0
  111. package/lib/utils/roomRequestCoordinator.d.ts +104 -0
  112. package/lib/utils/roomRosterReconciler.d.ts +83 -0
  113. package/lib/utils/sdpFingerprint.d.ts +6 -0
  114. package/lib/utils/signalingAttemptLifecycle.d.ts +33 -0
  115. package/lib/utils/signalingAuth.d.ts +21 -2
  116. package/lib/utils/signalingBounds.d.ts +6 -0
  117. package/lib/utils/signalingFrame.d.ts +21 -0
  118. package/lib/utils/signalingHeartbeatWatchdog.d.ts +45 -0
  119. package/lib/utils/signalingIngressQueue.d.ts +49 -0
  120. package/lib/utils/signalingPeerRequestDebouncer.d.ts +13 -0
  121. package/lib/utils/signalingRoomLifecycle.d.ts +7 -0
  122. package/lib/utils/signalingRoomOperationLifecycle.d.ts +14 -0
  123. package/lib/utils/signalingServerBoundary.d.ts +11 -0
  124. package/lib/utils/terminalSettlement.d.ts +53 -0
  125. package/lib/utils/transportIdentity.d.ts +5 -0
  126. package/package.json +1 -1
@@ -0,0 +1,381 @@
1
+ /**
2
+ * Domain-separated derivations for blind rendezvous.
3
+ *
4
+ * Section 3.3 fixes the conventions used throughout: `H(x)` is SHA-256, `||`
5
+ * is byte concatenation, a quoted domain string is its exact ASCII octets with
6
+ * no terminator, and `U16BE`/`U32BE`/`U64BE`/`Byte` are exact big-endian
7
+ * encodings that reject out-of-range input before a preimage is formed.
8
+ *
9
+ * Every formula below is transcribed from the specification and carries its
10
+ * source label. A caller must not build one of these preimages by hand: the
11
+ * domain string, argument order, and canonical encoding are protocol-visible.
12
+ *
13
+ * Status: PROPOSED, NOT FROZEN. The formulas are fixed by the specification,
14
+ * but any value derived over a `Canonical(...)` argument inherits the
15
+ * unfrozen status of `canonicalSchema.ts`, so no output here is a published
16
+ * v0.4 release artifact yet.
17
+ */
18
+ export { hmacSha256, hkdfSha256Expand, hkdfSha256Extract, sha256, } from "../cryptography/webCryptoSha256";
19
+ export declare class DerivationError extends Error {
20
+ readonly name = "DerivationError";
21
+ constructor(message: string);
22
+ }
23
+ /** Exact ASCII octets of a domain-separation string; no terminator. */
24
+ export declare const domain: (value: string) => Uint8Array;
25
+ export declare const byteOf: (value: number) => Uint8Array;
26
+ export declare const u16be: (value: number) => Uint8Array;
27
+ export declare const u32be: (value: number) => Uint8Array;
28
+ export declare const u64be: (value: bigint) => Uint8Array;
29
+ export declare const concatBytes: (...parts: readonly Uint8Array[]) => Uint8Array<ArrayBuffer>;
30
+ /** RFC 4648 URL-safe base64 with no padding. No lowercase variant exists. */
31
+ export declare const base64urlNoPad: (bytes: Uint8Array) => string;
32
+ export declare const base64urlNoPadDecode: (encoded: string) => Uint8Array;
33
+ /** `PolicyHash = H("p2party/room-policy/v4" || Canonical(RoomPolicyV4))` */
34
+ export declare const policyHash: (roomPolicy: unknown) => Promise<Uint8Array>;
35
+ /**
36
+ * `RoomRoot = HKDF-Extract(salt = PolicyHash, ikm = capability)`
37
+ *
38
+ * The result is a local secret and never crosses a carrier.
39
+ */
40
+ export declare const roomRoot: (capability: Uint8Array, policyHashBytes: Uint8Array) => Promise<Uint8Array>;
41
+ /** `RoomContextId = H("p2party/room-context/v4" || capability || PolicyHash)` */
42
+ export declare const roomContextId: (capability: Uint8Array, policyHashBytes: Uint8Array) => Promise<Uint8Array>;
43
+ /**
44
+ * `DeliveryProfileHash =
45
+ * H("p2party/delivery-profile/v1" || Canonical(DeliveryProfileV1))`
46
+ */
47
+ export declare const deliveryProfileHash: (profile: unknown) => Promise<Uint8Array>;
48
+ /**
49
+ * `LocalRoomId = Base64urlNoPad(H("p2party/local-room-id/v1" || RoomContextId))`
50
+ *
51
+ * This replaces the legacy server-assigned room UUID in local state and never
52
+ * crosses a carrier.
53
+ */
54
+ export declare const localRoomId: (roomContextIdBytes: Uint8Array) => Promise<string>;
55
+ /**
56
+ * `StableIdentityCommitment =
57
+ * H("p2party/stable-identity-commitment/v1" ||
58
+ * RoomContextId || stableEd25519PublicKey)`
59
+ *
60
+ * This is a room-scoped pseudonym, not key hiding: a capability holder that
61
+ * already knows a candidate public key can test it. The raw stable key never
62
+ * needs to enter a room-wide presence payload.
63
+ */
64
+ export declare const stableIdentityCommitment: (roomContextIdBytes: Uint8Array, stableEd25519PublicKey: Uint8Array) => Promise<Uint8Array>;
65
+ /**
66
+ * `LocalPeerIdDigest =
67
+ * H("p2party/local-peer-id/v1" ||
68
+ * RoomContextId || StableIdentityCommitment)`
69
+ */
70
+ export declare const localPeerIdDigest: (roomContextIdBytes: Uint8Array, stableIdentityCommitmentBytes: Uint8Array) => Promise<Uint8Array>;
71
+ /** `"peer.v1." || Base64urlNoPad(LocalPeerIdDigest)` */
72
+ export declare const localPeerId: (roomContextIdBytes: Uint8Array, stableIdentityCommitmentBytes: Uint8Array) => Promise<string>;
73
+ /**
74
+ * `EligiblePresenceRank =
75
+ * H("p2party/presence-rank/authority/v1" ||
76
+ * RoomContextId || permitSerial || U64BE(generation))`
77
+ */
78
+ export declare const authorityPresenceRank: (roomContextIdBytes: Uint8Array, permitSerialBytes: Uint8Array, generation: bigint) => Promise<Uint8Array>;
79
+ /**
80
+ * `EligiblePresenceRank =
81
+ * H("p2party/presence-rank/address-book/v1" ||
82
+ * RoomContextId || StableIdentityCommitment)`
83
+ */
84
+ export declare const addressBookPresenceRank: (roomContextIdBytes: Uint8Array, stableIdentityCommitmentBytes: Uint8Array) => Promise<Uint8Array>;
85
+ /**
86
+ * `EligiblePresenceRank =
87
+ * H("p2party/presence-rank/open/v1" ||
88
+ * RoomContextId || PresenceOperationId)`
89
+ */
90
+ export declare const openPresenceRank: (roomContextIdBytes: Uint8Array, presenceOperationIdBytes: Uint8Array) => Promise<Uint8Array>;
91
+ /**
92
+ * `RoomContextConfirmation = H("p2party/room-confirmation/v1" || RoomContextId)`
93
+ */
94
+ export declare const roomContextConfirmation: (roomContextIdBytes: Uint8Array) => Promise<Uint8Array>;
95
+ /**
96
+ * `OperationId =
97
+ * H("p2party/room-operation/v1" || Canonical(AuthenticatedRoomOperationV1))`
98
+ *
99
+ * Derived only after carrier AEAD and operation validation; it is never sent
100
+ * to a store as a logical identifier.
101
+ */
102
+ export declare const operationId: (operation: unknown) => Promise<Uint8Array>;
103
+ /**
104
+ * The operation signature transcript:
105
+ * `"p2party/room-operation-signature/v1" || Canonical(every preceding field)`.
106
+ * The length-disjoint domain prefix is part of the signed bytes.
107
+ */
108
+ export declare const operationSignatureMessage: (unsignedOperation: unknown) => Uint8Array;
109
+ /**
110
+ * `PresenceSemanticSlot = H("p2party/presence-slot/v1" ||
111
+ * authorEpochEd25519Key || U64BE(logicalWindow) || presenceNonce)`
112
+ */
113
+ export declare const presenceSemanticSlot: (authorEpochEd25519Key: Uint8Array, logicalWindow: bigint, presenceNonce: Uint8Array) => Promise<Uint8Array>;
114
+ /**
115
+ * `LeaveSemanticSlot = H("p2party/leave-slot/v1" ||
116
+ * presenceOperationId || U64BE(effectiveLogicalWindow))`
117
+ */
118
+ export declare const leaveSemanticSlot: (presenceOperationId: Uint8Array, effectiveLogicalWindow: bigint) => Promise<Uint8Array>;
119
+ /**
120
+ * `StoreHintSemanticSlot = H("p2party/store-hint-slot/v1" ||
121
+ * StoreId(descriptor) || U64BE(descriptorGeneration))`
122
+ */
123
+ export declare const storeHintSemanticSlot: (storeId: Uint8Array, descriptorGeneration: bigint) => Promise<Uint8Array>;
124
+ /**
125
+ * `AdmissionRevokeSemanticSlot = H("p2party/admission-revoke-slot/v1" ||
126
+ * stableIdentityCommitment || U64BE(minimumAcceptedGeneration) ||
127
+ * U64BE(effectiveLogicalWindow) || U64BE(expiresAfterLogicalWindow))`
128
+ */
129
+ export declare const admissionRevokeSemanticSlot: (stableIdentityCommitment: Uint8Array, minimumAcceptedGeneration: bigint, effectiveLogicalWindow: bigint, expiresAfterLogicalWindow: bigint) => Promise<Uint8Array>;
130
+ /** `H("p2party/pair-slot/v1" || pairRoutingTag)` (Section 4.4 slot table). */
131
+ export declare const pairSemanticSlot: (pairRoutingTag: Uint8Array) => Promise<Uint8Array>;
132
+ /** The schema-owned one-byte registry value for a pair-step kind. */
133
+ export declare const pairStepKindByte: (kind: string) => Uint8Array;
134
+ /**
135
+ * `PairEdgeId = H("p2party/pair-edge/v1" || RoomContextId ||
136
+ * Sort2(PresenceOperationIdA, PresenceOperationIdB))`
137
+ */
138
+ export declare const pairEdgeId: (roomContextIdBytes: Uint8Array, firstPresenceOperationId: Uint8Array, secondPresenceOperationId: Uint8Array) => Promise<Uint8Array>;
139
+ /**
140
+ * `StableEdgeId = H("p2party/stable-edge/v1" || RoomContextId ||
141
+ * Sort2(stableEd25519PublicKeyA, stableEd25519PublicKeyB))`
142
+ */
143
+ export declare const stableEdgeId: (roomContextIdBytes: Uint8Array, firstStableEd25519PublicKey: Uint8Array, secondStableEd25519PublicKey: Uint8Array) => Promise<Uint8Array>;
144
+ /** Hash the exact canonical transport candidate used as its ordering key. */
145
+ export declare const transportOfferCandidateId: (candidate: unknown) => Promise<Uint8Array>;
146
+ /**
147
+ * Construct the one complete pair-AAD binding. The prebinding is snapshotted
148
+ * before the asynchronous semantic-slot derivation.
149
+ */
150
+ export declare const bindPairOuter: (prebinding: unknown, pairRoutingTag: Uint8Array) => Promise<{
151
+ readonly prebinding: unknown;
152
+ readonly pairRoutingTag: Uint8Array;
153
+ readonly semanticSlot: Uint8Array;
154
+ }>;
155
+ /** `"p2party/pair-aad/v1" || Canonical(PairOuterBindingV1)`. */
156
+ export declare const pairAad: (binding: unknown) => Promise<Uint8Array>;
157
+ /**
158
+ * Hash the exact outer binding and unsigned pair-identity plaintext
159
+ * projection. No field other than the nested identity signature is omitted.
160
+ */
161
+ export declare const pairIdentitySignatureHash: (binding: unknown, unsignedProjection: unknown) => Promise<Uint8Array>;
162
+ /**
163
+ * Stable-identity Ed25519 message for HELLO or ACCEPT.
164
+ *
165
+ * The kind byte remains outside the hash so this transcript cannot collide
166
+ * with an existing API that signs a bare 32-byte challenge.
167
+ */
168
+ export declare const pairIdentitySignedMessage: (binding: unknown, unsignedProjection: unknown) => Promise<Uint8Array>;
169
+ /** Exact operation-ID transcript for the confirmed two-flight identity gate. */
170
+ export declare const confirmedPairTranscriptId: (helloOperationId: Uint8Array, acceptOperationId: Uint8Array) => Promise<Uint8Array>;
171
+ /**
172
+ * HELLO's room- and recipient-bound HPKE PSK identifier.
173
+ *
174
+ * `H("p2party/identity-hello-psk-id/v1" || PolicyHash ||
175
+ * responderPresenceOperationId)`
176
+ */
177
+ export declare const identityHelloPskId: (policyHashBytes: Uint8Array, responderPresenceOperationId: Uint8Array) => Promise<Uint8Array>;
178
+ /**
179
+ * ACCEPT's room- and HELLO-bound HPKE PSK identifier.
180
+ *
181
+ * `H("p2party/identity-accept-psk-id/v1" || PolicyHash ||
182
+ * HelloOperationId)`
183
+ */
184
+ export declare const identityAcceptPskId: (policyHashBytes: Uint8Array, helloOperationId: Uint8Array) => Promise<Uint8Array>;
185
+ /** Hash the exact canonical suite-1 HPKE bootstrap header. */
186
+ export declare const pairBootstrapHeaderHash: (bootstrapHeader: unknown) => Promise<Uint8Array>;
187
+ /**
188
+ * HPKE exporter context for the one-use public bootstrap routing tag.
189
+ *
190
+ * `"p2party/bootstrap-tag/v1" || Canonical(PairOuterPrebindingV1)`
191
+ */
192
+ export declare const pairBootstrapTagExporterContext: (prebinding: unknown) => Uint8Array;
193
+ /**
194
+ * HPKE exporter context used only after a bootstrap plaintext authenticates
195
+ * and passes the complete canonical pair-plaintext validator.
196
+ */
197
+ export declare const validatedPairRootExporterContext: (kind: "IDENTITY_HELLO" | "IDENTITY_ACCEPT", canonicalPairPlaintext: Uint8Array) => Promise<Uint8Array>;
198
+ /**
199
+ * Root shared by both endpoints after the two exact identity operation IDs
200
+ * and both validated HPKE bootstrap roots are known.
201
+ */
202
+ export declare const establishedPairRoot: (helloRoot: Uint8Array, acceptRoot: Uint8Array, helloOperationId: Uint8Array, acceptOperationId: Uint8Array) => Promise<Uint8Array>;
203
+ /**
204
+ * First stage of the established-flight schedule. The slot is the complete
205
+ * kind/direction/sequence coordinate and no output length is implicit.
206
+ */
207
+ export declare const pairFlightRoot: (baseSecret: Uint8Array, slot: {
208
+ readonly kind: string;
209
+ readonly direction: number;
210
+ readonly pairSequence: bigint;
211
+ }) => Promise<Uint8Array>;
212
+ /**
213
+ * Second stage of the established-flight schedule, binding the exact signed
214
+ * outer prebinding before the public routing tag exists.
215
+ */
216
+ export declare const pairFlightSecret: (flightRoot: Uint8Array, kind: string, prebinding: unknown) => Promise<Uint8Array>;
217
+ /** `HMAC-SHA-256(PairFlightSecret, "p2party/pair-flight-tag/v1")`. */
218
+ export declare const pairFlightRoutingTag: (flightSecret: Uint8Array) => Promise<Uint8Array>;
219
+ /**
220
+ * Final established-flight key, bound to the complete routing-tag-derived
221
+ * outer binding.
222
+ */
223
+ export declare const pairFlightAeadKey: (flightSecret: Uint8Array, binding: unknown) => Promise<Uint8Array>;
224
+ /**
225
+ * Stable-edge attempt claim signature transcript.
226
+ *
227
+ * The unsigned descriptor is shared with the signed schema, so adding or
228
+ * reordering a claim field cannot silently leave the signature projection.
229
+ */
230
+ export declare const stableEdgeAttemptClaimSignedMessage: (unsignedClaim: unknown) => Promise<Uint8Array>;
231
+ /** Exact offer/answer operation-ID negotiation transcript. */
232
+ export declare const transportNegotiationTranscriptId: (offerOperationId: Uint8Array, answerOperationId: Uint8Array) => Promise<Uint8Array>;
233
+ /**
234
+ * Stable-key-ordered endpoint binding for the mandatory operation carrier.
235
+ *
236
+ * `endpointSessionRole` is 0 for the stable-key-ordered v4 initiator and 1
237
+ * for the responder; it is deliberately not a rendezvous direction.
238
+ */
239
+ export declare const operationCarrierTransportBinding: (roomContextIdBytes: Uint8Array, stableEdgeIdBytes: Uint8Array, confirmedPairTranscriptIdBytes: Uint8Array, transportNegotiationTranscriptIdBytes: Uint8Array, endpointSessionRole: 0 | 1, endpointStableEd25519PublicKey: Uint8Array) => Promise<Uint8Array>;
240
+ /**
241
+ * Handoff identifier shared by WebRTC and non-WebRTC v4 transports.
242
+ */
243
+ export declare const rendezvousChannelId: (roomContextIdBytes: Uint8Array, pairEdgeIdBytes: Uint8Array, confirmedPairTranscriptIdBytes: Uint8Array, transportNegotiationTranscriptIdBytes: Uint8Array) => Promise<Uint8Array>;
244
+ /**
245
+ * `PresenceProofTranscriptHash =
246
+ * H("p2party/presence-proof/v1" || Canonical(PresenceProofTranscript))`
247
+ */
248
+ export declare const presenceProofTranscriptHash: (transcript: unknown) => Promise<Uint8Array>;
249
+ /**
250
+ * `PresenceOwnershipSignedMessage =
251
+ * "p2party/presence-ownership-signature/v1" ||
252
+ * PresenceProofTranscriptHash`
253
+ */
254
+ export declare const presenceOwnershipSignedMessage: (transcriptHash: Uint8Array) => Uint8Array;
255
+ /**
256
+ * `PresencePermitSignedMessage =
257
+ * "p2party/presence-permit-signature/v1" ||
258
+ * H(Canonical(PresencePermitV1 without authoritySignature))`
259
+ */
260
+ export declare const presencePermitSignedMessage: (unsignedPermit: unknown) => Promise<Uint8Array>;
261
+ /**
262
+ * `AdmissionGrantId =
263
+ * H("p2party/admission-grant/v1" || Canonical(AdmissionGrantV1))`
264
+ */
265
+ export declare const admissionGrantId: (grant: unknown) => Promise<Uint8Array>;
266
+ /**
267
+ * `AdmissionGrantSignedMessage =
268
+ * "p2party/admission-grant-signature/v1" ||
269
+ * H(Canonical(AdmissionGrantV1 without authoritySignature))`
270
+ */
271
+ export declare const admissionGrantSignedMessage: (unsignedGrant: unknown) => Promise<Uint8Array>;
272
+ /**
273
+ * `AdmissionRevokeSignedMessage =
274
+ * "p2party/admission-revoke-signature/v1" ||
275
+ * H(Canonical(AdmissionRevokeV1 without authoritySignature))`
276
+ */
277
+ export declare const admissionRevokeSignedMessage: (unsignedRevoke: unknown) => Promise<Uint8Array>;
278
+ /**
279
+ * Decision-relevant authority state. The schema itself excludes the moving
280
+ * reference window, whole-Core/custody digests, and unrelated identities.
281
+ */
282
+ export declare const authorityAdmissionStateDigest: (input: unknown) => Promise<Uint8Array>;
283
+ export interface CarrierEnvelopeCoordinates {
284
+ readonly deliveryProfileHash: Uint8Array;
285
+ readonly carrierContextId: Uint8Array;
286
+ readonly ingressWindow: bigint;
287
+ readonly sizeClass: number;
288
+ }
289
+ /**
290
+ * `CarrierKey = HKDF-Expand(RoomRoot,
291
+ * "p2party/carrier-envelope-key/v1" || DeliveryProfileHash ||
292
+ * carrierContextId || U64BE(ingressWindow) || Byte(sizeClass) || nonce, 32)`
293
+ */
294
+ export declare const carrierKey: (roomRootBytes: Uint8Array, coordinates: CarrierEnvelopeCoordinates, nonce: Uint8Array) => Promise<Uint8Array>;
295
+ /**
296
+ * `CarrierAAD = "p2party/carrier-envelope-aad/v1" || Byte(version) ||
297
+ * DeliveryProfileHash || U64BE(ingressWindow) || Byte(sizeClass) ||
298
+ * carrierContextId`
299
+ *
300
+ * The AAD deliberately omits the nonce: the nonce is a key selector, and the
301
+ * key schedule already binds it.
302
+ */
303
+ export declare const carrierAad: (version: number, coordinates: CarrierEnvelopeCoordinates) => Uint8Array;
304
+ /**
305
+ * `CarrierObjectId = H("p2party/carrier-object/v1" || Canonical(CarrierEnvelopeV1))`
306
+ *
307
+ * Useful only inside one carrier context; clients deduplicate by the private
308
+ * `OperationId` after decryption.
309
+ */
310
+ export declare const carrierObjectId: (envelope: unknown) => Promise<Uint8Array>;
311
+ /**
312
+ * `operationsDigest =
313
+ * H("p2party/core-operation-set/v1" || Canonical(activeOperationIds))`
314
+ *
315
+ * The same formula serves the R2 conformance record's required-operation
316
+ * digest.
317
+ */
318
+ export declare const coreOperationSetDigest: (operationIds: readonly Uint8Array[]) => Promise<Uint8Array>;
319
+ /**
320
+ * `ObservedRosterHash =
321
+ * H("p2party/observed-roster/v1" ||
322
+ * U64BE(referenceWindow) ||
323
+ * Canonical(Sort(validActivePresenceOperationIds)))`
324
+ *
325
+ * `CoreRoomStateV1.observedPresences` already carries this set in canonical
326
+ * operation-ID order. Requiring that order here keeps the schema registry as
327
+ * the one sorted-set validator instead of silently inventing another sorter.
328
+ */
329
+ export declare const observedRosterHash: (referenceWindow: bigint, validActivePresenceOperationIds: readonly Uint8Array[]) => Promise<Uint8Array>;
330
+ export declare const executableKernelManifestHash: (manifest: unknown) => Promise<Uint8Array>;
331
+ /**
332
+ * `KernelModuleSemanticsHash(module) =
333
+ * H("p2party/executable-kernel-module-semantics/v1" || module.moduleId ||
334
+ * Canonical(sorted entrypoint tuples))`
335
+ *
336
+ * `moduleId` is a `Uint16` schema field, so it enters the preimage as `U16BE`.
337
+ */
338
+ export declare const kernelModuleSemanticsHash: (module: {
339
+ readonly moduleId: number;
340
+ readonly entrypoints: readonly unknown[];
341
+ }) => Promise<Uint8Array>;
342
+ /**
343
+ * `KernelSourceTreeHash(files) = H("p2party/executable-kernel-source-tree/v1"
344
+ * || Canonical(Sort(normalizedRelativePath, H(fileBytes))))`
345
+ *
346
+ * Absolute paths, timestamps, filesystem order, and build-host metadata are
347
+ * excluded by construction.
348
+ */
349
+ export declare const kernelSourceTreeHash: (files: readonly {
350
+ readonly normalizedRelativePath: string;
351
+ readonly fileDigest: Uint8Array;
352
+ }[]) => Promise<Uint8Array>;
353
+ export declare const claimRegistryHash: (registry: unknown) => Promise<Uint8Array>;
354
+ export declare const claimWordingCatalogHash: (catalog: unknown) => Promise<Uint8Array>;
355
+ export declare const formalObligationRegistryHash: (registry: unknown) => Promise<Uint8Array>;
356
+ /**
357
+ * `ClaimScopeDigest = H("p2party/claim-scope/v1" || U16BE(claimId) ||
358
+ * ClaimScopeKindByte(scopeKind) || scopeSchemaHash || canonicalScope)`
359
+ */
360
+ export declare const claimScopeDigest: (claimId: number, scopeKindByte: number, scopeSchemaHash: Uint8Array, canonicalScope: Uint8Array) => Promise<Uint8Array>;
361
+ export declare const claimEvaluationDatasetDigest: (dataset: unknown) => Promise<Uint8Array>;
362
+ /**
363
+ * `FormalAssumptionSetHash = H("p2party/formal-assumption-set/v1" ||
364
+ * claimRegistryHash || Canonical(resolved sorted ClaimAssumptionV1 records))`
365
+ */
366
+ export declare const formalAssumptionSetHash: (claimRegistryHashBytes: Uint8Array, resolvedAssumptions: readonly unknown[]) => Promise<Uint8Array>;
367
+ /**
368
+ * `FormalProofScopeDigest = H("p2party/formal-proof-scope/v1" ||
369
+ * U16BE(obligationId) || proofScopeSchemaHash || canonicalScope)`
370
+ */
371
+ export declare const formalProofScopeDigest: (obligationId: number, proofScopeSchemaHash: Uint8Array, canonicalScope: Uint8Array) => Promise<Uint8Array>;
372
+ /**
373
+ * `EmptySchedulerWorkloadDigest = H("p2party/scheduler-workload/v1/none")`
374
+ *
375
+ * Only FPO-002 accepts a nonempty scheduler workload; every other obligation
376
+ * uses this closed sentinel so an unrelated workload cannot alter another
377
+ * property's identity.
378
+ */
379
+ export declare const emptySchedulerWorkloadDigest: () => Promise<Uint8Array>;
380
+ export declare const claimEvaluationDigest: (evaluation: unknown) => Promise<Uint8Array>;
381
+ export declare const formalProofResultDigest: (result: unknown) => Promise<Uint8Array>;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * HELLO-responder admission preparation boundary.
3
+ *
4
+ * A service factory captures the initialized room and one storage port.
5
+ * Per-HELLO callers supply only a genuine one-use authenticated claim; they
6
+ * cannot assemble trusted rows, policy views, admission decisions, or lease
7
+ * coordinates. An allow remains an opaque pre-topology policy result with
8
+ * private HelloRoot custody. It is not a prepared persistence mutation or send
9
+ * authority: planner/replay/resource checks, exact response construction,
10
+ * compare-and-swap persistence, and publication remain later transitions.
11
+ *
12
+ * This source-internal module is intentionally absent from the package barrel.
13
+ */
14
+ import type { LibCrypto } from "../cryptography/libcrypto";
15
+ import type { AdmissionAllowReason } from "./admissionPolicy";
16
+ import type { IdentityHelloAdmissionClaimV1 } from "./identityHelloOpen";
17
+ import type { OperationValidationContext } from "./operation";
18
+ import type { RoomPolicyV4 } from "./roomPolicyV4";
19
+ import type { IdentityHelloAdmissionPersistencePortV1 } from "./identityHelloAdmissionPersistence";
20
+ declare const preparedIdentityHelloAdmissionBrand: unique symbol;
21
+ /**
22
+ * Opaque policy allow before topology, replay/fork, key, and resource checks.
23
+ * Its private state owns the claim and exact capture; spreading, persistence,
24
+ * or a type assertion cannot reproduce its process-local provenance.
25
+ */
26
+ export interface PreparedIdentityHelloAdmissionV1 {
27
+ readonly [preparedIdentityHelloAdmissionBrand]: true;
28
+ }
29
+ export interface InitializedRoomAdmissionFenceV1 {
30
+ readonly version: 1;
31
+ readonly roomContextId: Uint8Array;
32
+ readonly roomPolicy: RoomPolicyV4;
33
+ }
34
+ export interface LocalPresenceOwnershipV1 {
35
+ readonly version: 1;
36
+ readonly localPresenceOperationIds: readonly Uint8Array[];
37
+ readonly localStableIdentityKeys: readonly Uint8Array[];
38
+ }
39
+ export type AuthorityCustodyProjectionV1 = {
40
+ readonly version: 1;
41
+ readonly status: "complete";
42
+ readonly authorityCustodyStateDigest: Uint8Array;
43
+ readonly firstSaturatedRequiredWorkId: null;
44
+ } | {
45
+ readonly version: 1;
46
+ readonly status: "saturated";
47
+ readonly authorityCustodyStateDigest: Uint8Array;
48
+ readonly firstSaturatedRequiredWorkId: Uint8Array;
49
+ };
50
+ export type IdentityHelloAdmissionCapturePortV1 = Pick<IdentityHelloAdmissionPersistencePortV1, "readExactCapture">;
51
+ export type PrepareIdentityHelloAdmissionResultV1 = {
52
+ readonly kind: "prepared";
53
+ readonly value: PreparedIdentityHelloAdmissionV1;
54
+ } | {
55
+ readonly kind: "denied";
56
+ readonly reason: "blacklisted" | "not-in-address-book" | "missing-grant" | "invalid-grant" | "revoked" | "policy-unavailable";
57
+ } | {
58
+ readonly kind: "stale";
59
+ readonly reason: "initialized-room-changed" | "core-changed" | "historical-evidence-changed" | "receiver-key-changed" | "local-identity-key-changed" | "local-presence-ownership-changed";
60
+ };
61
+ export interface IdentityHelloAdmissionPreparationServiceV1 {
62
+ prepareIdentityHelloAdmission(claim: IdentityHelloAdmissionClaimV1): Promise<PrepareIdentityHelloAdmissionResultV1>;
63
+ }
64
+ export interface PreparedIdentityHelloAdmissionSnapshotV1 {
65
+ readonly version: 1;
66
+ readonly stage: "policy-allowed-pre-topology";
67
+ /** Cloneable diagnostic only; never accepted back as authority. */
68
+ readonly reason: AdmissionAllowReason;
69
+ }
70
+ export declare const encodeInitializedRoomAdmissionFenceV1: (initializedRoom: OperationValidationContext) => Uint8Array;
71
+ export declare const encodeLocalPresenceOwnershipV1: (value: LocalPresenceOwnershipV1) => Uint8Array;
72
+ export declare const encodeAuthorityCustodyProjectionV1: (value: AuthorityCustodyProjectionV1) => Uint8Array;
73
+ /**
74
+ * Capture one storage adapter and initialized-room provenance boundary.
75
+ *
76
+ * A test may supply an in-memory port; production must construct this service
77
+ * only inside the trusted room worker with its concrete transaction adapter.
78
+ * Per-attempt callers cannot replace the port, initialized room, or crypto
79
+ * module.
80
+ */
81
+ export declare const createIdentityHelloAdmissionPreparationServiceV1: (port: IdentityHelloAdmissionCapturePortV1, initializedRoom: OperationValidationContext, module?: LibCrypto) => IdentityHelloAdmissionPreparationServiceV1;
82
+ /**
83
+ * Non-secret diagnostic/test projection. It conveys no HelloRoot, response,
84
+ * outbox, CAS capability, or permission to publish.
85
+ */
86
+ export declare const snapshotPreparedIdentityHelloAdmissionV1: (value: PreparedIdentityHelloAdmissionV1) => PreparedIdentityHelloAdmissionSnapshotV1;
87
+ /** Wipe private HELLO-root custody. Idempotent for a genuine handle. */
88
+ export declare const destroyPreparedIdentityHelloAdmissionV1: (value: PreparedIdentityHelloAdmissionV1) => void;
89
+ export {};
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Exact persistence contract for HELLO-responder admission.
3
+ *
4
+ * This module is deliberately declarative. It defines the one atomic capture,
5
+ * fixed compare-and-swap fence order, and closed write masks that a concrete
6
+ * store adapter must implement. It does not expose an executable claim-to-CAS
7
+ * path: only the trusted admission/response orchestrator may eventually build
8
+ * a mutation from canonical rows and spend its opaque prepared handle.
9
+ *
10
+ * The adapter's read result is untrusted until
11
+ * `validateAndCopyIdentityHelloAdmissionExactCaptureRowsV1` accepts it. This
12
+ * source-internal module is absent from the package barrel.
13
+ */
14
+ /** Exact absence is a fence and is never represented by empty bytes. */
15
+ export type ExactIdentityHelloAdmissionRowV1 = {
16
+ readonly kind: "absent";
17
+ } | {
18
+ readonly kind: "present";
19
+ readonly exactBytes: Uint8Array;
20
+ };
21
+ /** Revisioned key custody uses a non-reused u64 revision to prevent ABA. */
22
+ export type ExactIdentityHelloAdmissionRevisionV1 = {
23
+ readonly kind: "absent";
24
+ } | {
25
+ readonly kind: "present";
26
+ readonly recordRevision: bigint;
27
+ };
28
+ /**
29
+ * Lookup coordinates derived only from a genuine authenticated HELLO claim.
30
+ * Applications and adapters may not select any of these values.
31
+ */
32
+ export interface IdentityHelloAdmissionReadLocatorV1 {
33
+ readonly version: 1;
34
+ readonly roomContextId: Uint8Array;
35
+ readonly helloOperationId: Uint8Array;
36
+ readonly pairEdgeId: Uint8Array;
37
+ readonly localPresenceOperationId: Uint8Array;
38
+ readonly exactHistoricalEvidenceCoreStateBytes: Uint8Array;
39
+ }
40
+ /**
41
+ * Complete read result from one atomic read-only transaction.
42
+ *
43
+ * `historicalEvidence` is the canonical pair-subject evidence bundle selected
44
+ * by the exact HELLO-time Core bytes: that exact Core row plus the remote and
45
+ * local endpoint PRESENCE operations and their required author prefixes.
46
+ */
47
+ export interface IdentityHelloAdmissionExactCaptureRowsV1 {
48
+ readonly initializedRoom: ExactIdentityHelloAdmissionRowV1;
49
+ readonly currentCore: ExactIdentityHelloAdmissionRowV1;
50
+ readonly historicalEvidence: ExactIdentityHelloAdmissionRowV1;
51
+ readonly receiverKey: ExactIdentityHelloAdmissionRevisionV1;
52
+ readonly localPresenceOwnership: ExactIdentityHelloAdmissionRowV1;
53
+ readonly frontendControls: ExactIdentityHelloAdmissionRowV1;
54
+ readonly authorityCustody: ExactIdentityHelloAdmissionRowV1;
55
+ readonly plannerAndExplicitState: ExactIdentityHelloAdmissionRowV1;
56
+ readonly localIdentityKey: ExactIdentityHelloAdmissionRevisionV1;
57
+ readonly localAuthorHead: ExactIdentityHelloAdmissionRowV1;
58
+ readonly pairLedger: ExactIdentityHelloAdmissionRowV1;
59
+ readonly provisionalPair: ExactIdentityHelloAdmissionRowV1;
60
+ readonly identityBootstrapOutbox: ExactIdentityHelloAdmissionRowV1;
61
+ readonly resourceState: ExactIdentityHelloAdmissionRowV1;
62
+ }
63
+ /** Normative first-conflict order for the admission transaction. */
64
+ export declare const IDENTITY_HELLO_ADMISSION_CAS_FENCE_ORDER_V1: readonly ["initialized-room", "current-core", "historical-evidence", "receiver-key", "local-presence-ownership", "frontend-controls", "authority-custody", "planner-and-explicit-state", "local-identity-key", "local-author-head", "pair-ledger", "provisional-pair", "identity-bootstrap-outbox", "resource-state"];
65
+ export type IdentityHelloAdmissionCasConflictFenceV1 = (typeof IDENTITY_HELLO_ADMISSION_CAS_FENCE_ORDER_V1)[number];
66
+ /**
67
+ * Closed effects for the four legal persistence transitions.
68
+ *
69
+ * Every effect carries one complete next-state projection instead of a
70
+ * per-variant partial write mask. This is deliberately repetitive at runtime
71
+ * but singular in the type system: an added mutable row cannot be forgotten
72
+ * by fork cancellation, denial, or replay reauthorization.
73
+ *
74
+ * These are an adapter contract, not caller input. The trusted transition
75
+ * must construct every row from canonical codecs. `accept-new` additionally
76
+ * proves that one ACCEPT operation ID binds the author head, pair ledger,
77
+ * provisional pair, outbox, and resource reservation.
78
+ */
79
+ export interface PreparedIdentityHelloAdmissionMutationV1 {
80
+ readonly kind: "accept-new" | "record-denial" | "requeue-replay" | "record-fork";
81
+ readonly nextRows: IdentityHelloAdmissionCommittedRowsV1;
82
+ }
83
+ export interface IdentityHelloAdmissionCasRequestV1 {
84
+ readonly locator: IdentityHelloAdmissionReadLocatorV1;
85
+ readonly expected: IdentityHelloAdmissionExactCaptureRowsV1;
86
+ readonly mutation: PreparedIdentityHelloAdmissionMutationV1;
87
+ }
88
+ /** Complete mutable-row echo after a successful durable commit. */
89
+ export interface IdentityHelloAdmissionCommittedRowsV1 {
90
+ readonly plannerAndExplicitState: ExactIdentityHelloAdmissionRowV1;
91
+ readonly localAuthorHead: ExactIdentityHelloAdmissionRowV1;
92
+ readonly pairLedger: ExactIdentityHelloAdmissionRowV1;
93
+ readonly provisionalPair: ExactIdentityHelloAdmissionRowV1;
94
+ readonly identityBootstrapOutbox: ExactIdentityHelloAdmissionRowV1;
95
+ readonly resourceState: ExactIdentityHelloAdmissionRowV1;
96
+ }
97
+ export type IdentityHelloAdmissionPortCasResultV1 = {
98
+ readonly status: "committed";
99
+ readonly committedRows: IdentityHelloAdmissionCommittedRowsV1;
100
+ } | {
101
+ readonly status: "conflict";
102
+ readonly fence: IdentityHelloAdmissionCasConflictFenceV1;
103
+ };
104
+ /**
105
+ * Minimal byte-store port.
106
+ *
107
+ * `readExactCapture` performs one read-only transaction over every named row,
108
+ * owns all returned bytes, and resolves only from `transaction.oncomplete`.
109
+ *
110
+ * `compareAndSwap` performs one read-write transaction, compares exact bytes,
111
+ * exact absence, and non-reused revisions in the normative order, applies the
112
+ * closed mutation only if every fence matches, and resolves only from
113
+ * `transaction.oncomplete`. It performs no crypto and awaits no promise while
114
+ * the IndexedDB transaction is live.
115
+ */
116
+ export interface IdentityHelloAdmissionPersistencePortV1 {
117
+ readExactCapture(locator: IdentityHelloAdmissionReadLocatorV1): Promise<IdentityHelloAdmissionExactCaptureRowsV1>;
118
+ compareAndSwap(request: IdentityHelloAdmissionCasRequestV1): Promise<IdentityHelloAdmissionPortCasResultV1>;
119
+ }
120
+ export declare class IdentityHelloAdmissionPersistenceError extends Error {
121
+ readonly name = "IdentityHelloAdmissionPersistenceError";
122
+ constructor(message: string);
123
+ }
124
+ /**
125
+ * Deeply own and structurally validate one complete adapter capture.
126
+ *
127
+ * This is only the byte/absence/revision boundary. The trusted admission
128
+ * orchestrator must canonical-decode and correlate every required row before
129
+ * it can mint any subsequent opaque capability.
130
+ *
131
+ * @internal
132
+ */
133
+ export declare const validateAndCopyIdentityHelloAdmissionExactCaptureRowsV1: (value: unknown) => IdentityHelloAdmissionExactCaptureRowsV1;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Canonical retained evidence for one authenticated IDENTITY_HELLO.
3
+ *
4
+ * The bundle is intentionally pair-subject scoped: it binds the exact
5
+ * historical Core selector and the remote/local endpoint PRESENCE operations,
6
+ * including the complete author prefixes that made those operations eligible.
7
+ * It is not a claim that every unrelated roster fact is duplicated here.
8
+ */
9
+ import type { PairAuthorChainPrefixEvidenceV1 } from "./coreReduce";
10
+ import type { RoomPolicyV4 } from "./roomPolicyV4";
11
+ export interface IdentityHelloHistoricalPresenceEvidenceV1 {
12
+ readonly exactPresenceOperationBytes: Uint8Array;
13
+ readonly presenceOperationId: Uint8Array;
14
+ readonly retainThroughLogicalWindow: bigint;
15
+ readonly authorChainPrefix: readonly PairAuthorChainPrefixEvidenceV1[];
16
+ }
17
+ export interface IdentityHelloHistoricalEvidenceBundleV1 {
18
+ readonly version: 1;
19
+ readonly exactCoreStateBytes: Uint8Array;
20
+ /** Remote HELLO author first, local responder second. */
21
+ readonly endpointPresenceEvidence: readonly [
22
+ IdentityHelloHistoricalPresenceEvidenceV1,
23
+ IdentityHelloHistoricalPresenceEvidenceV1
24
+ ];
25
+ }
26
+ export interface ExpectedIdentityHelloHistoricalEvidenceV1 {
27
+ readonly roomContextId: Uint8Array;
28
+ readonly roomPolicy: RoomPolicyV4;
29
+ readonly exactCoreStateBytes: Uint8Array;
30
+ readonly endpointPresenceOperationIds: readonly [Uint8Array, Uint8Array];
31
+ }
32
+ export declare class IdentityHelloHistoricalEvidenceError extends Error {
33
+ readonly name = "IdentityHelloHistoricalEvidenceError";
34
+ constructor(message: string);
35
+ }
36
+ /**
37
+ * Encode and deeply own a bundle assembled from genuine CoreReduce evidence.
38
+ *
39
+ * Cryptographic operation IDs and author-chain continuity are rechecked by
40
+ * `decodeAndVerifyIdentityHelloHistoricalEvidenceBundleV1` at the durable
41
+ * admission boundary.
42
+ */
43
+ export declare const encodeIdentityHelloHistoricalEvidenceBundleV1: (value: IdentityHelloHistoricalEvidenceBundleV1) => Uint8Array;
44
+ /**
45
+ * Canonical-decode and revalidate the complete persisted pair-subject bundle.
46
+ *
47
+ * Exact comparison with the authenticated claim remains mandatory before this
48
+ * call. This verifier then independently checks the selector, endpoint order,
49
+ * operation IDs, contiguous author prefixes, room binding, PRESENCE kind, and
50
+ * exact protocol-derived retention horizons.
51
+ */
52
+ export declare const decodeAndVerifyIdentityHelloHistoricalEvidenceBundleV1: (exactBytes: Uint8Array, expected: ExpectedIdentityHelloHistoricalEvidenceV1) => Promise<IdentityHelloHistoricalEvidenceBundleV1>;