wire-mesh-core 1.46.0 → 1.48.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 (91) hide show
  1. package/dist/adapters/frame-codec.d.cts +1 -1
  2. package/dist/adapters/frame-codec.d.mts +1 -1
  3. package/dist/adapters/node-fs-storage.cjs +3 -24
  4. package/dist/adapters/node-identity.d.cts +2 -2
  5. package/dist/adapters/node-identity.d.mts +2 -2
  6. package/dist/adapters/tcp-transport.d.cts +1 -1
  7. package/dist/adapters/tcp-transport.d.mts +1 -1
  8. package/dist/adapters/threshold-identity.cjs +42 -0
  9. package/dist/adapters/threshold-identity.d.cts +33 -0
  10. package/dist/adapters/threshold-identity.d.mts +33 -0
  11. package/dist/adapters/threshold-identity.mjs +41 -0
  12. package/dist/adapters/threshold-wasm.cjs +197 -0
  13. package/dist/adapters/threshold-wasm.d.cts +89 -0
  14. package/dist/adapters/threshold-wasm.d.mts +89 -0
  15. package/dist/adapters/threshold-wasm.mjs +174 -0
  16. package/dist/adapters/tls-transport.d.cts +1 -1
  17. package/dist/adapters/tls-transport.d.mts +1 -1
  18. package/dist/domain/bulk.d.cts +2 -2
  19. package/dist/domain/bulk.d.mts +2 -2
  20. package/dist/domain/capability-grant.cjs +1 -1
  21. package/dist/domain/capability-grant.d.cts +3 -3
  22. package/dist/domain/capability-grant.d.mts +3 -3
  23. package/dist/domain/capability-grant.mjs +1 -1
  24. package/dist/domain/capability-request.cjs +1 -1
  25. package/dist/domain/capability-request.d.cts +2 -2
  26. package/dist/domain/capability-request.d.mts +2 -2
  27. package/dist/domain/capability-request.mjs +1 -1
  28. package/dist/domain/data-sync.d.cts +2 -2
  29. package/dist/domain/data-sync.d.mts +2 -2
  30. package/dist/domain/device-id.d.cts +1 -1
  31. package/dist/domain/device-id.d.mts +1 -1
  32. package/dist/domain/grant-candidates.d.cts +1 -1
  33. package/dist/domain/grant-candidates.d.mts +1 -1
  34. package/dist/domain/handshake.d.cts +1 -1
  35. package/dist/domain/handshake.d.mts +1 -1
  36. package/dist/domain/mesh-session.d.cts +3 -3
  37. package/dist/domain/mesh-session.d.mts +3 -3
  38. package/dist/domain/notice-board.d.cts +3 -3
  39. package/dist/domain/notice-board.d.mts +3 -3
  40. package/dist/domain/relay-hub.d.cts +2 -2
  41. package/dist/domain/relay-hub.d.mts +2 -2
  42. package/dist/domain/relay-use-gate.d.cts +2 -2
  43. package/dist/domain/relay-use-gate.d.mts +2 -2
  44. package/dist/domain/revocation-view.cjs +1 -1
  45. package/dist/domain/revocation-view.d.cts +2 -2
  46. package/dist/domain/revocation-view.d.mts +2 -2
  47. package/dist/domain/revocation-view.mjs +1 -1
  48. package/dist/domain/room-rekey.d.cts +3 -3
  49. package/dist/domain/room-rekey.d.mts +3 -3
  50. package/dist/domain/room-token-verification.cjs +1 -1
  51. package/dist/domain/room-token-verification.d.cts +1 -1
  52. package/dist/domain/room-token-verification.d.mts +1 -1
  53. package/dist/domain/room-token-verification.mjs +1 -1
  54. package/dist/domain/room.d.cts +4 -4
  55. package/dist/domain/room.d.mts +4 -4
  56. package/dist/domain/shard-manifest.d.cts +1 -1
  57. package/dist/domain/shard-manifest.d.mts +1 -1
  58. package/dist/domain/threshold-subject.cjs +35 -0
  59. package/dist/domain/threshold-subject.d.cts +33 -0
  60. package/dist/domain/threshold-subject.d.mts +33 -0
  61. package/dist/domain/threshold-subject.mjs +32 -0
  62. package/dist/domain/tokens.cjs +2 -1
  63. package/dist/domain/tokens.d.cts +2 -2
  64. package/dist/domain/tokens.d.mts +2 -2
  65. package/dist/domain/tokens.mjs +2 -2
  66. package/dist/domain/webrtc-signaling.cjs +1 -1
  67. package/dist/domain/webrtc-signaling.d.cts +2 -2
  68. package/dist/domain/webrtc-signaling.d.mts +2 -2
  69. package/dist/domain/webrtc-signaling.mjs +1 -1
  70. package/dist/generated/protocol.cjs +83 -0
  71. package/dist/generated/protocol.d.cts +2 -2
  72. package/dist/generated/protocol.d.mts +2 -2
  73. package/dist/generated/protocol.mjs +73 -1
  74. package/dist/{identity-DHf0J6IA.d.cts → identity-9TmmK7vP.d.mts} +1 -1
  75. package/dist/{identity-Oelt3uEn.d.mts → identity-CUkDHCRK.d.cts} +1 -1
  76. package/dist/ports/identity.d.cts +1 -1
  77. package/dist/ports/identity.d.mts +1 -1
  78. package/dist/ports/transport.d.cts +1 -1
  79. package/dist/ports/transport.d.mts +1 -1
  80. package/dist/{protocol-D8CU6s2_.d.cts → protocol-CNFRVx9w.d.cts} +277 -1
  81. package/dist/{protocol-D8CU6s2_.d.mts → protocol-CNFRVx9w.d.mts} +277 -1
  82. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  83. package/dist/{room-token-verification-BQhqt1Rm.d.mts → room-token-verification-BdtM1rQ4.d.mts} +2 -2
  84. package/dist/{room-token-verification-DQGdYNg4.d.cts → room-token-verification-DpOfZOdl.d.cts} +2 -2
  85. package/dist/{tokens-CdQwzCyJ.mjs → tokens-B0dpTLhS.mjs} +2 -2
  86. package/dist/{tokens-Bh82oidM.d.mts → tokens-CVyPoJ6l.d.mts} +5 -3
  87. package/dist/{tokens-B1-MAIST.d.cts → tokens-Cl8sQo7o.d.cts} +5 -3
  88. package/dist/{tokens-DxGVURpB.cjs → tokens-Dh6mG6p_.cjs} +7 -1
  89. package/dist/{transport-BNeF6kDe.d.mts → transport-C7KVkhgb.d.mts} +1 -1
  90. package/dist/{transport-BbSGNRFZ.d.cts → transport-De0zHlaA.d.cts} +1 -1
  91. package/package.json +15 -2
@@ -0,0 +1,89 @@
1
+ import { D as DeviceId } from "../protocol-CNFRVx9w.mjs";
2
+ //#region src/adapters/threshold-wasm.d.ts
3
+ /** One `(deviceId, bytes)` pair -- the wasm boundary's own encoding of a map keyed by participant, since wasm-bindgen has no built-in `Map<Uint8Array, Uint8Array>` marshalling. */
4
+ export interface DeviceKeyed<T extends Uint8Array = Uint8Array<ArrayBuffer>> {
5
+ deviceId: DeviceId;
6
+ value: T;
7
+ }
8
+ export interface DkgRound1Result {
9
+ secretPackage: Uint8Array<ArrayBuffer>;
10
+ package: Uint8Array<ArrayBuffer>;
11
+ }
12
+ /** Round 1: samples this participant's own polynomial and commits to it. See `wire_mesh_threshold::dkg::round1`'s own doc comment for the full design. */
13
+ export declare function dkgRound1(ownDeviceId: DeviceId, maxSigners: number, minSigners: number): DkgRound1Result;
14
+ export interface SplitRound1PackageResult {
15
+ commitment: Uint8Array<ArrayBuffer>[];
16
+ proofOfKnowledge: Uint8Array<ArrayBuffer>;
17
+ }
18
+ /** Splits a serialized DKG round-1 package (dkgRound1's own `package` output) into `threshold-keygen-round1`'s own wire shape: the Feldman commitment as an array of independently-serialized coefficients (`commitment: [* bstr]`) and the Schnorr proof of knowledge as a separate byte string -- unlike frost-core's own combined-blob serialization. The inverse of combineRound1Package. */
19
+ export declare function splitRound1Package(serializedPackage: Uint8Array): SplitRound1PackageResult;
20
+ /** Reconstructs a serialized DKG round-1 package (the same combined-blob shape dkgRound2/dkgRound3/dkgTranscriptDigest expect) from the two independently-serialized wire fields `threshold-keygen-round1` carries. The inverse of splitRound1Package. */
21
+ export declare function combineRound1Package(commitment: readonly Uint8Array[], proofOfKnowledge: Uint8Array): Uint8Array<ArrayBuffer>;
22
+ export interface DkgRound2Result {
23
+ secretPackage: Uint8Array<ArrayBuffer>;
24
+ outgoing: DeviceKeyed[];
25
+ }
26
+ /** Round 2: verifies every other participant's round-1 proof of knowledge and computes this participant's own pairwise sub-shares. `round1` MUST NOT include this participant's own package. */
27
+ export declare function dkgRound2(ownSecretPackage: Uint8Array, round1: readonly DeviceKeyed[]): DkgRound2Result;
28
+ export interface DkgRound3Result {
29
+ keyPackage: Uint8Array<ArrayBuffer>;
30
+ publicKeyPackage: Uint8Array<ArrayBuffer>;
31
+ groupVerifyingKey: Uint8Array<ArrayBuffer>;
32
+ }
33
+ /** Round 3 (local, no wire traffic): verifies every received round-2 package and sums them into this participant's own long-term key package. `round1`/`round2` MUST NOT include this participant's own packages. */
34
+ export declare function dkgRound3(ownSecretPackage: Uint8Array, round1: readonly DeviceKeyed[], round2: readonly DeviceKeyed[]): DkgRound3Result;
35
+ /** The echo-broadcast transcript digest this participant sends on `threshold-keygen-confirm` -- SHA-256 over the FULL ordered set of every round-1 package (including this participant's own), so two honest participants' digests are directly comparable. */
36
+ export declare function dkgTranscriptDigest(allRound1: readonly DeviceKeyed[], groupVerifyingKey: Uint8Array): Uint8Array<ArrayBuffer>;
37
+ /** Verifies this participant's own transcript digest/group key against what a peer reported. A mismatch means the ceremony MUST abort, never be repaired in place. */
38
+ export declare function dkgConfirmMatches(ownDigest: Uint8Array, ownGroupKey: Uint8Array, peerDigest: Uint8Array, peerGroupKey: Uint8Array): boolean;
39
+ /** Extracts a key package's own signing-share bytes -- what `reshareRound1` needs as `ownOldSigningShare`. */
40
+ export declare function keyPackageSigningShare(keyPackage: Uint8Array): Uint8Array<ArrayBuffer>;
41
+ export interface SigningRound1Result {
42
+ nonces: Uint8Array<ArrayBuffer>;
43
+ commitments: Uint8Array<ArrayBuffer>;
44
+ }
45
+ /**
46
+ * The pure-crypto half of round 1: generates a fresh nonce pair and its commitments. Persisting `nonces` durably before this participant's own round-1 response leaves the device is the CALLER's own obligation -- nonce reuse across two released signature shares discloses this participant's long-term key share outright. This function has no storage dependency and cannot enforce that obligation itself.
47
+ */
48
+ export declare function signingRound1Commit(ownKeyPackage: Uint8Array): SigningRound1Result;
49
+ export interface SplitCommitmentsResult {
50
+ hiding: Uint8Array<ArrayBuffer>;
51
+ binding: Uint8Array<ArrayBuffer>;
52
+ }
53
+ /** Splits a serialized SigningCommitments blob (signingRound1Commit's own `commitments` output) into the two independently-serialized halves `threshold-commitment`'s wire shape carries (`hiding: bstr, binding: bstr`) -- unlike frost-core's own combined-blob serialization, which is opaque and not spec-shaped. The inverse of combineCommitments. */
54
+ export declare function splitCommitments(commitments: Uint8Array): SplitCommitmentsResult;
55
+ /** Reconstructs a serialized SigningCommitments blob (the same combined-blob shape signingBuildPackage/signingRound2Sign expect) from the two independently-serialized halves `threshold-commitment` carries on the wire. The inverse of splitCommitments. */
56
+ export declare function combineCommitments(hiding: Uint8Array, binding: Uint8Array): Uint8Array<ArrayBuffer>;
57
+ /** Coordinator-side: builds the signing-package bytes every participant's round 2 is computed against. */
58
+ export declare function signingBuildPackage(commitments: readonly DeviceKeyed[], message: Uint8Array): Uint8Array<ArrayBuffer>;
59
+ /** Round 2: releases this participant's signature share. The CALLER MUST have already taken (one-shot) `nonces` from its own durable nonce store before calling this. */
60
+ export declare function signingRound2Sign(nonces: Uint8Array, signingPackage: Uint8Array, ownKeyPackage: Uint8Array): Uint8Array<ArrayBuffer>;
61
+ /**
62
+ * Coordinator-side: sums and verifies the collected shares into the final aggregate signature -- an ordinary 64-byte Ed25519 signature. Throws if verification fails (a malformed or forged share); a caller MUST treat any thrown error here as "publish nothing".
63
+ */
64
+ export declare function signingAggregate(signingPackage: Uint8Array, shares: readonly DeviceKeyed[], publicKeyPackage: Uint8Array): Uint8Array<ArrayBuffer>;
65
+ export interface ReshareRound1Result {
66
+ commitment: Uint8Array<ArrayBuffer>;
67
+ outgoing: DeviceKeyed[];
68
+ }
69
+ /**
70
+ * Survivor side: re-shares this device's own Lagrange-weighted sub-share of the group secret across a new (possibly different) participant set. See `wire_mesh_threshold::reshare`'s own module doc comment (Rust side) for the full design rationale -- deliberately not built on a zero-secret "refresh" delta, which cannot onboard a device with no prior share or safely change the threshold.
71
+ */
72
+ export declare function reshareRound1(ownDeviceId: DeviceId, ownOldSigningShare: Uint8Array, survivorDeviceIds: readonly DeviceId[], newParticipantDeviceIds: readonly DeviceId[], newMinSigners: number): ReshareRound1Result;
73
+ /** Splits a survivor's serialized broadcast commitment (reshareRound1's own `commitment` output) into `threshold-keygen-round1`'s own wire shape: an array of independently-serialized coefficients (`commitment: [* bstr]`) -- unlike reshareRound1's own whole-blob serialization. The inverse of reshareCombineCommitmentParts. */
74
+ export declare function reshareSplitCommitment(commitment: Uint8Array): Uint8Array<ArrayBuffer>[];
75
+ /** Reconstructs a survivor's serialized broadcast commitment (the same whole-blob shape reshareCombineCommitments expects each entry of its own commitments array to be) from the wire's own per-coefficient array. The inverse of reshareSplitCommitment. */
76
+ export declare function reshareCombineCommitmentParts(parts: readonly Uint8Array[]): Uint8Array<ArrayBuffer>;
77
+ /** Sums T survivors' broadcast commitment vectors into the one combined VSS commitment `reshareDerivePublicKeyPackage` needs. */
78
+ export declare function reshareCombineCommitments(commitments: readonly Uint8Array[]): Uint8Array<ArrayBuffer>;
79
+ /** The echo-broadcast transcript digest a member of the new participant set sends on threshold-keygen-confirm for a reshare -- the reshare analogue of dkgTranscriptDigest, structurally distinct because a reshare's own survivor commitment carries no proof-of-knowledge component: deserializing one as a DKG round-1 package fails outright, since the two are different wire shapes entirely. `survivorCommitments` entries are each the same whole-blob shape reshareRound1's own `commitment` output is (NOT the wire's own split [* bstr] parts -- combine those first via reshareCombineCommitmentParts if collected off the wire). */
80
+ export declare function reshareTranscriptDigest(survivorCommitments: readonly DeviceKeyed[], groupVerifyingKey: Uint8Array): Uint8Array<ArrayBuffer>;
81
+ export interface ReshareDerivePublicKeyPackageResult {
82
+ publicKeyPackage: Uint8Array<ArrayBuffer>;
83
+ groupVerifyingKey: Uint8Array<ArrayBuffer>;
84
+ }
85
+ /** The group's derived public key package given the combined commitment and the new participant set. `groupVerifyingKey` is what `threshold-keygen-confirm`'s own `group-key` field carries and what a reshare's own verifier obligation checks against `existing-group-key` (MUST equal it -- a reshare that changes the group key is a takeover, not a reshare). */
86
+ export declare function reshareDerivePublicKeyPackage(combinedCommitment: Uint8Array, newParticipantDeviceIds: readonly DeviceId[]): ReshareDerivePublicKeyPackageResult;
87
+ /** New-participant side (local): verifies each received share against its own embedded commitment, sums the validated shares, and builds this participant's final key package. */
88
+ export declare function reshareCombineReceivedShares(ownDeviceId: DeviceId, received: readonly Uint8Array[], publicKeyPackage: Uint8Array, newMinSigners: number): Uint8Array<ArrayBuffer>;
89
+ //#endregion
@@ -0,0 +1,174 @@
1
+ import { deviceIdSchema } from "../generated/protocol.mjs";
2
+ import * as wasm from "../../wasm-dist/wire_mesh_threshold_wasm.js";
3
+ //#region src/adapters/threshold-wasm.ts
4
+ /**
5
+ * A typed TS wrapper over the WASM build of `wire-mesh-threshold` (the audited `frost-core`/`frost-ed25519` crates, ZcashFoundation, NCC-audited) -- wire-mesh#29's own chosen route for a TS FROST(Ed25519, SHA-512) participant, over a from-scratch reimplementation of the cryptography.
6
+ *
7
+ * Built by `scripts/build-threshold-wasm.sh` into `wasm-dist/` (gitignored, a genuine compiled build artifact like `dist/`, never committed) -- run it before importing this module, in dev and in CI alike. This module performs NO domain logic of its own, only re-typing the raw wasm bindings' `Uint8Array`/`Array<any>` surface against this package's own `DeviceId` type and Node-capable-device-only availability: FROST participation cannot use Web Crypto at all (raw scalar/point arithmetic is deliberately outside what Web Crypto exposes), so unlike `node-identity.ts`'s counterpart in `web-crypto-identity.ts`, this adapter has no browser-side equivalent in v1 -- per wire-mesh#29's own resolved design, a browser is a threshold-group BEARER only, never a SHAREHOLDER, in v1.
8
+ */
9
+ function isUint8Array(value) {
10
+ return value instanceof Uint8Array;
11
+ }
12
+ /** Copies into a fresh, whole-buffer `Uint8Array<ArrayBuffer>` -- the wasm-bindgen-generated `.d.ts` declares its `Uint8Array` returns unparameterized (`Uint8Array<ArrayBufferLike>`), which callers such as `verifyWithPublicKey` (`node-identity.ts`) reject; this is the same normalisation that adapter's own `toBufferSource` already applies at its boundary. */
13
+ function toBufferSource(bytes) {
14
+ return Uint8Array.from(bytes);
15
+ }
16
+ function toParallelArrays(entries) {
17
+ return [entries.map((e) => e.deviceId), entries.map((e) => e.value)];
18
+ }
19
+ function fromParallelArrays(ids, values) {
20
+ if (ids.length !== values.length) throw new Error(`wasm returned mismatched parallel arrays: ${String(ids.length)} ids, ${String(values.length)} values`);
21
+ const result = [];
22
+ for (let i = 0; i < ids.length; i += 1) {
23
+ const id = ids[i];
24
+ const value = values[i];
25
+ if (!isUint8Array(value)) throw new Error("wasm returned a non-Uint8Array value in a parallel array");
26
+ result.push({
27
+ deviceId: deviceIdSchema.parse(id),
28
+ value: toBufferSource(value)
29
+ });
30
+ }
31
+ return result;
32
+ }
33
+ /** Round 1: samples this participant's own polynomial and commits to it. See `wire_mesh_threshold::dkg::round1`'s own doc comment for the full design. */
34
+ function dkgRound1(ownDeviceId, maxSigners, minSigners) {
35
+ const out = wasm.dkg_round1(ownDeviceId, maxSigners, minSigners);
36
+ return {
37
+ secretPackage: toBufferSource(out.secretPackage),
38
+ package: toBufferSource(out.package)
39
+ };
40
+ }
41
+ /** Splits a serialized DKG round-1 package (dkgRound1's own `package` output) into `threshold-keygen-round1`'s own wire shape: the Feldman commitment as an array of independently-serialized coefficients (`commitment: [* bstr]`) and the Schnorr proof of knowledge as a separate byte string -- unlike frost-core's own combined-blob serialization. The inverse of combineRound1Package. */
42
+ function splitRound1Package(serializedPackage) {
43
+ const out = wasm.split_round1_package(serializedPackage);
44
+ const commitment = [];
45
+ for (const coefficient of out.commitment) {
46
+ if (!isUint8Array(coefficient)) throw new Error("wasm returned a non-Uint8Array entry in split_round1_package's own commitment array");
47
+ commitment.push(toBufferSource(coefficient));
48
+ }
49
+ return {
50
+ commitment,
51
+ proofOfKnowledge: toBufferSource(out.proofOfKnowledge)
52
+ };
53
+ }
54
+ /** Reconstructs a serialized DKG round-1 package (the same combined-blob shape dkgRound2/dkgRound3/dkgTranscriptDigest expect) from the two independently-serialized wire fields `threshold-keygen-round1` carries. The inverse of splitRound1Package. */
55
+ function combineRound1Package(commitment, proofOfKnowledge) {
56
+ return toBufferSource(wasm.combine_round1_package([...commitment], proofOfKnowledge));
57
+ }
58
+ /** Round 2: verifies every other participant's round-1 proof of knowledge and computes this participant's own pairwise sub-shares. `round1` MUST NOT include this participant's own package. */
59
+ function dkgRound2(ownSecretPackage, round1) {
60
+ const [ids, packages] = toParallelArrays(round1);
61
+ const out = wasm.dkg_round2(ownSecretPackage, ids, packages);
62
+ return {
63
+ secretPackage: toBufferSource(out.secretPackage),
64
+ outgoing: fromParallelArrays(out.recipientIds, out.packages)
65
+ };
66
+ }
67
+ /** Round 3 (local, no wire traffic): verifies every received round-2 package and sums them into this participant's own long-term key package. `round1`/`round2` MUST NOT include this participant's own packages. */
68
+ function dkgRound3(ownSecretPackage, round1, round2) {
69
+ const [ids1, packages1] = toParallelArrays(round1);
70
+ const [ids2, packages2] = toParallelArrays(round2);
71
+ const out = wasm.dkg_round3(ownSecretPackage, ids1, packages1, ids2, packages2);
72
+ return {
73
+ keyPackage: toBufferSource(out.keyPackage),
74
+ publicKeyPackage: toBufferSource(out.publicKeyPackage),
75
+ groupVerifyingKey: toBufferSource(out.groupVerifyingKey)
76
+ };
77
+ }
78
+ /** The echo-broadcast transcript digest this participant sends on `threshold-keygen-confirm` -- SHA-256 over the FULL ordered set of every round-1 package (including this participant's own), so two honest participants' digests are directly comparable. */
79
+ function dkgTranscriptDigest(allRound1, groupVerifyingKey) {
80
+ const [ids, packages] = toParallelArrays(allRound1);
81
+ return toBufferSource(wasm.dkg_transcript_digest(ids, packages, groupVerifyingKey));
82
+ }
83
+ /** Verifies this participant's own transcript digest/group key against what a peer reported. A mismatch means the ceremony MUST abort, never be repaired in place. */
84
+ function dkgConfirmMatches(ownDigest, ownGroupKey, peerDigest, peerGroupKey) {
85
+ return wasm.dkg_confirm_matches(ownDigest, ownGroupKey, peerDigest, peerGroupKey);
86
+ }
87
+ /** Extracts a key package's own signing-share bytes -- what `reshareRound1` needs as `ownOldSigningShare`. */
88
+ function keyPackageSigningShare(keyPackage) {
89
+ return toBufferSource(wasm.key_package_signing_share(keyPackage));
90
+ }
91
+ /**
92
+ * The pure-crypto half of round 1: generates a fresh nonce pair and its commitments. Persisting `nonces` durably before this participant's own round-1 response leaves the device is the CALLER's own obligation -- nonce reuse across two released signature shares discloses this participant's long-term key share outright. This function has no storage dependency and cannot enforce that obligation itself.
93
+ */
94
+ function signingRound1Commit(ownKeyPackage) {
95
+ const out = wasm.signing_round1_commit(ownKeyPackage);
96
+ return {
97
+ nonces: toBufferSource(out.nonces),
98
+ commitments: toBufferSource(out.commitments)
99
+ };
100
+ }
101
+ /** Splits a serialized SigningCommitments blob (signingRound1Commit's own `commitments` output) into the two independently-serialized halves `threshold-commitment`'s wire shape carries (`hiding: bstr, binding: bstr`) -- unlike frost-core's own combined-blob serialization, which is opaque and not spec-shaped. The inverse of combineCommitments. */
102
+ function splitCommitments(commitments) {
103
+ const out = wasm.split_commitments(commitments);
104
+ return {
105
+ hiding: toBufferSource(out.hiding),
106
+ binding: toBufferSource(out.binding)
107
+ };
108
+ }
109
+ /** Reconstructs a serialized SigningCommitments blob (the same combined-blob shape signingBuildPackage/signingRound2Sign expect) from the two independently-serialized halves `threshold-commitment` carries on the wire. The inverse of splitCommitments. */
110
+ function combineCommitments(hiding, binding) {
111
+ return toBufferSource(wasm.combine_commitments(hiding, binding));
112
+ }
113
+ /** Coordinator-side: builds the signing-package bytes every participant's round 2 is computed against. */
114
+ function signingBuildPackage(commitments, message) {
115
+ const [ids, values] = toParallelArrays(commitments);
116
+ return toBufferSource(wasm.signing_build_package(ids, values, message));
117
+ }
118
+ /** Round 2: releases this participant's signature share. The CALLER MUST have already taken (one-shot) `nonces` from its own durable nonce store before calling this. */
119
+ function signingRound2Sign(nonces, signingPackage, ownKeyPackage) {
120
+ return toBufferSource(wasm.signing_round2_sign(nonces, signingPackage, ownKeyPackage));
121
+ }
122
+ /**
123
+ * Coordinator-side: sums and verifies the collected shares into the final aggregate signature -- an ordinary 64-byte Ed25519 signature. Throws if verification fails (a malformed or forged share); a caller MUST treat any thrown error here as "publish nothing".
124
+ */
125
+ function signingAggregate(signingPackage, shares, publicKeyPackage) {
126
+ const [ids, values] = toParallelArrays(shares);
127
+ return toBufferSource(wasm.signing_aggregate(signingPackage, ids, values, publicKeyPackage));
128
+ }
129
+ /**
130
+ * Survivor side: re-shares this device's own Lagrange-weighted sub-share of the group secret across a new (possibly different) participant set. See `wire_mesh_threshold::reshare`'s own module doc comment (Rust side) for the full design rationale -- deliberately not built on a zero-secret "refresh" delta, which cannot onboard a device with no prior share or safely change the threshold.
131
+ */
132
+ function reshareRound1(ownDeviceId, ownOldSigningShare, survivorDeviceIds, newParticipantDeviceIds, newMinSigners) {
133
+ const out = wasm.reshare_round1(ownDeviceId, ownOldSigningShare, [...survivorDeviceIds], [...newParticipantDeviceIds], newMinSigners);
134
+ return {
135
+ commitment: toBufferSource(out.commitment),
136
+ outgoing: fromParallelArrays(out.recipientIds, out.shares)
137
+ };
138
+ }
139
+ /** Splits a survivor's serialized broadcast commitment (reshareRound1's own `commitment` output) into `threshold-keygen-round1`'s own wire shape: an array of independently-serialized coefficients (`commitment: [* bstr]`) -- unlike reshareRound1's own whole-blob serialization. The inverse of reshareCombineCommitmentParts. */
140
+ function reshareSplitCommitment(commitment) {
141
+ const out = [];
142
+ for (const part of wasm.reshare_split_commitment(commitment)) {
143
+ if (!isUint8Array(part)) throw new Error("wasm returned a non-Uint8Array entry in reshare_split_commitment's own output array");
144
+ out.push(toBufferSource(part));
145
+ }
146
+ return out;
147
+ }
148
+ /** Reconstructs a survivor's serialized broadcast commitment (the same whole-blob shape reshareCombineCommitments expects each entry of its own commitments array to be) from the wire's own per-coefficient array. The inverse of reshareSplitCommitment. */
149
+ function reshareCombineCommitmentParts(parts) {
150
+ return toBufferSource(wasm.reshare_combine_commitment_parts([...parts]));
151
+ }
152
+ /** Sums T survivors' broadcast commitment vectors into the one combined VSS commitment `reshareDerivePublicKeyPackage` needs. */
153
+ function reshareCombineCommitments(commitments) {
154
+ return toBufferSource(wasm.reshare_combine_commitments([...commitments]));
155
+ }
156
+ /** The echo-broadcast transcript digest a member of the new participant set sends on threshold-keygen-confirm for a reshare -- the reshare analogue of dkgTranscriptDigest, structurally distinct because a reshare's own survivor commitment carries no proof-of-knowledge component: deserializing one as a DKG round-1 package fails outright, since the two are different wire shapes entirely. `survivorCommitments` entries are each the same whole-blob shape reshareRound1's own `commitment` output is (NOT the wire's own split [* bstr] parts -- combine those first via reshareCombineCommitmentParts if collected off the wire). */
157
+ function reshareTranscriptDigest(survivorCommitments, groupVerifyingKey) {
158
+ const [ids, commitments] = toParallelArrays(survivorCommitments);
159
+ return toBufferSource(wasm.reshare_transcript_digest(ids, commitments, groupVerifyingKey));
160
+ }
161
+ /** The group's derived public key package given the combined commitment and the new participant set. `groupVerifyingKey` is what `threshold-keygen-confirm`'s own `group-key` field carries and what a reshare's own verifier obligation checks against `existing-group-key` (MUST equal it -- a reshare that changes the group key is a takeover, not a reshare). */
162
+ function reshareDerivePublicKeyPackage(combinedCommitment, newParticipantDeviceIds) {
163
+ const out = wasm.reshare_derive_public_key_package(combinedCommitment, [...newParticipantDeviceIds]);
164
+ return {
165
+ publicKeyPackage: toBufferSource(out.publicKeyPackage),
166
+ groupVerifyingKey: toBufferSource(out.groupVerifyingKey)
167
+ };
168
+ }
169
+ /** New-participant side (local): verifies each received share against its own embedded commitment, sums the validated shares, and builds this participant's final key package. */
170
+ function reshareCombineReceivedShares(ownDeviceId, received, publicKeyPackage, newMinSigners) {
171
+ return toBufferSource(wasm.reshare_combine_received_shares(ownDeviceId, [...received], publicKeyPackage, newMinSigners));
172
+ }
173
+ //#endregion
174
+ export { combineCommitments, combineRound1Package, dkgConfirmMatches, dkgRound1, dkgRound2, dkgRound3, dkgTranscriptDigest, keyPackageSigningShare, reshareCombineCommitmentParts, reshareCombineCommitments, reshareCombineReceivedShares, reshareDerivePublicKeyPackage, reshareRound1, reshareSplitCommitment, reshareTranscriptDigest, signingAggregate, signingBuildPackage, signingRound1Commit, signingRound2Sign, splitCommitments, splitRound1Package };
@@ -1,4 +1,4 @@
1
- import { r as Transport } from "../transport-BbSGNRFZ.cjs";
1
+ import { r as Transport } from "../transport-De0zHlaA.cjs";
2
2
  //#region src/adapters/tls-transport.d.ts
3
3
  export interface TlsIdentity {
4
4
  certificatePem: string;
@@ -1,4 +1,4 @@
1
- import { r as Transport } from "../transport-BNeF6kDe.mjs";
1
+ import { r as Transport } from "../transport-C7KVkhgb.mjs";
2
2
  //#region src/adapters/tls-transport.d.ts
3
3
  export interface TlsIdentity {
4
4
  certificatePem: string;
@@ -1,6 +1,6 @@
1
- import { D as DeviceId, N as Frame, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-D8CU6s2_.cjs";
1
+ import { D as DeviceId, N as Frame, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-CNFRVx9w.cjs";
2
2
  import { KeyValueStorage } from "../ports/storage.cjs";
3
- import { t as Connection } from "../transport-BbSGNRFZ.cjs";
3
+ import { t as Connection } from "../transport-De0zHlaA.cjs";
4
4
  import { IncomingManageRequest, MeshSession } from "./mesh-session.cjs";
5
5
  //#region src/domain/bulk.d.ts
6
6
  /** The two capabilities matching the direction each manage-command actually flows (spec/bulk.cddl): the sender proves write authority to open a transfer, the receiver proves read authority to ask for one to continue. */
@@ -1,6 +1,6 @@
1
- import { D as DeviceId, N as Frame, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-D8CU6s2_.mjs";
1
+ import { D as DeviceId, N as Frame, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-CNFRVx9w.mjs";
2
2
  import { KeyValueStorage } from "../ports/storage.mjs";
3
- import { t as Connection } from "../transport-BNeF6kDe.mjs";
3
+ import { t as Connection } from "../transport-C7KVkhgb.mjs";
4
4
  import { IncomingManageRequest, MeshSession } from "./mesh-session.mjs";
5
5
  //#region src/domain/bulk.d.ts
6
6
  /** The two capabilities matching the direction each manage-command actually flows (spec/bulk.cddl): the sender proves write authority to open a transfer, the receiver proves read authority to ask for one to continue. */
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_generated_protocol = require("../generated/protocol.cjs");
3
3
  const require_token_scope = require("../token-scope-CxHXTT3u.cjs");
4
- const require_tokens = require("../tokens-DxGVURpB.cjs");
4
+ const require_tokens = require("../tokens-Dh6mG6p_.cjs");
5
5
  //#region src/domain/capability-grant.ts
6
6
  /**
7
7
  * The generic, capability-agnostic capability-grant primitive (wire-mesh#117, spec/management.cddl) -- the unsolicited push counterpart to capability-request.ts's own ask/response primitive. Where capability-request lifts core/room's room.join shape (a pull: the requester asks, the owner mints and returns a grant on the same response) out of that one domain, capability-grant lifts room.invite's own shape (a push: the owner mints unprompted and delivers the grant in the request itself, since there is no approval round-trip to carry it back) the same way. core/room's own room-client.ts is the reference consumer: it builds sendRoomInvite as a thin wrapper over sendCapabilityGrant below, and wires createRoomRouter's dispatch onto createCapabilityGrantHandler for the receiving side.
@@ -1,8 +1,8 @@
1
- import { D as DeviceId, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-D8CU6s2_.cjs";
2
- import { t as IdentityPort } from "../identity-DHf0J6IA.cjs";
1
+ import { D as DeviceId, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-CNFRVx9w.cjs";
2
+ import { t as IdentityPort } from "../identity-CUkDHCRK.cjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.cjs";
4
4
  import { IncomingManageRequest, ManageOutcome, MeshSession } from "./mesh-session.cjs";
5
- import { a as RevocationCheck } from "../tokens-B1-MAIST.cjs";
5
+ import { a as RevocationCheck } from "../tokens-Cl8sQo7o.cjs";
6
6
  //#region src/domain/capability-grant.d.ts
7
7
  /**
8
8
  * Builds a capability-grant command per management.cddl. The outer `manage-command.verb` is the capability string itself, the identical convention capability-request.ts's own buildCapabilityRequestCommand already establishes -- a receiver's per-capability handler is how it knows which grant this push is even for. `params.verb` is the fixed "capability.grant" marker. No scope or invitee field: manage-request-frame's own top-level scope already carries the former, and the request's own destination already carries the latter -- naming either a second time inside params could only ever disagree with the fact it duplicates.
@@ -1,8 +1,8 @@
1
- import { D as DeviceId, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-D8CU6s2_.mjs";
2
- import { t as IdentityPort } from "../identity-Oelt3uEn.mjs";
1
+ import { D as DeviceId, V as ManageCommand, f as CapabilityScope, p as CapabilityToken } from "../protocol-CNFRVx9w.mjs";
2
+ import { t as IdentityPort } from "../identity-9TmmK7vP.mjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.mjs";
4
4
  import { IncomingManageRequest, ManageOutcome, MeshSession } from "./mesh-session.mjs";
5
- import { a as RevocationCheck } from "../tokens-Bh82oidM.mjs";
5
+ import { a as RevocationCheck } from "../tokens-CVyPoJ6l.mjs";
6
6
  //#region src/domain/capability-grant.d.ts
7
7
  /**
8
8
  * Builds a capability-grant command per management.cddl. The outer `manage-command.verb` is the capability string itself, the identical convention capability-request.ts's own buildCapabilityRequestCommand already establishes -- a receiver's per-capability handler is how it knows which grant this push is even for. `params.verb` is the fixed "capability.grant" marker. No scope or invitee field: manage-request-frame's own top-level scope already carries the former, and the request's own destination already carries the latter -- naming either a second time inside params could only ever disagree with the fact it duplicates.
@@ -1,6 +1,6 @@
1
1
  import { capabilityGrantSchema } from "../generated/protocol.mjs";
2
2
  import { n as scopeNarrows } from "../token-scope-Z4bmci4M.mjs";
3
- import { i as verifyCapabilityToken } from "../tokens-CdQwzCyJ.mjs";
3
+ import { a as verifyCapabilityToken } from "../tokens-B0dpTLhS.mjs";
4
4
  //#region src/domain/capability-grant.ts
5
5
  /**
6
6
  * The generic, capability-agnostic capability-grant primitive (wire-mesh#117, spec/management.cddl) -- the unsolicited push counterpart to capability-request.ts's own ask/response primitive. Where capability-request lifts core/room's room.join shape (a pull: the requester asks, the owner mints and returns a grant on the same response) out of that one domain, capability-grant lifts room.invite's own shape (a push: the owner mints unprompted and delivers the grant in the request itself, since there is no approval round-trip to carry it back) the same way. core/room's own room-client.ts is the reference consumer: it builds sendRoomInvite as a thin wrapper over sendCapabilityGrant below, and wires createRoomRouter's dispatch onto createCapabilityGrantHandler for the receiving side.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_generated_protocol = require("../generated/protocol.cjs");
3
- const require_tokens = require("../tokens-DxGVURpB.cjs");
3
+ const require_tokens = require("../tokens-Dh6mG6p_.cjs");
4
4
  //#region src/domain/capability-request.ts
5
5
  /**
6
6
  * The generic, capability-agnostic capability-request / capability-grant-ok primitive (wire-mesh#78, spec/management.cddl). Lifts core/room's own room.join shape -- an ungated ask, held open, a human (or any other domain-supplied decision) accepts or refuses, acceptance mints and returns a token on the same response -- out of that one domain so any capability can reuse it, not just room:member. core/room's own room-client.ts is the reference consumer: it rewires requestToJoin/createRoomRouter's room.join handling onto requestCapability/createCapabilityRequestHandler below, supplying room-specific extension fields (its member list) through this module's own extensions mechanism rather than this module knowing anything about rooms.
@@ -1,5 +1,5 @@
1
- import { D as DeviceId, V as ManageCommand, f as CapabilityScope, u as CapabilityGrantOk } from "../protocol-D8CU6s2_.cjs";
2
- import { t as IdentityPort } from "../identity-DHf0J6IA.cjs";
1
+ import { D as DeviceId, V as ManageCommand, f as CapabilityScope, u as CapabilityGrantOk } from "../protocol-CNFRVx9w.cjs";
2
+ import { t as IdentityPort } from "../identity-CUkDHCRK.cjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.cjs";
4
4
  import { IncomingManageRequest, MeshSession } from "./mesh-session.cjs";
5
5
  //#region src/domain/capability-request.d.ts
@@ -1,5 +1,5 @@
1
- import { D as DeviceId, V as ManageCommand, f as CapabilityScope, u as CapabilityGrantOk } from "../protocol-D8CU6s2_.mjs";
2
- import { t as IdentityPort } from "../identity-Oelt3uEn.mjs";
1
+ import { D as DeviceId, V as ManageCommand, f as CapabilityScope, u as CapabilityGrantOk } from "../protocol-CNFRVx9w.mjs";
2
+ import { t as IdentityPort } from "../identity-9TmmK7vP.mjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.mjs";
4
4
  import { IncomingManageRequest, MeshSession } from "./mesh-session.mjs";
5
5
  //#region src/domain/capability-request.d.ts
@@ -1,5 +1,5 @@
1
1
  import { capabilityGrantOkSchema, capabilityRequestSchema } from "../generated/protocol.mjs";
2
- import { n as mintCapabilityToken } from "../tokens-CdQwzCyJ.mjs";
2
+ import { n as mintCapabilityToken } from "../tokens-B0dpTLhS.mjs";
3
3
  //#region src/domain/capability-request.ts
4
4
  /**
5
5
  * The generic, capability-agnostic capability-request / capability-grant-ok primitive (wire-mesh#78, spec/management.cddl). Lifts core/room's own room.join shape -- an ungated ask, held open, a human (or any other domain-supplied decision) accepts or refuses, acceptance mints and returns a token on the same response -- out of that one domain so any capability can reuse it, not just room:member. core/room's own room-client.ts is the reference consumer: it rewires requestToJoin/createRoomRouter's room.join handling onto requestCapability/createCapabilityRequestHandler below, supplying room-specific extension fields (its member list) through this module's own extensions mechanism rather than this module knowing anything about rooms.
@@ -1,6 +1,6 @@
1
- import { D as DeviceId, E as DataRequestFrame, T as DataHaveFrame, w as DataEntriesFrame } from "../protocol-D8CU6s2_.cjs";
1
+ import { D as DeviceId, E as DataRequestFrame, T as DataHaveFrame, w as DataEntriesFrame } from "../protocol-CNFRVx9w.cjs";
2
2
  import { KeyValueStorage } from "../ports/storage.cjs";
3
- import { t as IdentityPort } from "../identity-DHf0J6IA.cjs";
3
+ import { t as IdentityPort } from "../identity-CUkDHCRK.cjs";
4
4
  //#region src/domain/data-sync.d.ts
5
5
  export interface DataSyncOptions {
6
6
  identity: IdentityPort;
@@ -1,6 +1,6 @@
1
- import { D as DeviceId, E as DataRequestFrame, T as DataHaveFrame, w as DataEntriesFrame } from "../protocol-D8CU6s2_.mjs";
1
+ import { D as DeviceId, E as DataRequestFrame, T as DataHaveFrame, w as DataEntriesFrame } from "../protocol-CNFRVx9w.mjs";
2
2
  import { KeyValueStorage } from "../ports/storage.mjs";
3
- import { t as IdentityPort } from "../identity-Oelt3uEn.mjs";
3
+ import { t as IdentityPort } from "../identity-9TmmK7vP.mjs";
4
4
  //#region src/domain/data-sync.d.ts
5
5
  export interface DataSyncOptions {
6
6
  identity: IdentityPort;
@@ -1,4 +1,4 @@
1
- import { D as DeviceId } from "../protocol-D8CU6s2_.cjs";
1
+ import { D as DeviceId } from "../protocol-CNFRVx9w.cjs";
2
2
  //#region src/domain/device-id.d.ts
3
3
  /** Lowercase, byte-exact hex for an arbitrary-length byte string -- the same encoding convention deviceIdToHex uses for the fixed-length device-id case, extracted so any other byte string needing a stable, displayable, map-keyable text form (e.g. a token-id, which tokens.cddl defines as an arbitrary-length bstr rather than a 32-byte device-id) can use the identical convention without going through a device-id-shaped function. */
4
4
  export declare function bytesToHex(bytes: Uint8Array): string;
@@ -1,4 +1,4 @@
1
- import { D as DeviceId } from "../protocol-D8CU6s2_.mjs";
1
+ import { D as DeviceId } from "../protocol-CNFRVx9w.mjs";
2
2
  //#region src/domain/device-id.d.ts
3
3
  /** Lowercase, byte-exact hex for an arbitrary-length byte string -- the same encoding convention deviceIdToHex uses for the fixed-length device-id case, extracted so any other byte string needing a stable, displayable, map-keyable text form (e.g. a token-id, which tokens.cddl defines as an arbitrary-length bstr rather than a 32-byte device-id) can use the identical convention without going through a device-id-shaped function. */
4
4
  export declare function bytesToHex(bytes: Uint8Array): string;
@@ -1,4 +1,4 @@
1
- import { D as DeviceId, f as CapabilityScope } from "../protocol-D8CU6s2_.cjs";
1
+ import { D as DeviceId, f as CapabilityScope } from "../protocol-CNFRVx9w.cjs";
2
2
  import { DirectoryEntry, MeshSession } from "./mesh-session.cjs";
3
3
  import { z } from "zod";
4
4
  //#region src/domain/grant-candidates.d.ts
@@ -1,4 +1,4 @@
1
- import { D as DeviceId, f as CapabilityScope } from "../protocol-D8CU6s2_.mjs";
1
+ import { D as DeviceId, f as CapabilityScope } from "../protocol-CNFRVx9w.mjs";
2
2
  import { DirectoryEntry, MeshSession } from "./mesh-session.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/domain/grant-candidates.d.ts
@@ -1,4 +1,4 @@
1
- import { A as DomainId, R as HandshakeFrame, ot as ProtocolVersion } from "../protocol-D8CU6s2_.cjs";
1
+ import { A as DomainId, R as HandshakeFrame, ot as ProtocolVersion } from "../protocol-CNFRVx9w.cjs";
2
2
  //#region src/domain/handshake.d.ts
3
3
  /** The highest protocol version this build of core understands. */
4
4
  export declare const SUPPORTED_PROTOCOL_VERSION: ProtocolVersion;
@@ -1,4 +1,4 @@
1
- import { A as DomainId, R as HandshakeFrame, ot as ProtocolVersion } from "../protocol-D8CU6s2_.mjs";
1
+ import { A as DomainId, R as HandshakeFrame, ot as ProtocolVersion } from "../protocol-CNFRVx9w.mjs";
2
2
  //#region src/domain/handshake.d.ts
3
3
  /** The highest protocol version this build of core understands. */
4
4
  export declare const SUPPORTED_PROTOCOL_VERSION: ProtocolVersion;
@@ -1,7 +1,7 @@
1
- import { D as DeviceId, E as DataRequestFrame, N as Frame, Q as PeerAdvert, T as DataHaveFrame, U as ManageError, V as ManageCommand, W as ManageOk, _t as RevocationEntry, f as CapabilityScope, ot as ProtocolVersion, p as CapabilityToken, w as DataEntriesFrame } from "../protocol-D8CU6s2_.cjs";
2
- import { t as IdentityPort } from "../identity-DHf0J6IA.cjs";
1
+ import { D as DeviceId, E as DataRequestFrame, N as Frame, Q as PeerAdvert, T as DataHaveFrame, U as ManageError, V as ManageCommand, W as ManageOk, _t as RevocationEntry, f as CapabilityScope, ot as ProtocolVersion, p as CapabilityToken, w as DataEntriesFrame } from "../protocol-CNFRVx9w.cjs";
2
+ import { t as IdentityPort } from "../identity-CUkDHCRK.cjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.cjs";
4
- import { r as Transport, t as Connection } from "../transport-BbSGNRFZ.cjs";
4
+ import { r as Transport, t as Connection } from "../transport-De0zHlaA.cjs";
5
5
  //#region src/domain/mesh-session.d.ts
6
6
  /** How long to wait for the node's handshake before calling it unanswered. A relay-only node never sends one; that is a state to display, not an error. */
7
7
  export declare const HANDSHAKE_TIMEOUT_MS = 3000;
@@ -1,7 +1,7 @@
1
- import { D as DeviceId, E as DataRequestFrame, N as Frame, Q as PeerAdvert, T as DataHaveFrame, U as ManageError, V as ManageCommand, W as ManageOk, _t as RevocationEntry, f as CapabilityScope, ot as ProtocolVersion, p as CapabilityToken, w as DataEntriesFrame } from "../protocol-D8CU6s2_.mjs";
2
- import { t as IdentityPort } from "../identity-Oelt3uEn.mjs";
1
+ import { D as DeviceId, E as DataRequestFrame, N as Frame, Q as PeerAdvert, T as DataHaveFrame, U as ManageError, V as ManageCommand, W as ManageOk, _t as RevocationEntry, f as CapabilityScope, ot as ProtocolVersion, p as CapabilityToken, w as DataEntriesFrame } from "../protocol-CNFRVx9w.mjs";
2
+ import { t as IdentityPort } from "../identity-9TmmK7vP.mjs";
3
3
  import { t as Clock } from "../clock-DiSx-WKM.mjs";
4
- import { r as Transport, t as Connection } from "../transport-BNeF6kDe.mjs";
4
+ import { r as Transport, t as Connection } from "../transport-C7KVkhgb.mjs";
5
5
  //#region src/domain/mesh-session.d.ts
6
6
  /** How long to wait for the node's handshake before calling it unanswered. A relay-only node never sends one; that is a state to display, not an error. */
7
7
  export declare const HANDSHAKE_TIMEOUT_MS = 3000;
@@ -1,8 +1,8 @@
1
- import { D as DeviceId, Et as RoomNoticeClaims, T as DataHaveFrame, Tt as RoomNotice, p as CapabilityToken } from "../protocol-D8CU6s2_.cjs";
1
+ import { D as DeviceId, Et as RoomNoticeClaims, T as DataHaveFrame, Tt as RoomNotice, p as CapabilityToken } from "../protocol-CNFRVx9w.cjs";
2
2
  import { KeyValueStorage } from "../ports/storage.cjs";
3
- import { t as IdentityPort } from "../identity-DHf0J6IA.cjs";
3
+ import { t as IdentityPort } from "../identity-CUkDHCRK.cjs";
4
4
  import { t as Clock } from "../clock-DiSx-WKM.cjs";
5
- import { a as RevocationCheck } from "../tokens-B1-MAIST.cjs";
5
+ import { a as RevocationCheck } from "../tokens-Cl8sQo7o.cjs";
6
6
  import { RoomNoticeVerdictReason } from "./room.cjs";
7
7
  //#region src/domain/notice-board.d.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
- import { D as DeviceId, Et as RoomNoticeClaims, T as DataHaveFrame, Tt as RoomNotice, p as CapabilityToken } from "../protocol-D8CU6s2_.mjs";
1
+ import { D as DeviceId, Et as RoomNoticeClaims, T as DataHaveFrame, Tt as RoomNotice, p as CapabilityToken } from "../protocol-CNFRVx9w.mjs";
2
2
  import { KeyValueStorage } from "../ports/storage.mjs";
3
- import { t as IdentityPort } from "../identity-Oelt3uEn.mjs";
3
+ import { t as IdentityPort } from "../identity-9TmmK7vP.mjs";
4
4
  import { t as Clock } from "../clock-DiSx-WKM.mjs";
5
- import { a as RevocationCheck } from "../tokens-Bh82oidM.mjs";
5
+ import { a as RevocationCheck } from "../tokens-CVyPoJ6l.mjs";
6
6
  import { RoomNoticeVerdictReason } from "./room.mjs";
7
7
  //#region src/domain/notice-board.d.ts
8
8
  /**
@@ -1,5 +1,5 @@
1
- import { N as Frame } from "../protocol-D8CU6s2_.cjs";
2
- import { t as Connection } from "../transport-BbSGNRFZ.cjs";
1
+ import { N as Frame } from "../protocol-CNFRVx9w.cjs";
2
+ import { t as Connection } from "../transport-De0zHlaA.cjs";
3
3
  //#region src/domain/relay-hub.d.ts
4
4
  export interface RelayHub {
5
5
  /** Drives one accepted connection until it closes: registers gossip-advertised devices, re-broadcasts each gossip frame to every other connected client and replies to the gossiping connection with a catch-up frame of every other already-known device, answers relay-connect by pairing and notifying the target, and forwards relay-data within established pairings. Resolves when the connection's frame stream ends. Internally just registerConnection followed by a loop of onFrame calls and a final onDisconnect -- kept as its own method since a dedicated hub deployment (wire-mesh-node/cloudflare-hub) has nothing else driving the connection and wants the whole lifecycle in one call. */
@@ -1,5 +1,5 @@
1
- import { N as Frame } from "../protocol-D8CU6s2_.mjs";
2
- import { t as Connection } from "../transport-BNeF6kDe.mjs";
1
+ import { N as Frame } from "../protocol-CNFRVx9w.mjs";
2
+ import { t as Connection } from "../transport-C7KVkhgb.mjs";
3
3
  //#region src/domain/relay-hub.d.ts
4
4
  export interface RelayHub {
5
5
  /** Drives one accepted connection until it closes: registers gossip-advertised devices, re-broadcasts each gossip frame to every other connected client and replies to the gossiping connection with a catch-up frame of every other already-known device, answers relay-connect by pairing and notifying the target, and forwards relay-data within established pairings. Resolves when the connection's frame stream ends. Internally just registerConnection followed by a loop of onFrame calls and a final onDisconnect -- kept as its own method since a dedicated hub deployment (wire-mesh-node/cloudflare-hub) has nothing else driving the connection and wants the whole lifecycle in one call. */
@@ -1,5 +1,5 @@
1
- import { N as Frame } from "../protocol-D8CU6s2_.cjs";
2
- import { t as Connection } from "../transport-BbSGNRFZ.cjs";
1
+ import { N as Frame } from "../protocol-CNFRVx9w.cjs";
2
+ import { t as Connection } from "../transport-De0zHlaA.cjs";
3
3
  //#region src/domain/relay-use-gate.d.ts
4
4
  export interface RelayUseAuthorizationTracker {
5
5
  /** True once authorize() has been called for this exact connection and revoke() has not been called since. */
@@ -1,5 +1,5 @@
1
- import { N as Frame } from "../protocol-D8CU6s2_.mjs";
2
- import { t as Connection } from "../transport-BNeF6kDe.mjs";
1
+ import { N as Frame } from "../protocol-CNFRVx9w.mjs";
2
+ import { t as Connection } from "../transport-C7KVkhgb.mjs";
3
3
  //#region src/domain/relay-use-gate.d.ts
4
4
  export interface RelayUseAuthorizationTracker {
5
5
  /** True once authorize() has been called for this exact connection and revoke() has not been called since. */
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_domain_device_id = require("./device-id.cjs");
3
- const require_tokens = require("../tokens-DxGVURpB.cjs");
3
+ const require_tokens = require("../tokens-Dh6mG6p_.cjs");
4
4
  //#region src/domain/revocation-view.ts
5
5
  function revocationKey(tokenId) {
6
6
  return require_domain_device_id.bytesToHex(tokenId);
@@ -1,5 +1,5 @@
1
- import { _t as RevocationEntry } from "../protocol-D8CU6s2_.cjs";
2
- import { a as RevocationCheck, d as VerifyRevocationEntryOptions, o as RevocationEntryVerdict } from "../tokens-B1-MAIST.cjs";
1
+ import { _t as RevocationEntry } from "../protocol-CNFRVx9w.cjs";
2
+ import { a as RevocationCheck, d as VerifyRevocationEntryOptions, o as RevocationEntryVerdict } from "../tokens-Cl8sQo7o.cjs";
3
3
  //#region src/domain/revocation-view.d.ts
4
4
  /**
5
5
  * An in-memory RevocationCheck fed by ingested revocation-announce frames. Keyed by token-id alone, per management.cddl's contract: a token-id can legitimately carry multiple recorded entries from different issuers (the token's own issuer, and/or any number of parties holding a delegated manage:revoke authorization over it) -- entriesFor returns every one of them unfiltered, since checking which actually apply (issuer-match, or a verified authorization) is verifyTokenChain's own obligation, not this store's.
@@ -1,5 +1,5 @@
1
- import { _t as RevocationEntry } from "../protocol-D8CU6s2_.mjs";
2
- import { a as RevocationCheck, d as VerifyRevocationEntryOptions, o as RevocationEntryVerdict } from "../tokens-Bh82oidM.mjs";
1
+ import { _t as RevocationEntry } from "../protocol-CNFRVx9w.mjs";
2
+ import { a as RevocationCheck, d as VerifyRevocationEntryOptions, o as RevocationEntryVerdict } from "../tokens-CVyPoJ6l.mjs";
3
3
  //#region src/domain/revocation-view.d.ts
4
4
  /**
5
5
  * An in-memory RevocationCheck fed by ingested revocation-announce frames. Keyed by token-id alone, per management.cddl's contract: a token-id can legitimately carry multiple recorded entries from different issuers (the token's own issuer, and/or any number of parties holding a delegated manage:revoke authorization over it) -- entriesFor returns every one of them unfiltered, since checking which actually apply (issuer-match, or a verified authorization) is verifyTokenChain's own obligation, not this store's.
@@ -1,5 +1,5 @@
1
1
  import { bytesToHex } from "./device-id.mjs";
2
- import { a as verifyRevocationEntry } from "../tokens-CdQwzCyJ.mjs";
2
+ import { o as verifyRevocationEntry } from "../tokens-B0dpTLhS.mjs";
3
3
  //#region src/domain/revocation-view.ts
4
4
  function revocationKey(tokenId) {
5
5
  return bytesToHex(tokenId);