@bcts/frost-hubert 1.0.0-beta.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/frost.cjs +17 -19
  3. package/dist/bin/frost.cjs.map +1 -1
  4. package/dist/bin/frost.mjs +16 -17
  5. package/dist/bin/frost.mjs.map +1 -1
  6. package/dist/{busy-EZU7EKr6.cjs → busy-B_h0bNAJ.cjs} +1 -1
  7. package/dist/{busy-DkM2jAIZ.mjs.map → busy-B_h0bNAJ.cjs.map} +1 -1
  8. package/dist/{busy-DkM2jAIZ.mjs → busy-BlU8_pS2.mjs} +1 -1
  9. package/dist/{busy-EZU7EKr6.cjs.map → busy-BlU8_pS2.mjs.map} +1 -1
  10. package/dist/cmd/index.cjs +6 -7
  11. package/dist/cmd/index.d.cts +1 -1
  12. package/dist/cmd/index.d.mts +1 -1
  13. package/dist/cmd/index.mjs +5 -6
  14. package/dist/{cmd-Bw9_i2_f.cjs → cmd-CCVhHzG7.cjs} +20 -21
  15. package/dist/{cmd-Bw9_i2_f.cjs.map → cmd-CCVhHzG7.cjs.map} +1 -1
  16. package/dist/{cmd-CS1uJtuD.mjs → cmd-DNsHd19v.mjs} +20 -21
  17. package/dist/{cmd-CS1uJtuD.mjs.map → cmd-DNsHd19v.mjs.map} +1 -1
  18. package/dist/{common-lThIvJmZ.cjs → common-7-BOgaTt.cjs} +2 -3
  19. package/dist/{common-lThIvJmZ.cjs.map → common-7-BOgaTt.cjs.map} +1 -1
  20. package/dist/{common-CvH6dFvQ.mjs → common-Cf1UvJaP.mjs} +3 -3
  21. package/dist/{common-CvH6dFvQ.mjs.map → common-Cf1UvJaP.mjs.map} +1 -1
  22. package/dist/{common-lKP5EzHy.cjs → common-CnvAUC2b.cjs} +3 -3
  23. package/dist/{common-lKP5EzHy.cjs.map → common-CnvAUC2b.cjs.map} +1 -1
  24. package/dist/{common-DUWvtc08.mjs → common-DNrD_-EI.mjs} +2 -2
  25. package/dist/{common-DUWvtc08.mjs.map → common-DNrD_-EI.mjs.map} +1 -1
  26. package/dist/dkg/index.cjs +1 -2
  27. package/dist/dkg/index.cjs.map +1 -1
  28. package/dist/dkg/index.d.cts +1 -1
  29. package/dist/dkg/index.d.mts +1 -1
  30. package/dist/dkg/index.mjs +1 -1
  31. package/dist/dkg/index.mjs.map +1 -1
  32. package/dist/{finalize-CNTDj6aS.mjs → finalize-BpC0rz93.mjs} +6 -6
  33. package/dist/{finalize-CNTDj6aS.mjs.map → finalize-BpC0rz93.mjs.map} +1 -1
  34. package/dist/{finalize-BRgJK-Xv.cjs → finalize-Cb0obTSo.cjs} +6 -6
  35. package/dist/{finalize-BRgJK-Xv.cjs.map → finalize-Cb0obTSo.cjs.map} +1 -1
  36. package/dist/{finalize-BfLgzn8f.cjs → finalize-DHEnKobp.cjs} +5 -5
  37. package/dist/{finalize-BfLgzn8f.cjs.map → finalize-DHEnKobp.cjs.map} +1 -1
  38. package/dist/{finalize-UPyI1yb1.cjs → finalize-DQ0VGUHO.cjs} +7 -7
  39. package/dist/{finalize-UPyI1yb1.cjs.map → finalize-DQ0VGUHO.cjs.map} +1 -1
  40. package/dist/{finalize-IA01t_Qq.mjs → finalize-DtRxHZ7H.mjs} +5 -5
  41. package/dist/{finalize-IA01t_Qq.mjs.map → finalize-DtRxHZ7H.mjs.map} +1 -1
  42. package/dist/{finalize-EC3ikHQq.mjs → finalize-T83Ko8nG.mjs} +6 -6
  43. package/dist/{finalize-EC3ikHQq.mjs.map → finalize-T83Ko8nG.mjs.map} +1 -1
  44. package/dist/frost/index.cjs +1 -1
  45. package/dist/frost/index.cjs.map +1 -1
  46. package/dist/frost/index.d.cts.map +1 -1
  47. package/dist/frost/index.d.mts.map +1 -1
  48. package/dist/frost/index.mjs +1 -1
  49. package/dist/frost/index.mjs.map +1 -1
  50. package/dist/{index-F1iNEAJR.d.cts → index-BErX9AZF.d.cts} +3 -3
  51. package/dist/index-BErX9AZF.d.cts.map +1 -0
  52. package/dist/{index-B3c-80VS.d.cts → index-BaUVw4b1.d.mts} +2 -2
  53. package/dist/index-BaUVw4b1.d.mts.map +1 -0
  54. package/dist/{index-C8QeHNwa.d.cts → index-CD50Qtgw.d.cts} +1 -1
  55. package/dist/index-CD50Qtgw.d.cts.map +1 -0
  56. package/dist/{index-DVbWyOs7.d.mts → index-CD50Qtgw.d.mts} +1 -1
  57. package/dist/index-CD50Qtgw.d.mts.map +1 -0
  58. package/dist/{index-BgbSGpxn.d.mts → index-Drklne-Y.d.mts} +3 -3
  59. package/dist/index-Drklne-Y.d.mts.map +1 -0
  60. package/dist/{index-D3QTWkEm.d.mts → index-gkmZzEuD.d.cts} +2 -2
  61. package/dist/index-gkmZzEuD.d.cts.map +1 -0
  62. package/dist/index.cjs +7 -8
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.d.cts +3 -3
  65. package/dist/index.d.cts.map +1 -1
  66. package/dist/index.d.mts +3 -3
  67. package/dist/index.d.mts.map +1 -1
  68. package/dist/index.mjs +6 -7
  69. package/dist/index.mjs.map +1 -1
  70. package/dist/{invite-5277FQVT.cjs → invite-1tzg0B0P.cjs} +5 -5
  71. package/dist/{invite-5277FQVT.cjs.map → invite-1tzg0B0P.cjs.map} +1 -1
  72. package/dist/{invite-DUTcfTgX.cjs → invite-BLwtexAu.cjs} +4 -4
  73. package/dist/{invite-DUTcfTgX.cjs.map → invite-BLwtexAu.cjs.map} +1 -1
  74. package/dist/{invite-IU4n0dq2.mjs → invite-Be2v2SVc.mjs} +4 -4
  75. package/dist/{invite-IU4n0dq2.mjs.map → invite-Be2v2SVc.mjs.map} +1 -1
  76. package/dist/{invite-RU-OXTNS.mjs → invite-D8mQSnFz.mjs} +5 -5
  77. package/dist/{invite-RU-OXTNS.mjs.map → invite-D8mQSnFz.mjs.map} +1 -1
  78. package/dist/{parallel-D6zc6VW4.mjs → parallel-PZiwHZT8.mjs} +1 -1
  79. package/dist/{parallel-D1R6ZGlY.cjs.map → parallel-PZiwHZT8.mjs.map} +1 -1
  80. package/dist/{parallel-D1R6ZGlY.cjs → parallel-szwYx-bi.cjs} +1 -1
  81. package/dist/{parallel-D6zc6VW4.mjs.map → parallel-szwYx-bi.cjs.map} +1 -1
  82. package/dist/{proposed-participant-Dm1Eq6mX.cjs → proposed-participant-BvHNnpcZ.cjs} +1 -2
  83. package/dist/{proposed-participant-Dm1Eq6mX.cjs.map → proposed-participant-BvHNnpcZ.cjs.map} +1 -1
  84. package/dist/{proposed-participant-cWM7iUrO.mjs → proposed-participant-Detb823_.mjs} +1 -1
  85. package/dist/{proposed-participant-cWM7iUrO.mjs.map → proposed-participant-Detb823_.mjs.map} +1 -1
  86. package/dist/{receive-CAI-x4II.cjs → receive-BR-knnGv.cjs} +6 -6
  87. package/dist/{receive-CAI-x4II.cjs.map → receive-BR-knnGv.cjs.map} +1 -1
  88. package/dist/{receive-kZMsXhbK.cjs → receive-D_r4Mryr.cjs} +6 -6
  89. package/dist/{receive-kZMsXhbK.cjs.map → receive-D_r4Mryr.cjs.map} +1 -1
  90. package/dist/{receive-D2Nn68L7.mjs → receive-dkSCSGpl.mjs} +5 -5
  91. package/dist/{receive-D2Nn68L7.mjs.map → receive-dkSCSGpl.mjs.map} +1 -1
  92. package/dist/{receive-DA_KQEgk.mjs → receive-g8EhZF2Y.mjs} +6 -6
  93. package/dist/{receive-DA_KQEgk.mjs.map → receive-g8EhZF2Y.mjs.map} +1 -1
  94. package/dist/registry/index.cjs +1 -1
  95. package/dist/registry/index.cjs.map +1 -1
  96. package/dist/registry/index.d.cts +1 -1
  97. package/dist/registry/index.d.mts +1 -1
  98. package/dist/registry/index.mjs.map +1 -1
  99. package/dist/{registry-9puTaRrD.cjs → registry-CkIbA7nt.cjs} +79 -2
  100. package/dist/registry-CkIbA7nt.cjs.map +1 -0
  101. package/dist/{registry-BpCwtrRt.mjs → registry-DGjs4qDK.mjs} +74 -3
  102. package/dist/registry-DGjs4qDK.mjs.map +1 -0
  103. package/dist/{round1-BHBjru1m.cjs → round1-9FAqFvL5.cjs} +5 -5
  104. package/dist/{round1-BHBjru1m.cjs.map → round1-9FAqFvL5.cjs.map} +1 -1
  105. package/dist/{round1-CcQCGlIT.mjs → round1-B8haiMM8.mjs} +6 -6
  106. package/dist/{round1-CcQCGlIT.mjs.map → round1-B8haiMM8.mjs.map} +1 -1
  107. package/dist/{round1-Cgm7j1kI.mjs → round1-BOIE1E4O.mjs} +5 -5
  108. package/dist/{round1-Cgm7j1kI.mjs.map → round1-BOIE1E4O.mjs.map} +1 -1
  109. package/dist/{round1-4Hyx8w0x.cjs → round1-Bq0vweyQ.cjs} +5 -5
  110. package/dist/{round1-4Hyx8w0x.cjs.map → round1-Bq0vweyQ.cjs.map} +1 -1
  111. package/dist/{round1-CWSXZx5R.cjs → round1-CXkXoVQU.cjs} +9 -9
  112. package/dist/{round1-CWSXZx5R.cjs.map → round1-CXkXoVQU.cjs.map} +1 -1
  113. package/dist/{round1-7v9LlE11.mjs → round1-D8t7EzIo.mjs} +5 -5
  114. package/dist/{round1-7v9LlE11.mjs.map → round1-D8t7EzIo.mjs.map} +1 -1
  115. package/dist/{round1-DQ0fnc1H.cjs → round1-DriPu15x.cjs} +7 -7
  116. package/dist/{round1-DQ0fnc1H.cjs.map → round1-DriPu15x.cjs.map} +1 -1
  117. package/dist/{round1-CMLKN2RR.mjs → round1-Y2kcVwnR.mjs} +7 -7
  118. package/dist/{round1-CMLKN2RR.mjs.map → round1-Y2kcVwnR.mjs.map} +1 -1
  119. package/dist/{round2-BWz9SQIi.cjs → round2-AMDYMUIg.cjs} +5 -5
  120. package/dist/{round2-BWz9SQIi.cjs.map → round2-AMDYMUIg.cjs.map} +1 -1
  121. package/dist/{round2-o2Q-GMbX.cjs → round2-BHQKVJFo.cjs} +7 -7
  122. package/dist/{round2-o2Q-GMbX.cjs.map → round2-BHQKVJFo.cjs.map} +1 -1
  123. package/dist/{round2-Bl2uK93U.mjs → round2-BfetYacV.mjs} +5 -5
  124. package/dist/{round2-Bl2uK93U.mjs.map → round2-BfetYacV.mjs.map} +1 -1
  125. package/dist/{round2-Dg24w-TU.mjs → round2-Cf5CJc_8.mjs} +7 -7
  126. package/dist/{round2-Dg24w-TU.mjs.map → round2-Cf5CJc_8.mjs.map} +1 -1
  127. package/dist/{round2-LylCa84n.cjs → round2-CvrmylN1.cjs} +7 -7
  128. package/dist/{round2-LylCa84n.cjs.map → round2-CvrmylN1.cjs.map} +1 -1
  129. package/dist/{round2-CdUT-AhH.cjs → round2-Dk_w97nl.cjs} +5 -5
  130. package/dist/{round2-CdUT-AhH.cjs.map → round2-Dk_w97nl.cjs.map} +1 -1
  131. package/dist/{round2-BkNRCXgS.mjs → round2-Z2JhMwxc.mjs} +5 -5
  132. package/dist/{round2-BkNRCXgS.mjs.map → round2-Z2JhMwxc.mjs.map} +1 -1
  133. package/dist/{round2-DOA3rnV-.mjs → round2-mF6UlkT-.mjs} +6 -6
  134. package/dist/{round2-DOA3rnV-.mjs.map → round2-mF6UlkT-.mjs.map} +1 -1
  135. package/package.json +14 -14
  136. package/dist/index-B3c-80VS.d.cts.map +0 -1
  137. package/dist/index-BgbSGpxn.d.mts.map +0 -1
  138. package/dist/index-C8QeHNwa.d.cts.map +0 -1
  139. package/dist/index-D3QTWkEm.d.mts.map +0 -1
  140. package/dist/index-DVbWyOs7.d.mts.map +0 -1
  141. package/dist/index-F1iNEAJR.d.cts.map +0 -1
  142. package/dist/registry-9puTaRrD.cjs.map +0 -1
  143. package/dist/registry-BpCwtrRt.mjs.map +0 -1
  144. package/dist/storage-B-Gu68-O.cjs +0 -79
  145. package/dist/storage-B-Gu68-O.cjs.map +0 -1
  146. package/dist/storage-Bkkliz0K.mjs +0 -74
  147. package/dist/storage-Bkkliz0K.mjs.map +0 -1
  148. /package/dist/{chunk-CZWwpsFl.cjs → chunk-DakpK96I.cjs} +0 -0
  149. /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"busy-EZU7EKr6.cjs","names":[],"sources":["../src/cmd/busy.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Progress indicator utilities.\n *\n * Port of cmd/busy.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\nimport { type Envelope } from \"@bcts/envelope\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Put an envelope to storage with a progress indicator.\n *\n * Port of `put_with_indicator()` from cmd/busy.rs.\n */\nexport async function putWithIndicator(\n client: StorageClient,\n arid: ARID,\n envelope: Envelope,\n message: string,\n verbose: boolean,\n): Promise<void> {\n if (verbose) {\n console.log(`${message}...`);\n }\n\n await client.put(arid, envelope);\n\n if (verbose) {\n console.log(`${message}... done`);\n }\n}\n\n/**\n * Get an envelope from storage with a progress indicator.\n *\n * Port of `get_with_indicator()` from cmd/busy.rs.\n */\nexport async function getWithIndicator(\n client: StorageClient,\n arid: ARID,\n message: string,\n timeoutSeconds: number | undefined,\n verbose: boolean,\n): Promise<Envelope | undefined> {\n if (verbose) {\n console.log(`${message}...`);\n }\n\n const envelope = await client.get(arid, timeoutSeconds);\n\n if (verbose) {\n if (envelope) {\n console.log(`${message}... found`);\n } else {\n console.log(`${message}... not found`);\n }\n }\n\n return envelope;\n}\n"],"mappings":";;;;;;AAsBA,eAAsB,iBACpB,QACA,MACA,UACA,SACA,SACe;AACf,KAAI,QACF,SAAQ,IAAI,GAAG,QAAQ,KAAK;AAG9B,OAAM,OAAO,IAAI,MAAM,SAAS;AAEhC,KAAI,QACF,SAAQ,IAAI,GAAG,QAAQ,UAAU;;;;;;;AASrC,eAAsB,iBACpB,QACA,MACA,SACA,gBACA,SAC+B;AAC/B,KAAI,QACF,SAAQ,IAAI,GAAG,QAAQ,KAAK;CAG9B,MAAM,WAAW,MAAM,OAAO,IAAI,MAAM,eAAe;AAEvD,KAAI,QACF,KAAI,SACF,SAAQ,IAAI,GAAG,QAAQ,WAAW;KAElC,SAAQ,IAAI,GAAG,QAAQ,eAAe;AAI1C,QAAO"}
1
+ {"version":3,"file":"busy-BlU8_pS2.mjs","names":[],"sources":["../src/cmd/busy.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Progress indicator utilities.\n *\n * Port of cmd/busy.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\nimport { type Envelope } from \"@bcts/envelope\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Put an envelope to storage with a progress indicator.\n *\n * Port of `put_with_indicator()` from cmd/busy.rs.\n */\nexport async function putWithIndicator(\n client: StorageClient,\n arid: ARID,\n envelope: Envelope,\n message: string,\n verbose: boolean,\n): Promise<void> {\n if (verbose) {\n console.log(`${message}...`);\n }\n\n await client.put(arid, envelope);\n\n if (verbose) {\n console.log(`${message}... done`);\n }\n}\n\n/**\n * Get an envelope from storage with a progress indicator.\n *\n * Port of `get_with_indicator()` from cmd/busy.rs.\n */\nexport async function getWithIndicator(\n client: StorageClient,\n arid: ARID,\n message: string,\n timeoutSeconds: number | undefined,\n verbose: boolean,\n): Promise<Envelope | undefined> {\n if (verbose) {\n console.log(`${message}...`);\n }\n\n const envelope = await client.get(arid, timeoutSeconds);\n\n if (verbose) {\n if (envelope) {\n console.log(`${message}... found`);\n } else {\n console.log(`${message}... not found`);\n }\n }\n\n return envelope;\n}\n"],"mappings":";;;;;;AAsBA,eAAsB,iBACpB,QACA,MACA,UACA,SACA,SACe;CACf,IAAI,SACF,QAAQ,IAAI,GAAG,QAAQ,IAAI;CAG7B,MAAM,OAAO,IAAI,MAAM,QAAQ;CAE/B,IAAI,SACF,QAAQ,IAAI,GAAG,QAAQ,SAAS;AAEpC;;;;;;AAOA,eAAsB,iBACpB,QACA,MACA,SACA,gBACA,SAC+B;CAC/B,IAAI,SACF,QAAQ,IAAI,GAAG,QAAQ,IAAI;CAG7B,MAAM,WAAW,MAAM,OAAO,IAAI,MAAM,cAAc;CAEtD,IAAI,SACF,IAAI,UACF,QAAQ,IAAI,GAAG,QAAQ,UAAU;MAEjC,QAAQ,IAAI,GAAG,QAAQ,cAAc;CAIzC,OAAO;AACT"}
@@ -1,16 +1,15 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_common = require("../common-lKP5EzHy.cjs");
3
- const require_busy = require("../busy-EZU7EKr6.cjs");
4
- const require_parallel = require("../parallel-D1R6ZGlY.cjs");
5
- const require_storage = require("../storage-B-Gu68-O.cjs");
6
- const require_cmd = require("../cmd-Bw9_i2_f.cjs");
7
- const require_registry = require("../registry-9puTaRrD.cjs");
2
+ const require_common = require("../common-CnvAUC2b.cjs");
3
+ const require_busy = require("../busy-B_h0bNAJ.cjs");
4
+ const require_parallel = require("../parallel-szwYx-bi.cjs");
5
+ const require_registry = require("../registry-CkIbA7nt.cjs");
6
+ const require_cmd = require("../cmd-CCVhHzG7.cjs");
8
7
  exports.CollectionResult = require_parallel.CollectionResult;
9
8
  exports.DEFAULT_TIMEOUT_SECONDS = require_parallel.DEFAULT_TIMEOUT_SECONDS;
10
9
  exports.Direction = require_parallel.Direction;
11
10
  exports.buildFetchRequests = require_parallel.buildFetchRequests;
12
11
  exports.checkAridExists = require_cmd.checkAridExists;
13
- exports.createStorageClient = require_storage.createStorageClient;
12
+ exports.createStorageClient = require_registry.createStorageClient;
14
13
  exports.directionEmoji = require_parallel.directionEmoji;
15
14
  Object.defineProperty(exports, "dkg", {
16
15
  enumerable: true,
@@ -1,2 +1,2 @@
1
- import { A as signingKeyFromVerifying, C as StorageClient, D as isVerbose, E as groupStateDir, O as setVerbose, S as putWithIndicator, T as createStorageClient, _ as fetchStatusTimeout, a as CollectionResult, b as parallelSend, c as FetchStatus, d as directionEmoji, f as emptyCollectionResult, g as fetchStatusSuccess, h as fetchStatusRejected, i as checkAridExists, k as parseAridUr, l as ParallelFetchConfig, m as fetchStatusPending, n as index_d_exports$2, o as DEFAULT_TIMEOUT_SECONDS, p as fetchStatusError, r as index_d_exports, s as Direction, t as index_d_exports$1, u as buildFetchRequests, v as parallelFetch, w as StorageSelection, x as getWithIndicator, y as parallelFetchConfigWithTimeout } from "../index-F1iNEAJR.cjs";
1
+ import { A as signingKeyFromVerifying, C as StorageClient, D as isVerbose, E as groupStateDir, O as setVerbose, S as putWithIndicator, T as createStorageClient, _ as fetchStatusTimeout, a as CollectionResult, b as parallelSend, c as FetchStatus, d as directionEmoji, f as emptyCollectionResult, g as fetchStatusSuccess, h as fetchStatusRejected, i as checkAridExists, k as parseAridUr, l as ParallelFetchConfig, m as fetchStatusPending, n as index_d_exports$2, o as DEFAULT_TIMEOUT_SECONDS, p as fetchStatusError, r as index_d_exports, s as Direction, t as index_d_exports$1, u as buildFetchRequests, v as parallelFetch, w as StorageSelection, x as getWithIndicator, y as parallelFetchConfigWithTimeout } from "../index-BErX9AZF.cjs";
2
2
  export { CollectionResult, DEFAULT_TIMEOUT_SECONDS, Direction, FetchStatus, ParallelFetchConfig, StorageClient, StorageSelection, buildFetchRequests, checkAridExists, createStorageClient, directionEmoji, index_d_exports as dkg, emptyCollectionResult, fetchStatusError, fetchStatusPending, fetchStatusRejected, fetchStatusSuccess, fetchStatusTimeout, getWithIndicator, groupStateDir, isVerbose, parallelFetch, parallelFetchConfigWithTimeout, parallelSend, parseAridUr, putWithIndicator, index_d_exports$1 as registry, setVerbose, index_d_exports$2 as sign, signingKeyFromVerifying };
@@ -1,2 +1,2 @@
1
- import { A as signingKeyFromVerifying, C as StorageClient, D as isVerbose, E as groupStateDir, O as setVerbose, S as putWithIndicator, T as createStorageClient, _ as fetchStatusTimeout, a as CollectionResult, b as parallelSend, c as FetchStatus, d as directionEmoji, f as emptyCollectionResult, g as fetchStatusSuccess, h as fetchStatusRejected, i as checkAridExists, k as parseAridUr, l as ParallelFetchConfig, m as fetchStatusPending, n as index_d_exports$2, o as DEFAULT_TIMEOUT_SECONDS, p as fetchStatusError, r as index_d_exports, s as Direction, t as index_d_exports$1, u as buildFetchRequests, v as parallelFetch, w as StorageSelection, x as getWithIndicator, y as parallelFetchConfigWithTimeout } from "../index-BgbSGpxn.mjs";
1
+ import { A as signingKeyFromVerifying, C as StorageClient, D as isVerbose, E as groupStateDir, O as setVerbose, S as putWithIndicator, T as createStorageClient, _ as fetchStatusTimeout, a as CollectionResult, b as parallelSend, c as FetchStatus, d as directionEmoji, f as emptyCollectionResult, g as fetchStatusSuccess, h as fetchStatusRejected, i as checkAridExists, k as parseAridUr, l as ParallelFetchConfig, m as fetchStatusPending, n as index_d_exports$2, o as DEFAULT_TIMEOUT_SECONDS, p as fetchStatusError, r as index_d_exports, s as Direction, t as index_d_exports$1, u as buildFetchRequests, v as parallelFetch, w as StorageSelection, x as getWithIndicator, y as parallelFetchConfigWithTimeout } from "../index-Drklne-Y.mjs";
2
2
  export { CollectionResult, DEFAULT_TIMEOUT_SECONDS, Direction, FetchStatus, ParallelFetchConfig, StorageClient, StorageSelection, buildFetchRequests, checkAridExists, createStorageClient, directionEmoji, index_d_exports as dkg, emptyCollectionResult, fetchStatusError, fetchStatusPending, fetchStatusRejected, fetchStatusSuccess, fetchStatusTimeout, getWithIndicator, groupStateDir, isVerbose, parallelFetch, parallelFetchConfigWithTimeout, parallelSend, parseAridUr, putWithIndicator, index_d_exports$1 as registry, setVerbose, index_d_exports$2 as sign, signingKeyFromVerifying };
@@ -1,7 +1,6 @@
1
- import { c as parseAridUr, h as signingKeyFromVerifying, n as isVerbose, r as setVerbose, t as groupStateDir } from "../common-CvH6dFvQ.mjs";
2
- import { n as putWithIndicator, t as getWithIndicator } from "../busy-DkM2jAIZ.mjs";
3
- import { a as directionEmoji, c as fetchStatusPending, d as fetchStatusTimeout, f as parallelFetch, i as buildFetchRequests, l as fetchStatusRejected, m as parallelSend, n as DEFAULT_TIMEOUT_SECONDS, o as emptyCollectionResult, p as parallelFetchConfigWithTimeout, r as Direction, s as fetchStatusError, t as CollectionResult, u as fetchStatusSuccess } from "../parallel-D6zc6VW4.mjs";
4
- import { t as createStorageClient } from "../storage-Bkkliz0K.mjs";
5
- import { n as dkg_exports, r as checkAridExists, t as sign_exports } from "../cmd-CS1uJtuD.mjs";
6
- import { t as registry_exports } from "../registry-BpCwtrRt.mjs";
1
+ import { c as parseAridUr, h as signingKeyFromVerifying, n as isVerbose, r as setVerbose, t as groupStateDir } from "../common-Cf1UvJaP.mjs";
2
+ import { n as putWithIndicator, t as getWithIndicator } from "../busy-BlU8_pS2.mjs";
3
+ import { a as directionEmoji, c as fetchStatusPending, d as fetchStatusTimeout, f as parallelFetch, i as buildFetchRequests, l as fetchStatusRejected, m as parallelSend, n as DEFAULT_TIMEOUT_SECONDS, o as emptyCollectionResult, p as parallelFetchConfigWithTimeout, r as Direction, s as fetchStatusError, t as CollectionResult, u as fetchStatusSuccess } from "../parallel-PZiwHZT8.mjs";
4
+ import { i as createStorageClient, t as registry_exports } from "../registry-DGjs4qDK.mjs";
5
+ import { n as dkg_exports, r as checkAridExists, t as sign_exports } from "../cmd-DNsHd19v.mjs";
7
6
  export { CollectionResult, DEFAULT_TIMEOUT_SECONDS, Direction, buildFetchRequests, checkAridExists, createStorageClient, directionEmoji, dkg_exports as dkg, emptyCollectionResult, fetchStatusError, fetchStatusPending, fetchStatusRejected, fetchStatusSuccess, fetchStatusTimeout, getWithIndicator, groupStateDir, isVerbose, parallelFetch, parallelFetchConfigWithTimeout, parallelSend, parseAridUr, putWithIndicator, registry_exports as registry, setVerbose, sign_exports as sign, signingKeyFromVerifying };
@@ -1,23 +1,22 @@
1
- const require_chunk = require("./chunk-CZWwpsFl.cjs");
2
- const require_common = require("./common-lKP5EzHy.cjs");
3
- require("./storage-B-Gu68-O.cjs");
4
- const require_invite = require("./invite-DUTcfTgX.cjs");
5
- const require_round1 = require("./round1-BHBjru1m.cjs");
6
- const require_round2 = require("./round2-CdUT-AhH.cjs");
7
- const require_finalize = require("./finalize-BfLgzn8f.cjs");
8
- const require_receive = require("./receive-CAI-x4II.cjs");
9
- const require_round1$1 = require("./round1-CWSXZx5R.cjs");
10
- const require_round2$1 = require("./round2-LylCa84n.cjs");
11
- const require_finalize$1 = require("./finalize-UPyI1yb1.cjs");
12
- const require_common$1 = require("./common-lThIvJmZ.cjs");
13
- const require_invite$1 = require("./invite-5277FQVT.cjs");
14
- const require_round1$2 = require("./round1-4Hyx8w0x.cjs");
15
- const require_round2$2 = require("./round2-o2Q-GMbX.cjs");
16
- const require_receive$1 = require("./receive-kZMsXhbK.cjs");
17
- const require_round1$3 = require("./round1-DQ0fnc1H.cjs");
18
- const require_round2$3 = require("./round2-BWz9SQIi.cjs");
19
- const require_finalize$2 = require("./finalize-BRgJK-Xv.cjs");
20
- require("./registry-9puTaRrD.cjs");
1
+ const require_chunk = require("./chunk-DakpK96I.cjs");
2
+ const require_common = require("./common-CnvAUC2b.cjs");
3
+ require("./registry-CkIbA7nt.cjs");
4
+ const require_invite = require("./invite-BLwtexAu.cjs");
5
+ const require_round1 = require("./round1-9FAqFvL5.cjs");
6
+ const require_round2 = require("./round2-Dk_w97nl.cjs");
7
+ const require_finalize = require("./finalize-DHEnKobp.cjs");
8
+ const require_receive = require("./receive-BR-knnGv.cjs");
9
+ const require_round1$1 = require("./round1-CXkXoVQU.cjs");
10
+ const require_round2$1 = require("./round2-CvrmylN1.cjs");
11
+ const require_finalize$1 = require("./finalize-DQ0VGUHO.cjs");
12
+ const require_common$1 = require("./common-7-BOgaTt.cjs");
13
+ const require_invite$1 = require("./invite-1tzg0B0P.cjs");
14
+ const require_round1$2 = require("./round1-Bq0vweyQ.cjs");
15
+ const require_round2$2 = require("./round2-BHQKVJFo.cjs");
16
+ const require_receive$1 = require("./receive-D_r4Mryr.cjs");
17
+ const require_round1$3 = require("./round1-DriPu15x.cjs");
18
+ const require_round2$3 = require("./round2-AMDYMUIg.cjs");
19
+ const require_finalize$2 = require("./finalize-Cb0obTSo.cjs");
21
20
  //#region src/cmd/check.ts
22
21
  /**
23
22
  * Check if an ARID exists in storage.
@@ -127,4 +126,4 @@ Object.defineProperty(exports, "sign_exports", {
127
126
  }
128
127
  });
129
128
 
130
- //# sourceMappingURL=cmd-Bw9_i2_f.cjs.map
129
+ //# sourceMappingURL=cmd-CCVhHzG7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmd-Bw9_i2_f.cjs","names":[],"sources":["../src/cmd/check.ts","../src/cmd/dkg/coordinator/index.ts","../src/cmd/dkg/participant/index.ts","../src/cmd/dkg/index.ts","../src/cmd/sign/coordinator/index.ts","../src/cmd/sign/participant/index.ts","../src/cmd/sign/index.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Check command utilities.\n *\n * Port of cmd/check.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Check if an ARID exists in storage.\n *\n * Port of check functionality from cmd/check.rs.\n */\nexport async function checkAridExists(client: StorageClient, arid: ARID): Promise<boolean> {\n return client.exists(arid);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG coordinator commands.\n *\n * Port of cmd/dkg/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG participant commands.\n *\n * Port of cmd/dkg/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG command module.\n *\n * Port of cmd/dkg/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign coordinator commands.\n *\n * Port of cmd/sign/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign participant commands.\n *\n * Port of cmd/sign/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign command module.\n *\n * Port of cmd/sign/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,eAAsB,gBAAgB,QAAuB,MAA8B;AACzF,QAAO,OAAO,OAAO,KAAK"}
1
+ {"version":3,"file":"cmd-CCVhHzG7.cjs","names":[],"sources":["../src/cmd/check.ts","../src/cmd/dkg/coordinator/index.ts","../src/cmd/dkg/participant/index.ts","../src/cmd/dkg/index.ts","../src/cmd/sign/coordinator/index.ts","../src/cmd/sign/participant/index.ts","../src/cmd/sign/index.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Check command utilities.\n *\n * Port of cmd/check.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Check if an ARID exists in storage.\n *\n * Port of check functionality from cmd/check.rs.\n */\nexport async function checkAridExists(client: StorageClient, arid: ARID): Promise<boolean> {\n return client.exists(arid);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG coordinator commands.\n *\n * Port of cmd/dkg/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG participant commands.\n *\n * Port of cmd/dkg/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG command module.\n *\n * Port of cmd/dkg/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign coordinator commands.\n *\n * Port of cmd/sign/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign participant commands.\n *\n * Port of cmd/sign/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign command module.\n *\n * Port of cmd/sign/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,eAAsB,gBAAgB,QAAuB,MAA8B;CACzF,OAAO,OAAO,OAAO,IAAI;AAC3B"}
@@ -1,23 +1,22 @@
1
- import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
2
- import { a as dkgStateDir, c as parseAridUr, d as resolveOwnerXidDocument, f as resolveParticipants, h as signingKeyFromVerifying, i as buildGroupParticipants, l as parseEnvelopeUr, m as resolveSenderName, o as formatNameWithOwnerMarker, p as resolveSender, s as groupParticipantFromRegistry, t as groupStateDir, u as participantNamesFromRegistry } from "./common-CvH6dFvQ.mjs";
3
- import "./storage-Bkkliz0K.mjs";
4
- import { t as invite } from "./invite-IU4n0dq2.mjs";
5
- import { t as round1 } from "./round1-Cgm7j1kI.mjs";
6
- import { a as round2, c as validateAndExtractRound2Response, i as persistRound2Packages, n as collectRound2Parallel, r as dispatchFinalizeRequestsParallel, s as updatePendingForFinalizeFromCollection, t as buildFinalizeRequestForParticipant } from "./round2-Bl2uK93U.mjs";
7
- import { t as finalize } from "./finalize-IA01t_Qq.mjs";
8
- import { i as resolveInviteEnvelope, n as receive, t as decodeInviteDetails } from "./receive-D2Nn68L7.mjs";
9
- import { t as round1$1 } from "./round1-CMLKN2RR.mjs";
10
- import { t as round2$1 } from "./round2-DOA3rnV-.mjs";
11
- import { t as finalize$1 } from "./finalize-EC3ikHQq.mjs";
12
- import { n as signingStateDir, r as signingStateDirForGroup, t as SignFinalizeContent } from "./common-DUWvtc08.mjs";
13
- import { a as invite$1, c as persistSessionState, i as gatherRecipientDocuments, l as validateCoordinator, n as buildSignInviteRequest, r as createSessionArids, s as loadEnvelopeFromPath, t as buildSessionStateJson } from "./invite-RU-OXTNS.mjs";
14
- import { a as round1$2, c as validateAndExtractCommitResponse, i as persistCommitments, n as collectCommitmentsParallel, r as dispatchShareRequestsParallel, s as updatePendingForShare, t as buildShareRequestForParticipant } from "./round1-7v9LlE11.mjs";
15
- import { t as round2$2 } from "./round2-Dg24w-TU.mjs";
16
- import { t as receive$1 } from "./receive-DA_KQEgk.mjs";
17
- import { t as round1$3 } from "./round1-CcQCGlIT.mjs";
18
- import { t as round2$3 } from "./round2-BkNRCXgS.mjs";
19
- import { t as finalize$2 } from "./finalize-CNTDj6aS.mjs";
20
- import "./registry-BpCwtrRt.mjs";
1
+ import { t as __exportAll } from "./chunk-z9aeyW2b.mjs";
2
+ import { a as dkgStateDir, c as parseAridUr, d as resolveOwnerXidDocument, f as resolveParticipants, h as signingKeyFromVerifying, i as buildGroupParticipants, l as parseEnvelopeUr, m as resolveSenderName, o as formatNameWithOwnerMarker, p as resolveSender, s as groupParticipantFromRegistry, t as groupStateDir, u as participantNamesFromRegistry } from "./common-Cf1UvJaP.mjs";
3
+ import "./registry-DGjs4qDK.mjs";
4
+ import { t as invite } from "./invite-Be2v2SVc.mjs";
5
+ import { t as round1 } from "./round1-BOIE1E4O.mjs";
6
+ import { a as round2, c as validateAndExtractRound2Response, i as persistRound2Packages, n as collectRound2Parallel, r as dispatchFinalizeRequestsParallel, s as updatePendingForFinalizeFromCollection, t as buildFinalizeRequestForParticipant } from "./round2-BfetYacV.mjs";
7
+ import { t as finalize } from "./finalize-DtRxHZ7H.mjs";
8
+ import { i as resolveInviteEnvelope, n as receive, t as decodeInviteDetails } from "./receive-dkSCSGpl.mjs";
9
+ import { t as round1$1 } from "./round1-Y2kcVwnR.mjs";
10
+ import { t as round2$1 } from "./round2-mF6UlkT-.mjs";
11
+ import { t as finalize$1 } from "./finalize-T83Ko8nG.mjs";
12
+ import { n as signingStateDir, r as signingStateDirForGroup, t as SignFinalizeContent } from "./common-DNrD_-EI.mjs";
13
+ import { a as invite$1, c as persistSessionState, i as gatherRecipientDocuments, l as validateCoordinator, n as buildSignInviteRequest, r as createSessionArids, s as loadEnvelopeFromPath, t as buildSessionStateJson } from "./invite-D8mQSnFz.mjs";
14
+ import { a as round1$2, c as validateAndExtractCommitResponse, i as persistCommitments, n as collectCommitmentsParallel, r as dispatchShareRequestsParallel, s as updatePendingForShare, t as buildShareRequestForParticipant } from "./round1-D8t7EzIo.mjs";
15
+ import { t as round2$2 } from "./round2-Cf5CJc_8.mjs";
16
+ import { t as receive$1 } from "./receive-g8EhZF2Y.mjs";
17
+ import { t as round1$3 } from "./round1-B8haiMM8.mjs";
18
+ import { t as round2$3 } from "./round2-Z2JhMwxc.mjs";
19
+ import { t as finalize$2 } from "./finalize-BpC0rz93.mjs";
21
20
  //#region src/cmd/check.ts
22
21
  /**
23
22
  * Check if an ARID exists in storage.
@@ -110,4 +109,4 @@ var sign_exports = /* @__PURE__ */ __exportAll({
110
109
  //#endregion
111
110
  export { dkg_exports as n, checkAridExists as r, sign_exports as t };
112
111
 
113
- //# sourceMappingURL=cmd-CS1uJtuD.mjs.map
112
+ //# sourceMappingURL=cmd-DNsHd19v.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmd-CS1uJtuD.mjs","names":[],"sources":["../src/cmd/check.ts","../src/cmd/dkg/coordinator/index.ts","../src/cmd/dkg/participant/index.ts","../src/cmd/dkg/index.ts","../src/cmd/sign/coordinator/index.ts","../src/cmd/sign/participant/index.ts","../src/cmd/sign/index.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Check command utilities.\n *\n * Port of cmd/check.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Check if an ARID exists in storage.\n *\n * Port of check functionality from cmd/check.rs.\n */\nexport async function checkAridExists(client: StorageClient, arid: ARID): Promise<boolean> {\n return client.exists(arid);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG coordinator commands.\n *\n * Port of cmd/dkg/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG participant commands.\n *\n * Port of cmd/dkg/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG command module.\n *\n * Port of cmd/dkg/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign coordinator commands.\n *\n * Port of cmd/sign/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign participant commands.\n *\n * Port of cmd/sign/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign command module.\n *\n * Port of cmd/sign/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,eAAsB,gBAAgB,QAAuB,MAA8B;AACzF,QAAO,OAAO,OAAO,KAAK"}
1
+ {"version":3,"file":"cmd-DNsHd19v.mjs","names":[],"sources":["../src/cmd/check.ts","../src/cmd/dkg/coordinator/index.ts","../src/cmd/dkg/participant/index.ts","../src/cmd/dkg/index.ts","../src/cmd/sign/coordinator/index.ts","../src/cmd/sign/participant/index.ts","../src/cmd/sign/index.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Check command utilities.\n *\n * Port of cmd/check.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { type ARID } from \"@bcts/components\";\n\nimport { type StorageClient } from \"./storage.js\";\n\n/**\n * Check if an ARID exists in storage.\n *\n * Port of check functionality from cmd/check.rs.\n */\nexport async function checkAridExists(client: StorageClient, arid: ARID): Promise<boolean> {\n return client.exists(arid);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG coordinator commands.\n *\n * Port of cmd/dkg/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG participant commands.\n *\n * Port of cmd/dkg/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * DKG command module.\n *\n * Port of cmd/dkg/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign coordinator commands.\n *\n * Port of cmd/sign/coordinator/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./invite.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign participant commands.\n *\n * Port of cmd/sign/participant/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./receive.js\";\nexport * from \"./round1.js\";\nexport * from \"./round2.js\";\nexport * from \"./finalize.js\";\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Sign command module.\n *\n * Port of cmd/sign/mod.rs from frost-hubert-rust.\n *\n * @module\n */\n\nexport * from \"./common.js\";\nexport * as coordinator from \"./coordinator/index.js\";\nexport * as participant from \"./participant/index.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,eAAsB,gBAAgB,QAAuB,MAA8B;CACzF,OAAO,OAAO,OAAO,IAAI;AAC3B"}
@@ -1,5 +1,4 @@
1
- require("./chunk-CZWwpsFl.cjs");
2
- const require_common = require("./common-lKP5EzHy.cjs");
1
+ const require_common = require("./common-CnvAUC2b.cjs");
3
2
  let _bcts_envelope = require("@bcts/envelope");
4
3
  //#region src/cmd/sign/common.ts
5
4
  /**
@@ -111,4 +110,4 @@ Object.defineProperty(exports, "signingStateDirForGroup", {
111
110
  }
112
111
  });
113
112
 
114
- //# sourceMappingURL=common-lThIvJmZ.cjs.map
113
+ //# sourceMappingURL=common-7-BOgaTt.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-lThIvJmZ.cjs","names":["groupStateDir","Envelope"],"sources":["../src/cmd/sign/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for sign commands.\n *\n * Port of cmd/sign/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { Envelope, type EnvelopeEncodableValue } from \"@bcts/envelope\";\n\nimport { groupStateDir } from \"../common\";\n\n/**\n * Get the signing state directory for a group (without session).\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing`\n *\n * Port of `signing_state_dir_for_group()` from cmd/sign/common.rs.\n */\nexport function signingStateDirForGroup(registryPath: string, groupIdHex: string): string {\n return `${groupStateDir(registryPath, groupIdHex)}/signing`;\n}\n\n/**\n * Get the signing state directory for a given registry path, group ID, and session ID.\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing/{session_id.hex()}`\n *\n * Port of `signing_state_dir()` from cmd/sign/common.rs.\n */\nexport function signingStateDir(\n registryPath: string,\n groupIdHex: string,\n sessionIdHex: string,\n): string {\n return `${signingStateDirForGroup(registryPath, groupIdHex)}/${sessionIdHex}`;\n}\n\n/**\n * Content wrapper for signFinalize events.\n *\n * This wraps an envelope with a unit subject and type assertion\n * \"signFinalize\", implementing the traits required by SealedEvent<T>.\n *\n * Port of `struct SignFinalizeContent` from cmd/sign/common.rs.\n */\nexport class SignFinalizeContent {\n private readonly _envelope: Envelope;\n\n private constructor(envelope: Envelope) {\n this._envelope = envelope;\n }\n\n /**\n * Creates a new SignFinalizeContent with a unit subject and type assertion.\n *\n * Port of `SignFinalizeContent::new()` from cmd/sign/common.rs.\n */\n static new(): SignFinalizeContent {\n const envelope = Envelope.unit().addType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Adds an assertion to the content envelope.\n *\n * Port of `SignFinalizeContent::add_assertion()` from cmd/sign/common.rs.\n */\n addAssertion(\n predicate: EnvelopeEncodableValue,\n object: EnvelopeEncodableValue,\n ): SignFinalizeContent {\n const newEnvelope = this._envelope.addAssertion(predicate, object);\n return new SignFinalizeContent(newEnvelope);\n }\n\n /**\n * Returns the inner envelope.\n *\n * Port of `SignFinalizeContent::envelope()` from cmd/sign/common.rs.\n */\n envelope(): Envelope {\n return this._envelope;\n }\n\n /**\n * Creates a SignFinalizeContent from an envelope with validation.\n *\n * Validates that the envelope has a unit subject and type \"signFinalize\".\n *\n * Port of `TryFrom<Envelope> for SignFinalizeContent` from cmd/sign/common.rs.\n */\n static fromEnvelope(envelope: Envelope): SignFinalizeContent {\n // Validate it has a unit subject and type \"signFinalize\"\n envelope.checkSubjectUnit();\n envelope.checkType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Converts this SignFinalizeContent to an Envelope.\n *\n * Port of `From<SignFinalizeContent> for Envelope` from cmd/sign/common.rs.\n */\n toEnvelope(): Envelope {\n return this._envelope;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,wBAAwB,cAAsB,YAA4B;AACxF,QAAO,GAAGA,eAAAA,cAAc,cAAc,WAAW,CAAC;;;;;;;;;AAUpD,SAAgB,gBACd,cACA,YACA,cACQ;AACR,QAAO,GAAG,wBAAwB,cAAc,WAAW,CAAC,GAAG;;;;;;;;;;AAWjE,IAAa,sBAAb,MAAa,oBAAoB;CAC/B;CAEA,YAAoB,UAAoB;AACtC,OAAK,YAAY;;;;;;;CAQnB,OAAO,MAA2B;AAEhC,SAAO,IAAI,oBADMC,eAAAA,SAAS,MAAM,CAAC,QAAQ,eACF,CAAC;;;;;;;CAQ1C,aACE,WACA,QACqB;AAErB,SAAO,IAAI,oBADS,KAAK,UAAU,aAAa,WAAW,OACjB,CAAC;;;;;;;CAQ7C,WAAqB;AACnB,SAAO,KAAK;;;;;;;;;CAUd,OAAO,aAAa,UAAyC;AAE3D,WAAS,kBAAkB;AAC3B,WAAS,UAAU,eAAe;AAClC,SAAO,IAAI,oBAAoB,SAAS;;;;;;;CAQ1C,aAAuB;AACrB,SAAO,KAAK"}
1
+ {"version":3,"file":"common-7-BOgaTt.cjs","names":["groupStateDir","Envelope"],"sources":["../src/cmd/sign/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for sign commands.\n *\n * Port of cmd/sign/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { Envelope, type EnvelopeEncodableValue } from \"@bcts/envelope\";\n\nimport { groupStateDir } from \"../common\";\n\n/**\n * Get the signing state directory for a group (without session).\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing`\n *\n * Port of `signing_state_dir_for_group()` from cmd/sign/common.rs.\n */\nexport function signingStateDirForGroup(registryPath: string, groupIdHex: string): string {\n return `${groupStateDir(registryPath, groupIdHex)}/signing`;\n}\n\n/**\n * Get the signing state directory for a given registry path, group ID, and session ID.\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing/{session_id.hex()}`\n *\n * Port of `signing_state_dir()` from cmd/sign/common.rs.\n */\nexport function signingStateDir(\n registryPath: string,\n groupIdHex: string,\n sessionIdHex: string,\n): string {\n return `${signingStateDirForGroup(registryPath, groupIdHex)}/${sessionIdHex}`;\n}\n\n/**\n * Content wrapper for signFinalize events.\n *\n * This wraps an envelope with a unit subject and type assertion\n * \"signFinalize\", implementing the traits required by SealedEvent<T>.\n *\n * Port of `struct SignFinalizeContent` from cmd/sign/common.rs.\n */\nexport class SignFinalizeContent {\n private readonly _envelope: Envelope;\n\n private constructor(envelope: Envelope) {\n this._envelope = envelope;\n }\n\n /**\n * Creates a new SignFinalizeContent with a unit subject and type assertion.\n *\n * Port of `SignFinalizeContent::new()` from cmd/sign/common.rs.\n */\n static new(): SignFinalizeContent {\n const envelope = Envelope.unit().addType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Adds an assertion to the content envelope.\n *\n * Port of `SignFinalizeContent::add_assertion()` from cmd/sign/common.rs.\n */\n addAssertion(\n predicate: EnvelopeEncodableValue,\n object: EnvelopeEncodableValue,\n ): SignFinalizeContent {\n const newEnvelope = this._envelope.addAssertion(predicate, object);\n return new SignFinalizeContent(newEnvelope);\n }\n\n /**\n * Returns the inner envelope.\n *\n * Port of `SignFinalizeContent::envelope()` from cmd/sign/common.rs.\n */\n envelope(): Envelope {\n return this._envelope;\n }\n\n /**\n * Creates a SignFinalizeContent from an envelope with validation.\n *\n * Validates that the envelope has a unit subject and type \"signFinalize\".\n *\n * Port of `TryFrom<Envelope> for SignFinalizeContent` from cmd/sign/common.rs.\n */\n static fromEnvelope(envelope: Envelope): SignFinalizeContent {\n // Validate it has a unit subject and type \"signFinalize\"\n envelope.checkSubjectUnit();\n envelope.checkType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Converts this SignFinalizeContent to an Envelope.\n *\n * Port of `From<SignFinalizeContent> for Envelope` from cmd/sign/common.rs.\n */\n toEnvelope(): Envelope {\n return this._envelope;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,wBAAwB,cAAsB,YAA4B;CACxF,OAAO,GAAGA,eAAAA,cAAc,cAAc,UAAU,EAAE;AACpD;;;;;;;;AASA,SAAgB,gBACd,cACA,YACA,cACQ;CACR,OAAO,GAAG,wBAAwB,cAAc,UAAU,EAAE,GAAG;AACjE;;;;;;;;;AAUA,IAAa,sBAAb,MAAa,oBAAoB;CAC/B;CAEA,YAAoB,UAAoB;EACtC,KAAK,YAAY;CACnB;;;;;;CAOA,OAAO,MAA2B;EAEhC,OAAO,IAAI,oBADMC,eAAAA,SAAS,KAAK,EAAE,QAAQ,cACH,CAAC;CACzC;;;;;;CAOA,aACE,WACA,QACqB;EAErB,OAAO,IAAI,oBADS,KAAK,UAAU,aAAa,WAAW,MAClB,CAAC;CAC5C;;;;;;CAOA,WAAqB;EACnB,OAAO,KAAK;CACd;;;;;;;;CASA,OAAO,aAAa,UAAyC;EAE3D,SAAS,iBAAiB;EAC1B,SAAS,UAAU,cAAc;EACjC,OAAO,IAAI,oBAAoB,QAAQ;CACzC;;;;;;CAOA,aAAuB;EACrB,OAAO,KAAK;CACd;AACF"}
@@ -1,5 +1,5 @@
1
- import { n as __require } from "./chunk-CjcI7cDX.mjs";
2
- import { n as compareXidBytes } from "./proposed-participant-cWM7iUrO.mjs";
1
+ import { n as __require } from "./chunk-z9aeyW2b.mjs";
2
+ import { n as compareXidBytes } from "./proposed-participant-Detb823_.mjs";
3
3
  import { GroupParticipant } from "./registry/index.mjs";
4
4
  import { UR } from "@bcts/uniform-resources";
5
5
  import * as path from "node:path";
@@ -279,4 +279,4 @@ function isVerbose() {
279
279
  //#endregion
280
280
  export { dkgStateDir as a, parseAridUr as c, resolveOwnerXidDocument as d, resolveParticipants as f, signingKeyFromVerifying as h, buildGroupParticipants as i, parseEnvelopeUr as l, resolveSenderName as m, isVerbose as n, formatNameWithOwnerMarker as o, resolveSender as p, setVerbose as r, groupParticipantFromRegistry as s, groupStateDir as t, participantNamesFromRegistry as u };
281
281
 
282
- //# sourceMappingURL=common-CvH6dFvQ.mjs.map
282
+ //# sourceMappingURL=common-Cf1UvJaP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-CvH6dFvQ.mjs","names":[],"sources":["../src/cmd/dkg/common.ts","../src/cmd/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for DKG commands.\n *\n * Port of cmd/dkg/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nimport { type ARID, type XID } from \"@bcts/components\";\nimport { compareXidBytes } from \"../../dkg/proposed-participant.js\";\nimport { type Envelope } from \"@bcts/envelope\";\nimport { UR } from \"@bcts/uniform-resources\";\nimport { type XIDDocument } from \"@bcts/xid\";\n\nimport {\n GroupParticipant,\n type OwnerRecord,\n type ParticipantRecord,\n type Registry,\n} from \"../../registry/index.js\";\n\n// Re-export cross-cutting utilities for convenience\nexport { groupStateDir } from \"../common.js\";\n\n/**\n * Parse an ARID from a UR string.\n *\n * Mirrors Rust `parse_arid_ur` (`cmd/common.rs:27-43`):\n *\n * 1. Trim and reject empty input.\n * 2. Parse as a UR; require `ur_type` of `\"arid\"`.\n * 3. Try `ARID::try_from(cbor)` (the tagged-CBOR form).\n * 4. If that fails, fall back to interpreting the CBOR as a bare\n * byte string and constructing the ARID from those bytes via\n * `ARID::from_data_ref`.\n *\n * The earlier port only accepted the tagged form; this matches Rust\n * by accepting the byte-string fallback too.\n */\nexport function parseAridUr(urString: string): ARID {\n const trimmed = urString.trim();\n if (trimmed.length === 0) {\n throw new Error(\"ARID is required\");\n }\n const ur = UR.fromURString(trimmed);\n\n if (ur.urTypeStr() !== \"arid\") {\n throw new Error(`Expected a ur:arid, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { ARID: ARIDClass } = require(\"@bcts/components\");\n const cbor = ur.cbor();\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromTaggedCbor(cbor);\n } catch {\n // Fall back to a bare byte string payload, mirroring Rust's\n // `CBOR::try_into_byte_string(cbor) → ARID::from_data_ref(bytes)`.\n const bytes = (cbor as { asByteString(): Uint8Array | undefined }).asByteString?.();\n if (bytes === undefined) {\n throw new Error(\"Invalid ARID payload\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromData(bytes);\n }\n}\n\n/**\n * Parse an envelope from a UR string.\n *\n * Port of `parse_envelope_ur()` from cmd/dkg/common.rs.\n */\nexport function parseEnvelopeUr(urString: string): Envelope {\n const ur = UR.fromURString(urString.trim());\n\n if (ur.urTypeStr() !== \"envelope\") {\n throw new Error(`Expected ur:envelope, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { Envelope: EnvelopeClass } = require(\"@bcts/envelope\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return EnvelopeClass.fromCbor(ur.cbor());\n}\n\n/**\n * Resolve the registry owner's XID document.\n *\n * The earlier port called this `resolveSender(registry)`, but its\n * behaviour — \"give me the owner\" — has nothing in common with Rust's\n * `resolve_sender(registry, input)` (which resolves an arbitrary\n * named sender). This helper is renamed to its actual behaviour;\n * the Rust-equivalent `resolveSender(registry, input)` lives below.\n */\nexport function resolveOwnerXidDocument(registry: Registry): XIDDocument {\n const owner = registry.owner();\n\n if (!owner) {\n throw new Error(\"No owner set in registry. Run 'registry owner set' first.\");\n }\n\n return owner.xidDocument();\n}\n\n/**\n * Resolve a sender XID document from the registry by UR or pet name.\n *\n * Mirrors Rust `resolve_sender(registry, input)`\n * (`cmd/dkg/common.rs:76-94`):\n *\n * 1. Trim and reject empty input.\n * 2. Try parsing the input as a `ur:xid`. If that succeeds, look it\n * up via `registry.participant(xid)`; if no record is found,\n * error with `Sender with XID {ur} not found`.\n * 3. Otherwise look it up by pet name via\n * `registry.participantByPetName(name)`; if no record is found,\n * error with `Sender with pet name '{name}' not found`.\n *\n * Note Rust does NOT check the owner here — only the participants\n * map. The earlier inline duplicate in `participant/round1.ts` did\n * an extra owner-check fallback which is removed to match Rust.\n */\nexport function resolveSender(registry: Registry, input: string): XIDDocument {\n const trimmed = input.trim();\n if (trimmed.length === 0) {\n throw new Error(\"Sender is required\");\n }\n\n // Try parsing as an XID UR string first. `XID.fromURString` throws\n // when the input isn't a `ur:xid`; that's the signal to fall back\n // to pet-name lookup.\n let xid: XID | undefined;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n } catch {\n xid = undefined;\n }\n\n if (xid !== undefined) {\n const record = registry.participant(xid);\n if (record !== undefined) {\n return record.xidDocument();\n }\n throw new Error(`Sender with XID ${xid.urString()} not found`);\n }\n\n const result = registry.participantByPetName(trimmed);\n if (result !== undefined) {\n const [, record] = result;\n return record.xidDocument();\n }\n throw new Error(`Sender with pet name '${trimmed}' not found`);\n}\n\n// -----------------------------------------------------------------------------\n// Participant resolution\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve participant identifiers (XID URs or pet names) to records.\n *\n * Port of `resolve_participants()` from cmd/dkg/common.rs lines 29-74.\n */\nexport function resolveParticipants(\n registry: Registry,\n inputs: string[],\n): [XID, ParticipantRecord][] {\n const seenArgs = new Set<string>();\n const seenXids = new Set<string>();\n const resolved: [XID, ParticipantRecord][] = [];\n\n for (const raw of inputs) {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n throw new Error(\"Participant identifier cannot be empty\");\n }\n if (seenArgs.has(trimmed)) {\n throw new Error(`Duplicate participant argument: ${trimmed}`);\n }\n seenArgs.add(trimmed);\n\n let xid: XID;\n let record: ParticipantRecord;\n\n // Try parsing as XID UR first\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n\n const foundRecord = registry.participant(xid);\n if (!foundRecord) {\n throw new Error(`Participant with XID ${xid.urString()} not found in registry`);\n }\n record = foundRecord;\n } catch {\n // Try looking up by pet name\n const result = registry.participantByPetName(trimmed);\n if (!result) {\n throw new Error(`Participant with pet name '${trimmed}' not found`);\n }\n [xid, record] = result;\n }\n\n const xidUr = xid.urString();\n if (seenXids.has(xidUr)) {\n throw new Error(`Duplicate participant specified; multiple inputs resolve to ${xidUr}`);\n }\n seenXids.add(xidUr);\n\n resolved.push([xid, record]);\n }\n\n return resolved;\n}\n\n/**\n * Get display name for sender from registry.\n *\n * Port of `resolve_sender_name()` from cmd/dkg/common.rs lines 96-116.\n */\nexport function resolveSenderName(registry: Registry, sender: XIDDocument): string | undefined {\n const owner = registry.owner();\n const senderXid = sender.xid();\n\n // Check if sender is the owner\n if (owner?.xidDocument().xid().urString() === senderXid.urString()) {\n const name = owner.petName() ?? senderXid.urString();\n return formatNameWithOwnerMarker(name, true);\n }\n\n // Look up in participants\n const record = registry.participant(senderXid);\n if (record) {\n const name = record.petName() ?? record.xid().urString();\n return formatNameWithOwnerMarker(name, false);\n }\n\n return undefined;\n}\n\n// -----------------------------------------------------------------------------\n// Group participant building\n// -----------------------------------------------------------------------------\n\n/**\n * Build GroupParticipant[] from XIDDocuments using registry lookups.\n *\n * Port of `build_group_participants()` from cmd/dkg/common.rs lines 122-131.\n */\nexport function buildGroupParticipants(\n registry: Registry,\n owner: OwnerRecord,\n participants: XIDDocument[],\n): GroupParticipant[] {\n return participants.map((doc) => groupParticipantFromRegistry(registry, owner, doc));\n}\n\n/**\n * Create a GroupParticipant from a XIDDocument, validating against the registry.\n *\n * Port of `group_participant_from_registry()` from cmd/dkg/common.rs lines 133-149.\n */\nexport function groupParticipantFromRegistry(\n registry: Registry,\n owner: OwnerRecord,\n document: XIDDocument,\n): GroupParticipant {\n const xid = document.xid();\n\n // If the document is the owner, allow it\n if (xid.urString() === owner.xid().urString()) {\n return new GroupParticipant(xid);\n }\n\n // Otherwise, verify the participant is in the registry\n if (!registry.participant(xid)) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n\n return new GroupParticipant(xid);\n}\n\n// -----------------------------------------------------------------------------\n// Name formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Format a participant name with owner marker if applicable.\n *\n * Port of `format_name_with_owner_marker()` from cmd/dkg/common.rs lines 155-157.\n */\nexport function formatNameWithOwnerMarker(name: string, isOwner: boolean): string {\n return isOwner ? `* ${name}` : name;\n}\n\n/**\n * Get display names for participants, sorted by XID, with owner marked.\n *\n * Port of `participant_names_from_registry()` from cmd/dkg/common.rs lines 159-191.\n */\nexport function participantNamesFromRegistry(\n registry: Registry,\n participants: XIDDocument[],\n ownerXid: XID,\n ownerPetName: string | undefined,\n): string[] {\n // Sort by XID byte order — mirrors Rust `XID::cmp` (raw 32-byte\n // lex compare). The earlier port used\n // `urString().localeCompare(...)`, which diverges from byte order\n // for bytes ≥ 0x80 and is locale-aware.\n const sorted = [...participants].sort((a, b) =>\n compareXidBytes(a.xid().toData(), b.xid().toData()),\n );\n\n return sorted.map((document) => {\n const xid = document.xid();\n const isOwner = xid.urString() === ownerXid.urString();\n\n let name: string;\n if (isOwner) {\n name = ownerPetName ?? xid.urString();\n } else {\n const record = registry.participant(xid);\n if (!record) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n name = record.petName() ?? xid.urString();\n }\n\n return formatNameWithOwnerMarker(name, isOwner);\n });\n}\n\n/**\n * Get the DKG state directory for a given registry path and group ID.\n *\n * Port of `dkg_state_dir()` from cmd/dkg/common.rs.\n */\nexport function dkgStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex, \"dkg\");\n}\n\n/**\n * Convert a verifying key bytes to a SigningPublicKey.\n *\n * Port of `signing_key_from_verifying()` from cmd/dkg/common.rs.\n */\nexport function signingKeyFromVerifying(verifyingKeyBytes: Uint8Array): unknown {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { SigningPublicKey: SigningPublicKeyClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return SigningPublicKeyClass.fromBytes(verifyingKeyBytes);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for commands.\n *\n * Port of `cmd/common.rs` from `frost-hubert-rust`.\n *\n * Rust's `cmd::common` exports four cross-cutting helpers used by\n * both the DKG and signing subcommand trees:\n *\n * - `parse_arid_ur` / `signing_key_from_verifying` — re-exported\n * here so the TS module layout matches Rust. The implementations\n * live alongside their other DKG-specific siblings in\n * `cmd/dkg/common.ts` so callers in either tree can keep using\n * them; this file just surfaces them at the parallel-to-Rust\n * import path (`@bcts/frost-hubert/cmd/common`).\n * - `group_state_dir` and the verbose-flag helpers are TS-native here.\n *\n * `OptionalStorageSelector` is intentionally not ported: it's a\n * `clap`-specific argument struct and the TS port surfaces the same\n * effect via the `StorageSelection` string-literal union — see the\n * `parity audit` for context.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nexport { parseAridUr, signingKeyFromVerifying } from \"./dkg/common.js\";\n\n/**\n * Get the group state directory for a given registry path and group ID.\n *\n * Port of `group_state_dir()` from cmd/common.rs.\n */\nexport function groupStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex);\n}\n\n/**\n * Global verbose flag.\n */\nlet verboseFlag = false;\n\n/**\n * Set the verbose flag.\n */\nexport function setVerbose(value: boolean): void {\n verboseFlag = value;\n}\n\n/**\n * Check if verbose mode is enabled.\n *\n * Port of `is_verbose()` from cmd/common.rs.\n */\nexport function isVerbose(): boolean {\n return verboseFlag;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,YAAY,UAAwB;CAClD,MAAM,UAAU,SAAS,MAAM;AAC/B,KAAI,QAAQ,WAAW,EACrB,OAAM,IAAI,MAAM,mBAAmB;CAErC,MAAM,KAAK,GAAG,aAAa,QAAQ;AAEnC,KAAI,GAAG,WAAW,KAAK,OACrB,OAAM,IAAI,MAAM,gCAAgC,GAAG,WAAW,G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CAE9E,MAAM,EAAE,kBAAkB,0BAAA,UAAkC,mBAAmB;AAE/E,QAAO,sBAAsB,UAAU,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvU3D,SAAgB,cAAc,cAAsB,YAA4B;CAC9E,MAAM,OAAO,KAAK,QAAQ,aAAa;AACvC,QAAO,KAAK,KAAK,MAAM,eAAe,WAAW;;;;;AAMnD,IAAI,cAAc;;;;AAKlB,SAAgB,WAAW,OAAsB;AAC/C,eAAc;;;;;;;AAQhB,SAAgB,YAAqB;AACnC,QAAO"}
1
+ {"version":3,"file":"common-Cf1UvJaP.mjs","names":[],"sources":["../src/cmd/dkg/common.ts","../src/cmd/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for DKG commands.\n *\n * Port of cmd/dkg/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nimport { type ARID, type XID } from \"@bcts/components\";\nimport { compareXidBytes } from \"../../dkg/proposed-participant.js\";\nimport { type Envelope } from \"@bcts/envelope\";\nimport { UR } from \"@bcts/uniform-resources\";\nimport { type XIDDocument } from \"@bcts/xid\";\n\nimport {\n GroupParticipant,\n type OwnerRecord,\n type ParticipantRecord,\n type Registry,\n} from \"../../registry/index.js\";\n\n// Re-export cross-cutting utilities for convenience\nexport { groupStateDir } from \"../common.js\";\n\n/**\n * Parse an ARID from a UR string.\n *\n * Mirrors Rust `parse_arid_ur` (`cmd/common.rs:27-43`):\n *\n * 1. Trim and reject empty input.\n * 2. Parse as a UR; require `ur_type` of `\"arid\"`.\n * 3. Try `ARID::try_from(cbor)` (the tagged-CBOR form).\n * 4. If that fails, fall back to interpreting the CBOR as a bare\n * byte string and constructing the ARID from those bytes via\n * `ARID::from_data_ref`.\n *\n * The earlier port only accepted the tagged form; this matches Rust\n * by accepting the byte-string fallback too.\n */\nexport function parseAridUr(urString: string): ARID {\n const trimmed = urString.trim();\n if (trimmed.length === 0) {\n throw new Error(\"ARID is required\");\n }\n const ur = UR.fromURString(trimmed);\n\n if (ur.urTypeStr() !== \"arid\") {\n throw new Error(`Expected a ur:arid, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { ARID: ARIDClass } = require(\"@bcts/components\");\n const cbor = ur.cbor();\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromTaggedCbor(cbor);\n } catch {\n // Fall back to a bare byte string payload, mirroring Rust's\n // `CBOR::try_into_byte_string(cbor) → ARID::from_data_ref(bytes)`.\n const bytes = (cbor as { asByteString(): Uint8Array | undefined }).asByteString?.();\n if (bytes === undefined) {\n throw new Error(\"Invalid ARID payload\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromData(bytes);\n }\n}\n\n/**\n * Parse an envelope from a UR string.\n *\n * Port of `parse_envelope_ur()` from cmd/dkg/common.rs.\n */\nexport function parseEnvelopeUr(urString: string): Envelope {\n const ur = UR.fromURString(urString.trim());\n\n if (ur.urTypeStr() !== \"envelope\") {\n throw new Error(`Expected ur:envelope, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { Envelope: EnvelopeClass } = require(\"@bcts/envelope\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return EnvelopeClass.fromCbor(ur.cbor());\n}\n\n/**\n * Resolve the registry owner's XID document.\n *\n * The earlier port called this `resolveSender(registry)`, but its\n * behaviour — \"give me the owner\" — has nothing in common with Rust's\n * `resolve_sender(registry, input)` (which resolves an arbitrary\n * named sender). This helper is renamed to its actual behaviour;\n * the Rust-equivalent `resolveSender(registry, input)` lives below.\n */\nexport function resolveOwnerXidDocument(registry: Registry): XIDDocument {\n const owner = registry.owner();\n\n if (!owner) {\n throw new Error(\"No owner set in registry. Run 'registry owner set' first.\");\n }\n\n return owner.xidDocument();\n}\n\n/**\n * Resolve a sender XID document from the registry by UR or pet name.\n *\n * Mirrors Rust `resolve_sender(registry, input)`\n * (`cmd/dkg/common.rs:76-94`):\n *\n * 1. Trim and reject empty input.\n * 2. Try parsing the input as a `ur:xid`. If that succeeds, look it\n * up via `registry.participant(xid)`; if no record is found,\n * error with `Sender with XID {ur} not found`.\n * 3. Otherwise look it up by pet name via\n * `registry.participantByPetName(name)`; if no record is found,\n * error with `Sender with pet name '{name}' not found`.\n *\n * Note Rust does NOT check the owner here — only the participants\n * map. The earlier inline duplicate in `participant/round1.ts` did\n * an extra owner-check fallback which is removed to match Rust.\n */\nexport function resolveSender(registry: Registry, input: string): XIDDocument {\n const trimmed = input.trim();\n if (trimmed.length === 0) {\n throw new Error(\"Sender is required\");\n }\n\n // Try parsing as an XID UR string first. `XID.fromURString` throws\n // when the input isn't a `ur:xid`; that's the signal to fall back\n // to pet-name lookup.\n let xid: XID | undefined;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n } catch {\n xid = undefined;\n }\n\n if (xid !== undefined) {\n const record = registry.participant(xid);\n if (record !== undefined) {\n return record.xidDocument();\n }\n throw new Error(`Sender with XID ${xid.urString()} not found`);\n }\n\n const result = registry.participantByPetName(trimmed);\n if (result !== undefined) {\n const [, record] = result;\n return record.xidDocument();\n }\n throw new Error(`Sender with pet name '${trimmed}' not found`);\n}\n\n// -----------------------------------------------------------------------------\n// Participant resolution\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve participant identifiers (XID URs or pet names) to records.\n *\n * Port of `resolve_participants()` from cmd/dkg/common.rs lines 29-74.\n */\nexport function resolveParticipants(\n registry: Registry,\n inputs: string[],\n): [XID, ParticipantRecord][] {\n const seenArgs = new Set<string>();\n const seenXids = new Set<string>();\n const resolved: [XID, ParticipantRecord][] = [];\n\n for (const raw of inputs) {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n throw new Error(\"Participant identifier cannot be empty\");\n }\n if (seenArgs.has(trimmed)) {\n throw new Error(`Duplicate participant argument: ${trimmed}`);\n }\n seenArgs.add(trimmed);\n\n let xid: XID;\n let record: ParticipantRecord;\n\n // Try parsing as XID UR first\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n\n const foundRecord = registry.participant(xid);\n if (!foundRecord) {\n throw new Error(`Participant with XID ${xid.urString()} not found in registry`);\n }\n record = foundRecord;\n } catch {\n // Try looking up by pet name\n const result = registry.participantByPetName(trimmed);\n if (!result) {\n throw new Error(`Participant with pet name '${trimmed}' not found`);\n }\n [xid, record] = result;\n }\n\n const xidUr = xid.urString();\n if (seenXids.has(xidUr)) {\n throw new Error(`Duplicate participant specified; multiple inputs resolve to ${xidUr}`);\n }\n seenXids.add(xidUr);\n\n resolved.push([xid, record]);\n }\n\n return resolved;\n}\n\n/**\n * Get display name for sender from registry.\n *\n * Port of `resolve_sender_name()` from cmd/dkg/common.rs lines 96-116.\n */\nexport function resolveSenderName(registry: Registry, sender: XIDDocument): string | undefined {\n const owner = registry.owner();\n const senderXid = sender.xid();\n\n // Check if sender is the owner\n if (owner?.xidDocument().xid().urString() === senderXid.urString()) {\n const name = owner.petName() ?? senderXid.urString();\n return formatNameWithOwnerMarker(name, true);\n }\n\n // Look up in participants\n const record = registry.participant(senderXid);\n if (record) {\n const name = record.petName() ?? record.xid().urString();\n return formatNameWithOwnerMarker(name, false);\n }\n\n return undefined;\n}\n\n// -----------------------------------------------------------------------------\n// Group participant building\n// -----------------------------------------------------------------------------\n\n/**\n * Build GroupParticipant[] from XIDDocuments using registry lookups.\n *\n * Port of `build_group_participants()` from cmd/dkg/common.rs lines 122-131.\n */\nexport function buildGroupParticipants(\n registry: Registry,\n owner: OwnerRecord,\n participants: XIDDocument[],\n): GroupParticipant[] {\n return participants.map((doc) => groupParticipantFromRegistry(registry, owner, doc));\n}\n\n/**\n * Create a GroupParticipant from a XIDDocument, validating against the registry.\n *\n * Port of `group_participant_from_registry()` from cmd/dkg/common.rs lines 133-149.\n */\nexport function groupParticipantFromRegistry(\n registry: Registry,\n owner: OwnerRecord,\n document: XIDDocument,\n): GroupParticipant {\n const xid = document.xid();\n\n // If the document is the owner, allow it\n if (xid.urString() === owner.xid().urString()) {\n return new GroupParticipant(xid);\n }\n\n // Otherwise, verify the participant is in the registry\n if (!registry.participant(xid)) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n\n return new GroupParticipant(xid);\n}\n\n// -----------------------------------------------------------------------------\n// Name formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Format a participant name with owner marker if applicable.\n *\n * Port of `format_name_with_owner_marker()` from cmd/dkg/common.rs lines 155-157.\n */\nexport function formatNameWithOwnerMarker(name: string, isOwner: boolean): string {\n return isOwner ? `* ${name}` : name;\n}\n\n/**\n * Get display names for participants, sorted by XID, with owner marked.\n *\n * Port of `participant_names_from_registry()` from cmd/dkg/common.rs lines 159-191.\n */\nexport function participantNamesFromRegistry(\n registry: Registry,\n participants: XIDDocument[],\n ownerXid: XID,\n ownerPetName: string | undefined,\n): string[] {\n // Sort by XID byte order — mirrors Rust `XID::cmp` (raw 32-byte\n // lex compare). The earlier port used\n // `urString().localeCompare(...)`, which diverges from byte order\n // for bytes ≥ 0x80 and is locale-aware.\n const sorted = [...participants].sort((a, b) =>\n compareXidBytes(a.xid().toData(), b.xid().toData()),\n );\n\n return sorted.map((document) => {\n const xid = document.xid();\n const isOwner = xid.urString() === ownerXid.urString();\n\n let name: string;\n if (isOwner) {\n name = ownerPetName ?? xid.urString();\n } else {\n const record = registry.participant(xid);\n if (!record) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n name = record.petName() ?? xid.urString();\n }\n\n return formatNameWithOwnerMarker(name, isOwner);\n });\n}\n\n/**\n * Get the DKG state directory for a given registry path and group ID.\n *\n * Port of `dkg_state_dir()` from cmd/dkg/common.rs.\n */\nexport function dkgStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex, \"dkg\");\n}\n\n/**\n * Convert a verifying key bytes to a SigningPublicKey.\n *\n * Port of `signing_key_from_verifying()` from cmd/dkg/common.rs.\n */\nexport function signingKeyFromVerifying(verifyingKeyBytes: Uint8Array): unknown {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { SigningPublicKey: SigningPublicKeyClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return SigningPublicKeyClass.fromBytes(verifyingKeyBytes);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for commands.\n *\n * Port of `cmd/common.rs` from `frost-hubert-rust`.\n *\n * Rust's `cmd::common` exports four cross-cutting helpers used by\n * both the DKG and signing subcommand trees:\n *\n * - `parse_arid_ur` / `signing_key_from_verifying` — re-exported\n * here so the TS module layout matches Rust. The implementations\n * live alongside their other DKG-specific siblings in\n * `cmd/dkg/common.ts` so callers in either tree can keep using\n * them; this file just surfaces them at the parallel-to-Rust\n * import path (`@bcts/frost-hubert/cmd/common`).\n * - `group_state_dir` and the verbose-flag helpers are TS-native here.\n *\n * `OptionalStorageSelector` is intentionally not ported: it's a\n * `clap`-specific argument struct and the TS port surfaces the same\n * effect via the `StorageSelection` string-literal union — see the\n * `parity audit` for context.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nexport { parseAridUr, signingKeyFromVerifying } from \"./dkg/common.js\";\n\n/**\n * Get the group state directory for a given registry path and group ID.\n *\n * Port of `group_state_dir()` from cmd/common.rs.\n */\nexport function groupStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex);\n}\n\n/**\n * Global verbose flag.\n */\nlet verboseFlag = false;\n\n/**\n * Set the verbose flag.\n */\nexport function setVerbose(value: boolean): void {\n verboseFlag = value;\n}\n\n/**\n * Check if verbose mode is enabled.\n *\n * Port of `is_verbose()` from cmd/common.rs.\n */\nexport function isVerbose(): boolean {\n return verboseFlag;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,YAAY,UAAwB;CAClD,MAAM,UAAU,SAAS,KAAK;CAC9B,IAAI,QAAQ,WAAW,GACrB,MAAM,IAAI,MAAM,kBAAkB;CAEpC,MAAM,KAAK,GAAG,aAAa,OAAO;CAElC,IAAI,GAAG,UAAU,MAAM,QACrB,MAAM,IAAI,MAAM,gCAAgC,GAAG,UAAU,GAAG;CAIlE,MAAM,EAAE,MAAM,cAAA,UAAsB,kBAAkB;CACtD,MAAM,OAAO,GAAG,KAAK;CACrB,IAAI;EAEF,OAAO,UAAU,eAAe,IAAI;CACtC,QAAQ;EAGN,MAAM,QAAS,KAAoD,eAAe;EAClF,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,sBAAsB;EAGxC,OAAO,UAAU,SAAS,KAAK;CACjC;AACF;;;;;;AAOA,SAAgB,gBAAgB,UAA4B;CAC1D,MAAM,KAAK,GAAG,aAAa,SAAS,KAAK,CAAC;CAE1C,IAAI,GAAG,UAAU,MAAM,YACrB,MAAM,IAAI,MA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,cAAc;AAChB;;;;;;AAOA,SAAgB,YAAqB;CACnC,OAAO;AACT"}
@@ -1,5 +1,5 @@
1
- const require_chunk = require("./chunk-CZWwpsFl.cjs");
2
- const require_proposed_participant = require("./proposed-participant-Dm1Eq6mX.cjs");
1
+ const require_chunk = require("./chunk-DakpK96I.cjs");
2
+ const require_proposed_participant = require("./proposed-participant-BvHNnpcZ.cjs");
3
3
  const require_registry_index = require("./registry/index.cjs");
4
4
  let _bcts_uniform_resources = require("@bcts/uniform-resources");
5
5
  let node_path = require("node:path");
@@ -369,4 +369,4 @@ Object.defineProperty(exports, "signingKeyFromVerifying", {
369
369
  }
370
370
  });
371
371
 
372
- //# sourceMappingURL=common-lKP5EzHy.cjs.map
372
+ //# sourceMappingURL=common-CnvAUC2b.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-lKP5EzHy.cjs","names":["UR","GroupParticipant","compareXidBytes","path","path"],"sources":["../src/cmd/dkg/common.ts","../src/cmd/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for DKG commands.\n *\n * Port of cmd/dkg/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nimport { type ARID, type XID } from \"@bcts/components\";\nimport { compareXidBytes } from \"../../dkg/proposed-participant.js\";\nimport { type Envelope } from \"@bcts/envelope\";\nimport { UR } from \"@bcts/uniform-resources\";\nimport { type XIDDocument } from \"@bcts/xid\";\n\nimport {\n GroupParticipant,\n type OwnerRecord,\n type ParticipantRecord,\n type Registry,\n} from \"../../registry/index.js\";\n\n// Re-export cross-cutting utilities for convenience\nexport { groupStateDir } from \"../common.js\";\n\n/**\n * Parse an ARID from a UR string.\n *\n * Mirrors Rust `parse_arid_ur` (`cmd/common.rs:27-43`):\n *\n * 1. Trim and reject empty input.\n * 2. Parse as a UR; require `ur_type` of `\"arid\"`.\n * 3. Try `ARID::try_from(cbor)` (the tagged-CBOR form).\n * 4. If that fails, fall back to interpreting the CBOR as a bare\n * byte string and constructing the ARID from those bytes via\n * `ARID::from_data_ref`.\n *\n * The earlier port only accepted the tagged form; this matches Rust\n * by accepting the byte-string fallback too.\n */\nexport function parseAridUr(urString: string): ARID {\n const trimmed = urString.trim();\n if (trimmed.length === 0) {\n throw new Error(\"ARID is required\");\n }\n const ur = UR.fromURString(trimmed);\n\n if (ur.urTypeStr() !== \"arid\") {\n throw new Error(`Expected a ur:arid, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { ARID: ARIDClass } = require(\"@bcts/components\");\n const cbor = ur.cbor();\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromTaggedCbor(cbor);\n } catch {\n // Fall back to a bare byte string payload, mirroring Rust's\n // `CBOR::try_into_byte_string(cbor) → ARID::from_data_ref(bytes)`.\n const bytes = (cbor as { asByteString(): Uint8Array | undefined }).asByteString?.();\n if (bytes === undefined) {\n throw new Error(\"Invalid ARID payload\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromData(bytes);\n }\n}\n\n/**\n * Parse an envelope from a UR string.\n *\n * Port of `parse_envelope_ur()` from cmd/dkg/common.rs.\n */\nexport function parseEnvelopeUr(urString: string): Envelope {\n const ur = UR.fromURString(urString.trim());\n\n if (ur.urTypeStr() !== \"envelope\") {\n throw new Error(`Expected ur:envelope, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { Envelope: EnvelopeClass } = require(\"@bcts/envelope\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return EnvelopeClass.fromCbor(ur.cbor());\n}\n\n/**\n * Resolve the registry owner's XID document.\n *\n * The earlier port called this `resolveSender(registry)`, but its\n * behaviour — \"give me the owner\" — has nothing in common with Rust's\n * `resolve_sender(registry, input)` (which resolves an arbitrary\n * named sender). This helper is renamed to its actual behaviour;\n * the Rust-equivalent `resolveSender(registry, input)` lives below.\n */\nexport function resolveOwnerXidDocument(registry: Registry): XIDDocument {\n const owner = registry.owner();\n\n if (!owner) {\n throw new Error(\"No owner set in registry. Run 'registry owner set' first.\");\n }\n\n return owner.xidDocument();\n}\n\n/**\n * Resolve a sender XID document from the registry by UR or pet name.\n *\n * Mirrors Rust `resolve_sender(registry, input)`\n * (`cmd/dkg/common.rs:76-94`):\n *\n * 1. Trim and reject empty input.\n * 2. Try parsing the input as a `ur:xid`. If that succeeds, look it\n * up via `registry.participant(xid)`; if no record is found,\n * error with `Sender with XID {ur} not found`.\n * 3. Otherwise look it up by pet name via\n * `registry.participantByPetName(name)`; if no record is found,\n * error with `Sender with pet name '{name}' not found`.\n *\n * Note Rust does NOT check the owner here — only the participants\n * map. The earlier inline duplicate in `participant/round1.ts` did\n * an extra owner-check fallback which is removed to match Rust.\n */\nexport function resolveSender(registry: Registry, input: string): XIDDocument {\n const trimmed = input.trim();\n if (trimmed.length === 0) {\n throw new Error(\"Sender is required\");\n }\n\n // Try parsing as an XID UR string first. `XID.fromURString` throws\n // when the input isn't a `ur:xid`; that's the signal to fall back\n // to pet-name lookup.\n let xid: XID | undefined;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n } catch {\n xid = undefined;\n }\n\n if (xid !== undefined) {\n const record = registry.participant(xid);\n if (record !== undefined) {\n return record.xidDocument();\n }\n throw new Error(`Sender with XID ${xid.urString()} not found`);\n }\n\n const result = registry.participantByPetName(trimmed);\n if (result !== undefined) {\n const [, record] = result;\n return record.xidDocument();\n }\n throw new Error(`Sender with pet name '${trimmed}' not found`);\n}\n\n// -----------------------------------------------------------------------------\n// Participant resolution\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve participant identifiers (XID URs or pet names) to records.\n *\n * Port of `resolve_participants()` from cmd/dkg/common.rs lines 29-74.\n */\nexport function resolveParticipants(\n registry: Registry,\n inputs: string[],\n): [XID, ParticipantRecord][] {\n const seenArgs = new Set<string>();\n const seenXids = new Set<string>();\n const resolved: [XID, ParticipantRecord][] = [];\n\n for (const raw of inputs) {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n throw new Error(\"Participant identifier cannot be empty\");\n }\n if (seenArgs.has(trimmed)) {\n throw new Error(`Duplicate participant argument: ${trimmed}`);\n }\n seenArgs.add(trimmed);\n\n let xid: XID;\n let record: ParticipantRecord;\n\n // Try parsing as XID UR first\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n\n const foundRecord = registry.participant(xid);\n if (!foundRecord) {\n throw new Error(`Participant with XID ${xid.urString()} not found in registry`);\n }\n record = foundRecord;\n } catch {\n // Try looking up by pet name\n const result = registry.participantByPetName(trimmed);\n if (!result) {\n throw new Error(`Participant with pet name '${trimmed}' not found`);\n }\n [xid, record] = result;\n }\n\n const xidUr = xid.urString();\n if (seenXids.has(xidUr)) {\n throw new Error(`Duplicate participant specified; multiple inputs resolve to ${xidUr}`);\n }\n seenXids.add(xidUr);\n\n resolved.push([xid, record]);\n }\n\n return resolved;\n}\n\n/**\n * Get display name for sender from registry.\n *\n * Port of `resolve_sender_name()` from cmd/dkg/common.rs lines 96-116.\n */\nexport function resolveSenderName(registry: Registry, sender: XIDDocument): string | undefined {\n const owner = registry.owner();\n const senderXid = sender.xid();\n\n // Check if sender is the owner\n if (owner?.xidDocument().xid().urString() === senderXid.urString()) {\n const name = owner.petName() ?? senderXid.urString();\n return formatNameWithOwnerMarker(name, true);\n }\n\n // Look up in participants\n const record = registry.participant(senderXid);\n if (record) {\n const name = record.petName() ?? record.xid().urString();\n return formatNameWithOwnerMarker(name, false);\n }\n\n return undefined;\n}\n\n// -----------------------------------------------------------------------------\n// Group participant building\n// -----------------------------------------------------------------------------\n\n/**\n * Build GroupParticipant[] from XIDDocuments using registry lookups.\n *\n * Port of `build_group_participants()` from cmd/dkg/common.rs lines 122-131.\n */\nexport function buildGroupParticipants(\n registry: Registry,\n owner: OwnerRecord,\n participants: XIDDocument[],\n): GroupParticipant[] {\n return participants.map((doc) => groupParticipantFromRegistry(registry, owner, doc));\n}\n\n/**\n * Create a GroupParticipant from a XIDDocument, validating against the registry.\n *\n * Port of `group_participant_from_registry()` from cmd/dkg/common.rs lines 133-149.\n */\nexport function groupParticipantFromRegistry(\n registry: Registry,\n owner: OwnerRecord,\n document: XIDDocument,\n): GroupParticipant {\n const xid = document.xid();\n\n // If the document is the owner, allow it\n if (xid.urString() === owner.xid().urString()) {\n return new GroupParticipant(xid);\n }\n\n // Otherwise, verify the participant is in the registry\n if (!registry.participant(xid)) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n\n return new GroupParticipant(xid);\n}\n\n// -----------------------------------------------------------------------------\n// Name formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Format a participant name with owner marker if applicable.\n *\n * Port of `format_name_with_owner_marker()` from cmd/dkg/common.rs lines 155-157.\n */\nexport function formatNameWithOwnerMarker(name: string, isOwner: boolean): string {\n return isOwner ? `* ${name}` : name;\n}\n\n/**\n * Get display names for participants, sorted by XID, with owner marked.\n *\n * Port of `participant_names_from_registry()` from cmd/dkg/common.rs lines 159-191.\n */\nexport function participantNamesFromRegistry(\n registry: Registry,\n participants: XIDDocument[],\n ownerXid: XID,\n ownerPetName: string | undefined,\n): string[] {\n // Sort by XID byte order — mirrors Rust `XID::cmp` (raw 32-byte\n // lex compare). The earlier port used\n // `urString().localeCompare(...)`, which diverges from byte order\n // for bytes ≥ 0x80 and is locale-aware.\n const sorted = [...participants].sort((a, b) =>\n compareXidBytes(a.xid().toData(), b.xid().toData()),\n );\n\n return sorted.map((document) => {\n const xid = document.xid();\n const isOwner = xid.urString() === ownerXid.urString();\n\n let name: string;\n if (isOwner) {\n name = ownerPetName ?? xid.urString();\n } else {\n const record = registry.participant(xid);\n if (!record) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n name = record.petName() ?? xid.urString();\n }\n\n return formatNameWithOwnerMarker(name, isOwner);\n });\n}\n\n/**\n * Get the DKG state directory for a given registry path and group ID.\n *\n * Port of `dkg_state_dir()` from cmd/dkg/common.rs.\n */\nexport function dkgStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex, \"dkg\");\n}\n\n/**\n * Convert a verifying key bytes to a SigningPublicKey.\n *\n * Port of `signing_key_from_verifying()` from cmd/dkg/common.rs.\n */\nexport function signingKeyFromVerifying(verifyingKeyBytes: Uint8Array): unknown {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { SigningPublicKey: SigningPublicKeyClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return SigningPublicKeyClass.fromBytes(verifyingKeyBytes);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for commands.\n *\n * Port of `cmd/common.rs` from `frost-hubert-rust`.\n *\n * Rust's `cmd::common` exports four cross-cutting helpers used by\n * both the DKG and signing subcommand trees:\n *\n * - `parse_arid_ur` / `signing_key_from_verifying` — re-exported\n * here so the TS module layout matches Rust. The implementations\n * live alongside their other DKG-specific siblings in\n * `cmd/dkg/common.ts` so callers in either tree can keep using\n * them; this file just surfaces them at the parallel-to-Rust\n * import path (`@bcts/frost-hubert/cmd/common`).\n * - `group_state_dir` and the verbose-flag helpers are TS-native here.\n *\n * `OptionalStorageSelector` is intentionally not ported: it's a\n * `clap`-specific argument struct and the TS port surfaces the same\n * effect via the `StorageSelection` string-literal union — see the\n * `parity audit` for context.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nexport { parseAridUr, signingKeyFromVerifying } from \"./dkg/common.js\";\n\n/**\n * Get the group state directory for a given registry path and group ID.\n *\n * Port of `group_state_dir()` from cmd/common.rs.\n */\nexport function groupStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex);\n}\n\n/**\n * Global verbose flag.\n */\nlet verboseFlag = false;\n\n/**\n * Set the verbose flag.\n */\nexport function setVerbose(value: boolean): void {\n verboseFlag = value;\n}\n\n/**\n * Check if verbose mode is enabled.\n *\n * Port of `is_verbose()` from cmd/common.rs.\n */\nexport function isVerbose(): boolean {\n return verboseFlag;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,YAAY,UAAwB;CAClD,MAAM,UAAU,SAAS,MAAM;AAC/B,KAAI,QAAQ,WAAW,EACrB,OAAM,IAAI,MAAM,mBAAmB;CAErC,MAAM,KAAKA,wBAAAA,GAAG,aAAa,QAAQ;AAEnC,KAAI,GAAG,WAAW,KAAK,OACrB,OAAM,IAAI,MAAM,gCAAgC,GAAG,WAAW,GAAG;CAInE,MAAM,EAAE,MAAM,cAAc,QAAQ,mBAAmB;CACvD,MAAM,OAAO,GAAG,MAAM;AACtB,KAAI;AAEF,SAAO,UAAU,eAAe,KAAK;SAC/B;EAGN,MAAM,QAAS,KAAoD,gBAAgB;AACnF,MAAI,UAAU,KAAA,EACZ,OAAM,IAAI,MAAM,uBAAuB;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,OAAOC,UAAK,QAAQ,aAAa;AACvC,QAAOA,UAAK,KAAK,MAAM,eAAe,WAAW;;;;;AAMnD,IAAI,cAAc;;;;AAKlB,SAAgB,WAAW,OAAsB;AAC/C,eAAc;;;;;;;AAQhB,SAAgB,YAAqB;AACnC,QAAO"}
1
+ {"version":3,"file":"common-CnvAUC2b.cjs","names":["UR","GroupParticipant","compareXidBytes","path","path"],"sources":["../src/cmd/dkg/common.ts","../src/cmd/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for DKG commands.\n *\n * Port of cmd/dkg/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nimport { type ARID, type XID } from \"@bcts/components\";\nimport { compareXidBytes } from \"../../dkg/proposed-participant.js\";\nimport { type Envelope } from \"@bcts/envelope\";\nimport { UR } from \"@bcts/uniform-resources\";\nimport { type XIDDocument } from \"@bcts/xid\";\n\nimport {\n GroupParticipant,\n type OwnerRecord,\n type ParticipantRecord,\n type Registry,\n} from \"../../registry/index.js\";\n\n// Re-export cross-cutting utilities for convenience\nexport { groupStateDir } from \"../common.js\";\n\n/**\n * Parse an ARID from a UR string.\n *\n * Mirrors Rust `parse_arid_ur` (`cmd/common.rs:27-43`):\n *\n * 1. Trim and reject empty input.\n * 2. Parse as a UR; require `ur_type` of `\"arid\"`.\n * 3. Try `ARID::try_from(cbor)` (the tagged-CBOR form).\n * 4. If that fails, fall back to interpreting the CBOR as a bare\n * byte string and constructing the ARID from those bytes via\n * `ARID::from_data_ref`.\n *\n * The earlier port only accepted the tagged form; this matches Rust\n * by accepting the byte-string fallback too.\n */\nexport function parseAridUr(urString: string): ARID {\n const trimmed = urString.trim();\n if (trimmed.length === 0) {\n throw new Error(\"ARID is required\");\n }\n const ur = UR.fromURString(trimmed);\n\n if (ur.urTypeStr() !== \"arid\") {\n throw new Error(`Expected a ur:arid, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { ARID: ARIDClass } = require(\"@bcts/components\");\n const cbor = ur.cbor();\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromTaggedCbor(cbor);\n } catch {\n // Fall back to a bare byte string payload, mirroring Rust's\n // `CBOR::try_into_byte_string(cbor) → ARID::from_data_ref(bytes)`.\n const bytes = (cbor as { asByteString(): Uint8Array | undefined }).asByteString?.();\n if (bytes === undefined) {\n throw new Error(\"Invalid ARID payload\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return ARIDClass.fromData(bytes);\n }\n}\n\n/**\n * Parse an envelope from a UR string.\n *\n * Port of `parse_envelope_ur()` from cmd/dkg/common.rs.\n */\nexport function parseEnvelopeUr(urString: string): Envelope {\n const ur = UR.fromURString(urString.trim());\n\n if (ur.urTypeStr() !== \"envelope\") {\n throw new Error(`Expected ur:envelope, found ur:${ur.urTypeStr()}`);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { Envelope: EnvelopeClass } = require(\"@bcts/envelope\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return EnvelopeClass.fromCbor(ur.cbor());\n}\n\n/**\n * Resolve the registry owner's XID document.\n *\n * The earlier port called this `resolveSender(registry)`, but its\n * behaviour — \"give me the owner\" — has nothing in common with Rust's\n * `resolve_sender(registry, input)` (which resolves an arbitrary\n * named sender). This helper is renamed to its actual behaviour;\n * the Rust-equivalent `resolveSender(registry, input)` lives below.\n */\nexport function resolveOwnerXidDocument(registry: Registry): XIDDocument {\n const owner = registry.owner();\n\n if (!owner) {\n throw new Error(\"No owner set in registry. Run 'registry owner set' first.\");\n }\n\n return owner.xidDocument();\n}\n\n/**\n * Resolve a sender XID document from the registry by UR or pet name.\n *\n * Mirrors Rust `resolve_sender(registry, input)`\n * (`cmd/dkg/common.rs:76-94`):\n *\n * 1. Trim and reject empty input.\n * 2. Try parsing the input as a `ur:xid`. If that succeeds, look it\n * up via `registry.participant(xid)`; if no record is found,\n * error with `Sender with XID {ur} not found`.\n * 3. Otherwise look it up by pet name via\n * `registry.participantByPetName(name)`; if no record is found,\n * error with `Sender with pet name '{name}' not found`.\n *\n * Note Rust does NOT check the owner here — only the participants\n * map. The earlier inline duplicate in `participant/round1.ts` did\n * an extra owner-check fallback which is removed to match Rust.\n */\nexport function resolveSender(registry: Registry, input: string): XIDDocument {\n const trimmed = input.trim();\n if (trimmed.length === 0) {\n throw new Error(\"Sender is required\");\n }\n\n // Try parsing as an XID UR string first. `XID.fromURString` throws\n // when the input isn't a `ur:xid`; that's the signal to fall back\n // to pet-name lookup.\n let xid: XID | undefined;\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n } catch {\n xid = undefined;\n }\n\n if (xid !== undefined) {\n const record = registry.participant(xid);\n if (record !== undefined) {\n return record.xidDocument();\n }\n throw new Error(`Sender with XID ${xid.urString()} not found`);\n }\n\n const result = registry.participantByPetName(trimmed);\n if (result !== undefined) {\n const [, record] = result;\n return record.xidDocument();\n }\n throw new Error(`Sender with pet name '${trimmed}' not found`);\n}\n\n// -----------------------------------------------------------------------------\n// Participant resolution\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve participant identifiers (XID URs or pet names) to records.\n *\n * Port of `resolve_participants()` from cmd/dkg/common.rs lines 29-74.\n */\nexport function resolveParticipants(\n registry: Registry,\n inputs: string[],\n): [XID, ParticipantRecord][] {\n const seenArgs = new Set<string>();\n const seenXids = new Set<string>();\n const resolved: [XID, ParticipantRecord][] = [];\n\n for (const raw of inputs) {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n throw new Error(\"Participant identifier cannot be empty\");\n }\n if (seenArgs.has(trimmed)) {\n throw new Error(`Duplicate participant argument: ${trimmed}`);\n }\n seenArgs.add(trimmed);\n\n let xid: XID;\n let record: ParticipantRecord;\n\n // Try parsing as XID UR first\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { XID: XIDClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n xid = XIDClass.fromURString(trimmed) as XID;\n\n const foundRecord = registry.participant(xid);\n if (!foundRecord) {\n throw new Error(`Participant with XID ${xid.urString()} not found in registry`);\n }\n record = foundRecord;\n } catch {\n // Try looking up by pet name\n const result = registry.participantByPetName(trimmed);\n if (!result) {\n throw new Error(`Participant with pet name '${trimmed}' not found`);\n }\n [xid, record] = result;\n }\n\n const xidUr = xid.urString();\n if (seenXids.has(xidUr)) {\n throw new Error(`Duplicate participant specified; multiple inputs resolve to ${xidUr}`);\n }\n seenXids.add(xidUr);\n\n resolved.push([xid, record]);\n }\n\n return resolved;\n}\n\n/**\n * Get display name for sender from registry.\n *\n * Port of `resolve_sender_name()` from cmd/dkg/common.rs lines 96-116.\n */\nexport function resolveSenderName(registry: Registry, sender: XIDDocument): string | undefined {\n const owner = registry.owner();\n const senderXid = sender.xid();\n\n // Check if sender is the owner\n if (owner?.xidDocument().xid().urString() === senderXid.urString()) {\n const name = owner.petName() ?? senderXid.urString();\n return formatNameWithOwnerMarker(name, true);\n }\n\n // Look up in participants\n const record = registry.participant(senderXid);\n if (record) {\n const name = record.petName() ?? record.xid().urString();\n return formatNameWithOwnerMarker(name, false);\n }\n\n return undefined;\n}\n\n// -----------------------------------------------------------------------------\n// Group participant building\n// -----------------------------------------------------------------------------\n\n/**\n * Build GroupParticipant[] from XIDDocuments using registry lookups.\n *\n * Port of `build_group_participants()` from cmd/dkg/common.rs lines 122-131.\n */\nexport function buildGroupParticipants(\n registry: Registry,\n owner: OwnerRecord,\n participants: XIDDocument[],\n): GroupParticipant[] {\n return participants.map((doc) => groupParticipantFromRegistry(registry, owner, doc));\n}\n\n/**\n * Create a GroupParticipant from a XIDDocument, validating against the registry.\n *\n * Port of `group_participant_from_registry()` from cmd/dkg/common.rs lines 133-149.\n */\nexport function groupParticipantFromRegistry(\n registry: Registry,\n owner: OwnerRecord,\n document: XIDDocument,\n): GroupParticipant {\n const xid = document.xid();\n\n // If the document is the owner, allow it\n if (xid.urString() === owner.xid().urString()) {\n return new GroupParticipant(xid);\n }\n\n // Otherwise, verify the participant is in the registry\n if (!registry.participant(xid)) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n\n return new GroupParticipant(xid);\n}\n\n// -----------------------------------------------------------------------------\n// Name formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Format a participant name with owner marker if applicable.\n *\n * Port of `format_name_with_owner_marker()` from cmd/dkg/common.rs lines 155-157.\n */\nexport function formatNameWithOwnerMarker(name: string, isOwner: boolean): string {\n return isOwner ? `* ${name}` : name;\n}\n\n/**\n * Get display names for participants, sorted by XID, with owner marked.\n *\n * Port of `participant_names_from_registry()` from cmd/dkg/common.rs lines 159-191.\n */\nexport function participantNamesFromRegistry(\n registry: Registry,\n participants: XIDDocument[],\n ownerXid: XID,\n ownerPetName: string | undefined,\n): string[] {\n // Sort by XID byte order — mirrors Rust `XID::cmp` (raw 32-byte\n // lex compare). The earlier port used\n // `urString().localeCompare(...)`, which diverges from byte order\n // for bytes ≥ 0x80 and is locale-aware.\n const sorted = [...participants].sort((a, b) =>\n compareXidBytes(a.xid().toData(), b.xid().toData()),\n );\n\n return sorted.map((document) => {\n const xid = document.xid();\n const isOwner = xid.urString() === ownerXid.urString();\n\n let name: string;\n if (isOwner) {\n name = ownerPetName ?? xid.urString();\n } else {\n const record = registry.participant(xid);\n if (!record) {\n throw new Error(`Invite participant not found in registry: ${xid.urString()}`);\n }\n name = record.petName() ?? xid.urString();\n }\n\n return formatNameWithOwnerMarker(name, isOwner);\n });\n}\n\n/**\n * Get the DKG state directory for a given registry path and group ID.\n *\n * Port of `dkg_state_dir()` from cmd/dkg/common.rs.\n */\nexport function dkgStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex, \"dkg\");\n}\n\n/**\n * Convert a verifying key bytes to a SigningPublicKey.\n *\n * Port of `signing_key_from_verifying()` from cmd/dkg/common.rs.\n */\nexport function signingKeyFromVerifying(verifyingKeyBytes: Uint8Array): unknown {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports, no-undef\n const { SigningPublicKey: SigningPublicKeyClass } = require(\"@bcts/components\");\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return SigningPublicKeyClass.fromBytes(verifyingKeyBytes);\n}\n","/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for commands.\n *\n * Port of `cmd/common.rs` from `frost-hubert-rust`.\n *\n * Rust's `cmd::common` exports four cross-cutting helpers used by\n * both the DKG and signing subcommand trees:\n *\n * - `parse_arid_ur` / `signing_key_from_verifying` — re-exported\n * here so the TS module layout matches Rust. The implementations\n * live alongside their other DKG-specific siblings in\n * `cmd/dkg/common.ts` so callers in either tree can keep using\n * them; this file just surfaces them at the parallel-to-Rust\n * import path (`@bcts/frost-hubert/cmd/common`).\n * - `group_state_dir` and the verbose-flag helpers are TS-native here.\n *\n * `OptionalStorageSelector` is intentionally not ported: it's a\n * `clap`-specific argument struct and the TS port surfaces the same\n * effect via the `StorageSelection` string-literal union — see the\n * `parity audit` for context.\n *\n * @module\n */\n\nimport * as path from \"node:path\";\n\nexport { parseAridUr, signingKeyFromVerifying } from \"./dkg/common.js\";\n\n/**\n * Get the group state directory for a given registry path and group ID.\n *\n * Port of `group_state_dir()` from cmd/common.rs.\n */\nexport function groupStateDir(registryPath: string, groupIdHex: string): string {\n const base = path.dirname(registryPath);\n return path.join(base, \"group-state\", groupIdHex);\n}\n\n/**\n * Global verbose flag.\n */\nlet verboseFlag = false;\n\n/**\n * Set the verbose flag.\n */\nexport function setVerbose(value: boolean): void {\n verboseFlag = value;\n}\n\n/**\n * Check if verbose mode is enabled.\n *\n * Port of `is_verbose()` from cmd/common.rs.\n */\nexport function isVerbose(): boolean {\n return verboseFlag;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,SAAgB,YAAY,UAAwB;CAClD,MAAM,UAAU,SAAS,KAAK;CAC9B,IAAI,QAAQ,WAAW,GACrB,MAAM,IAAI,MAAM,kBAAkB;CAEpC,MAAM,KAAKA,wBAAAA,GAAG,aAAa,OAAO;CAElC,IAAI,GAAG,UAAU,MAAM,QACrB,MAAM,IAAI,MAAM,gCAAgC,GAAG,UAAU,GAAG;CAIlE,MAAM,EAAE,MAAM,cAAc,QAAQ,kBAAkB;CACtD,MAAM,OAAO,GAAG,KAAK;CACrB,IAAI;EAEF,OAAO,UAAU,eAAe,IAAI;CACtC,QAAQ;EAGN,MAAM,QAAS,KAAoD,eAAe;EAClF,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MAAM,sBAAsB;EAGxC,OAAO,UAAU,SAAS,KAAK;CACjC;AACF;;;;;;AAOA,SAAgB,gBAAgB,UAA4B;CAC1D,MAAM,KAAKA,wBAAAA,GAAG,aAAa,SAAS,KAAK,CAAC;CAE1C,IAAI,GAAG,UAAU,MAAM,YACrB,MAAM,IAAI,MAAM,kCAAkC,GAAG,UAAU,GAAG;CAIpE,MAAM,EAAE,UAAU,kBAAkB,QAAQ,gBAAgB;CAE5D,OAAO,cAAc,SAAS,GAAG,KAAK,CAAC;AACzC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Dir } from "./common-CvH6dFvQ.mjs";
1
+ import { t as groupStateDir } from "./common-Cf1UvJaP.mjs";
2
2
  import { Envelope } from "@bcts/envelope";
3
3
  //#region src/cmd/sign/common.ts
4
4
  /**
@@ -93,4 +93,4 @@ var SignFinalizeContent = class SignFinalizeContent {
93
93
  //#endregion
94
94
  export { signingStateDir as n, signingStateDirForGroup as r, SignFinalizeContent as t };
95
95
 
96
- //# sourceMappingURL=common-DUWvtc08.mjs.map
96
+ //# sourceMappingURL=common-DNrD_-EI.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-DUWvtc08.mjs","names":[],"sources":["../src/cmd/sign/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for sign commands.\n *\n * Port of cmd/sign/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { Envelope, type EnvelopeEncodableValue } from \"@bcts/envelope\";\n\nimport { groupStateDir } from \"../common\";\n\n/**\n * Get the signing state directory for a group (without session).\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing`\n *\n * Port of `signing_state_dir_for_group()` from cmd/sign/common.rs.\n */\nexport function signingStateDirForGroup(registryPath: string, groupIdHex: string): string {\n return `${groupStateDir(registryPath, groupIdHex)}/signing`;\n}\n\n/**\n * Get the signing state directory for a given registry path, group ID, and session ID.\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing/{session_id.hex()}`\n *\n * Port of `signing_state_dir()` from cmd/sign/common.rs.\n */\nexport function signingStateDir(\n registryPath: string,\n groupIdHex: string,\n sessionIdHex: string,\n): string {\n return `${signingStateDirForGroup(registryPath, groupIdHex)}/${sessionIdHex}`;\n}\n\n/**\n * Content wrapper for signFinalize events.\n *\n * This wraps an envelope with a unit subject and type assertion\n * \"signFinalize\", implementing the traits required by SealedEvent<T>.\n *\n * Port of `struct SignFinalizeContent` from cmd/sign/common.rs.\n */\nexport class SignFinalizeContent {\n private readonly _envelope: Envelope;\n\n private constructor(envelope: Envelope) {\n this._envelope = envelope;\n }\n\n /**\n * Creates a new SignFinalizeContent with a unit subject and type assertion.\n *\n * Port of `SignFinalizeContent::new()` from cmd/sign/common.rs.\n */\n static new(): SignFinalizeContent {\n const envelope = Envelope.unit().addType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Adds an assertion to the content envelope.\n *\n * Port of `SignFinalizeContent::add_assertion()` from cmd/sign/common.rs.\n */\n addAssertion(\n predicate: EnvelopeEncodableValue,\n object: EnvelopeEncodableValue,\n ): SignFinalizeContent {\n const newEnvelope = this._envelope.addAssertion(predicate, object);\n return new SignFinalizeContent(newEnvelope);\n }\n\n /**\n * Returns the inner envelope.\n *\n * Port of `SignFinalizeContent::envelope()` from cmd/sign/common.rs.\n */\n envelope(): Envelope {\n return this._envelope;\n }\n\n /**\n * Creates a SignFinalizeContent from an envelope with validation.\n *\n * Validates that the envelope has a unit subject and type \"signFinalize\".\n *\n * Port of `TryFrom<Envelope> for SignFinalizeContent` from cmd/sign/common.rs.\n */\n static fromEnvelope(envelope: Envelope): SignFinalizeContent {\n // Validate it has a unit subject and type \"signFinalize\"\n envelope.checkSubjectUnit();\n envelope.checkType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Converts this SignFinalizeContent to an Envelope.\n *\n * Port of `From<SignFinalizeContent> for Envelope` from cmd/sign/common.rs.\n */\n toEnvelope(): Envelope {\n return this._envelope;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,wBAAwB,cAAsB,YAA4B;AACxF,QAAO,GAAG,cAAc,cAAc,WAAW,CAAC;;;;;;;;;AAUpD,SAAgB,gBACd,cACA,YACA,cACQ;AACR,QAAO,GAAG,wBAAwB,cAAc,WAAW,CAAC,GAAG;;;;;;;;;;AAWjE,IAAa,sBAAb,MAAa,oBAAoB;CAC/B;CAEA,YAAoB,UAAoB;AACtC,OAAK,YAAY;;;;;;;CAQnB,OAAO,MAA2B;AAEhC,SAAO,IAAI,oBADM,SAAS,MAAM,CAAC,QAAQ,eACF,CAAC;;;;;;;CAQ1C,aACE,WACA,QACqB;AAErB,SAAO,IAAI,oBADS,KAAK,UAAU,aAAa,WAAW,OACjB,CAAC;;;;;;;CAQ7C,WAAqB;AACnB,SAAO,KAAK;;;;;;;;;CAUd,OAAO,aAAa,UAAyC;AAE3D,WAAS,kBAAkB;AAC3B,WAAS,UAAU,eAAe;AAClC,SAAO,IAAI,oBAAoB,SAAS;;;;;;;CAQ1C,aAAuB;AACrB,SAAO,KAAK"}
1
+ {"version":3,"file":"common-DNrD_-EI.mjs","names":[],"sources":["../src/cmd/sign/common.ts"],"sourcesContent":["/**\n * Copyright © 2023-2026 Blockchain Commons, LLC\n * Copyright © 2025-2026 Parity Technologies\n *\n *\n * Common utilities for sign commands.\n *\n * Port of cmd/sign/common.rs from frost-hubert-rust.\n *\n * @module\n */\n\nimport { Envelope, type EnvelopeEncodableValue } from \"@bcts/envelope\";\n\nimport { groupStateDir } from \"../common\";\n\n/**\n * Get the signing state directory for a group (without session).\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing`\n *\n * Port of `signing_state_dir_for_group()` from cmd/sign/common.rs.\n */\nexport function signingStateDirForGroup(registryPath: string, groupIdHex: string): string {\n return `${groupStateDir(registryPath, groupIdHex)}/signing`;\n}\n\n/**\n * Get the signing state directory for a given registry path, group ID, and session ID.\n *\n * Path: `{registry_dir}/group-state/{group_id.hex()}/signing/{session_id.hex()}`\n *\n * Port of `signing_state_dir()` from cmd/sign/common.rs.\n */\nexport function signingStateDir(\n registryPath: string,\n groupIdHex: string,\n sessionIdHex: string,\n): string {\n return `${signingStateDirForGroup(registryPath, groupIdHex)}/${sessionIdHex}`;\n}\n\n/**\n * Content wrapper for signFinalize events.\n *\n * This wraps an envelope with a unit subject and type assertion\n * \"signFinalize\", implementing the traits required by SealedEvent<T>.\n *\n * Port of `struct SignFinalizeContent` from cmd/sign/common.rs.\n */\nexport class SignFinalizeContent {\n private readonly _envelope: Envelope;\n\n private constructor(envelope: Envelope) {\n this._envelope = envelope;\n }\n\n /**\n * Creates a new SignFinalizeContent with a unit subject and type assertion.\n *\n * Port of `SignFinalizeContent::new()` from cmd/sign/common.rs.\n */\n static new(): SignFinalizeContent {\n const envelope = Envelope.unit().addType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Adds an assertion to the content envelope.\n *\n * Port of `SignFinalizeContent::add_assertion()` from cmd/sign/common.rs.\n */\n addAssertion(\n predicate: EnvelopeEncodableValue,\n object: EnvelopeEncodableValue,\n ): SignFinalizeContent {\n const newEnvelope = this._envelope.addAssertion(predicate, object);\n return new SignFinalizeContent(newEnvelope);\n }\n\n /**\n * Returns the inner envelope.\n *\n * Port of `SignFinalizeContent::envelope()` from cmd/sign/common.rs.\n */\n envelope(): Envelope {\n return this._envelope;\n }\n\n /**\n * Creates a SignFinalizeContent from an envelope with validation.\n *\n * Validates that the envelope has a unit subject and type \"signFinalize\".\n *\n * Port of `TryFrom<Envelope> for SignFinalizeContent` from cmd/sign/common.rs.\n */\n static fromEnvelope(envelope: Envelope): SignFinalizeContent {\n // Validate it has a unit subject and type \"signFinalize\"\n envelope.checkSubjectUnit();\n envelope.checkType(\"signFinalize\");\n return new SignFinalizeContent(envelope);\n }\n\n /**\n * Converts this SignFinalizeContent to an Envelope.\n *\n * Port of `From<SignFinalizeContent> for Envelope` from cmd/sign/common.rs.\n */\n toEnvelope(): Envelope {\n return this._envelope;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,wBAAwB,cAAsB,YAA4B;CACxF,OAAO,GAAG,cAAc,cAAc,UAAU,EAAE;AACpD;;;;;;;;AASA,SAAgB,gBACd,cACA,YACA,cACQ;CACR,OAAO,GAAG,wBAAwB,cAAc,UAAU,EAAE,GAAG;AACjE;;;;;;;;;AAUA,IAAa,sBAAb,MAAa,oBAAoB;CAC/B;CAEA,YAAoB,UAAoB;EACtC,KAAK,YAAY;CACnB;;;;;;CAOA,OAAO,MAA2B;EAEhC,OAAO,IAAI,oBADM,SAAS,KAAK,EAAE,QAAQ,cACH,CAAC;CACzC;;;;;;CAOA,aACE,WACA,QACqB;EAErB,OAAO,IAAI,oBADS,KAAK,UAAU,aAAa,WAAW,MAClB,CAAC;CAC5C;;;;;;CAOA,WAAqB;EACnB,OAAO,KAAK;CACd;;;;;;;;CASA,OAAO,aAAa,UAAyC;EAE3D,SAAS,iBAAiB;EAC1B,SAAS,UAAU,cAAc;EACjC,OAAO,IAAI,oBAAoB,QAAQ;CACzC;;;;;;CAOA,aAAuB;EACrB,OAAO,KAAK;CACd;AACF"}
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../chunk-CZWwpsFl.cjs");
3
- const require_proposed_participant = require("../proposed-participant-Dm1Eq6mX.cjs");
2
+ const require_proposed_participant = require("../proposed-participant-BvHNnpcZ.cjs");
4
3
  let _bcts_components = require("@bcts/components");
5
4
  let _bcts_dcbor = require("@bcts/dcbor");
6
5
  let _bcts_envelope = require("@bcts/envelope");