@bcts/frost-hubert 1.0.0-alpha.23 → 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.
- package/README.md +1 -1
- package/dist/bin/frost.cjs +344 -72
- package/dist/bin/frost.cjs.map +1 -1
- package/dist/bin/frost.mjs +344 -71
- package/dist/bin/frost.mjs.map +1 -1
- package/dist/busy-B_h0bNAJ.cjs +38 -0
- package/dist/busy-B_h0bNAJ.cjs.map +1 -0
- package/dist/busy-BlU8_pS2.mjs +27 -0
- package/dist/busy-BlU8_pS2.mjs.map +1 -0
- package/dist/cmd/index.cjs +27 -22
- package/dist/cmd/index.d.cts +2 -2
- package/dist/cmd/index.d.mts +2 -2
- package/dist/cmd/index.mjs +6 -3
- package/dist/cmd-CCVhHzG7.cjs +129 -0
- package/dist/cmd-CCVhHzG7.cjs.map +1 -0
- package/dist/cmd-DNsHd19v.mjs +112 -0
- package/dist/cmd-DNsHd19v.mjs.map +1 -0
- package/dist/common-7-BOgaTt.cjs +113 -0
- package/dist/common-7-BOgaTt.cjs.map +1 -0
- package/dist/common-Cf1UvJaP.mjs +282 -0
- package/dist/common-Cf1UvJaP.mjs.map +1 -0
- package/dist/common-CnvAUC2b.cjs +372 -0
- package/dist/common-CnvAUC2b.cjs.map +1 -0
- package/dist/common-DNrD_-EI.mjs +96 -0
- package/dist/common-DNrD_-EI.mjs.map +1 -0
- package/dist/dkg/index.cjs +6 -103
- package/dist/dkg/index.cjs.map +1 -1
- package/dist/dkg/index.d.cts +2 -2
- package/dist/dkg/index.d.mts +2 -2
- package/dist/dkg/index.mjs +4 -101
- package/dist/dkg/index.mjs.map +1 -1
- package/dist/finalize-BpC0rz93.mjs +389 -0
- package/dist/finalize-BpC0rz93.mjs.map +1 -0
- package/dist/finalize-Cb0obTSo.cjs +402 -0
- package/dist/finalize-Cb0obTSo.cjs.map +1 -0
- package/dist/finalize-DHEnKobp.cjs +303 -0
- package/dist/finalize-DHEnKobp.cjs.map +1 -0
- package/dist/finalize-DQ0VGUHO.cjs +265 -0
- package/dist/finalize-DQ0VGUHO.cjs.map +1 -0
- package/dist/finalize-DtRxHZ7H.mjs +290 -0
- package/dist/finalize-DtRxHZ7H.mjs.map +1 -0
- package/dist/finalize-T83Ko8nG.mjs +252 -0
- package/dist/finalize-T83Ko8nG.mjs.map +1 -0
- package/dist/frost/index.cjs +1 -1
- package/dist/frost/index.cjs.map +1 -1
- package/dist/frost/index.d.cts.map +1 -1
- package/dist/frost/index.d.mts.map +1 -1
- package/dist/frost/index.mjs +1 -1
- package/dist/frost/index.mjs.map +1 -1
- package/dist/{index-BJlwbPYu.d.cts → index-BErX9AZF.d.cts} +101 -79
- package/dist/index-BErX9AZF.d.cts.map +1 -0
- package/dist/{index-BkqLimZT.d.mts → index-BaUVw4b1.d.mts} +25 -2
- package/dist/index-BaUVw4b1.d.mts.map +1 -0
- package/dist/{index-BMbPgH0W.d.cts → index-CD50Qtgw.d.cts} +46 -2
- package/dist/index-CD50Qtgw.d.cts.map +1 -0
- package/dist/{index-DoV5HFvV.d.mts → index-CD50Qtgw.d.mts} +46 -2
- package/dist/index-CD50Qtgw.d.mts.map +1 -0
- package/dist/{index-Dzm1v4_4.d.mts → index-Drklne-Y.d.mts} +101 -79
- package/dist/index-Drklne-Y.d.mts.map +1 -0
- package/dist/{index-DmxfT59Y.d.cts → index-gkmZzEuD.d.cts} +25 -2
- package/dist/index-gkmZzEuD.d.cts.map +1 -0
- package/dist/index.cjs +30 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/dist/invite-1tzg0B0P.cjs +274 -0
- package/dist/invite-1tzg0B0P.cjs.map +1 -0
- package/dist/invite-BLwtexAu.cjs +109 -0
- package/dist/invite-BLwtexAu.cjs.map +1 -0
- package/dist/invite-Be2v2SVc.mjs +96 -0
- package/dist/invite-Be2v2SVc.mjs.map +1 -0
- package/dist/invite-D8mQSnFz.mjs +219 -0
- package/dist/invite-D8mQSnFz.mjs.map +1 -0
- package/dist/parallel-PZiwHZT8.mjs +235 -0
- package/dist/parallel-PZiwHZT8.mjs.map +1 -0
- package/dist/parallel-szwYx-bi.cjs +318 -0
- package/dist/parallel-szwYx-bi.cjs.map +1 -0
- package/dist/proposed-participant-BvHNnpcZ.cjs +140 -0
- package/dist/proposed-participant-BvHNnpcZ.cjs.map +1 -0
- package/dist/proposed-participant-Detb823_.mjs +129 -0
- package/dist/proposed-participant-Detb823_.mjs.map +1 -0
- package/dist/receive-BR-knnGv.cjs +213 -0
- package/dist/receive-BR-knnGv.cjs.map +1 -0
- package/dist/receive-D_r4Mryr.cjs +190 -0
- package/dist/receive-D_r4Mryr.cjs.map +1 -0
- package/dist/receive-dkSCSGpl.mjs +188 -0
- package/dist/receive-dkSCSGpl.mjs.map +1 -0
- package/dist/receive-g8EhZF2Y.mjs +177 -0
- package/dist/receive-g8EhZF2Y.mjs.map +1 -0
- package/dist/registry/index.cjs +86 -11
- package/dist/registry/index.cjs.map +1 -1
- package/dist/registry/index.d.cts +1 -1
- package/dist/registry/index.d.mts +1 -1
- package/dist/registry/index.mjs +85 -10
- package/dist/registry/index.mjs.map +1 -1
- package/dist/{registry-loI1_Mh1.cjs → registry-CkIbA7nt.cjs} +79 -2
- package/dist/registry-CkIbA7nt.cjs.map +1 -0
- package/dist/{registry-CgrCZ4En.mjs → registry-DGjs4qDK.mjs} +74 -3
- package/dist/registry-DGjs4qDK.mjs.map +1 -0
- package/dist/round1-9FAqFvL5.cjs +465 -0
- package/dist/round1-9FAqFvL5.cjs.map +1 -0
- package/dist/round1-B8haiMM8.mjs +208 -0
- package/dist/round1-B8haiMM8.mjs.map +1 -0
- package/dist/round1-BOIE1E4O.mjs +452 -0
- package/dist/round1-BOIE1E4O.mjs.map +1 -0
- package/dist/round1-Bq0vweyQ.cjs +422 -0
- package/dist/round1-Bq0vweyQ.cjs.map +1 -0
- package/dist/round1-CXkXoVQU.cjs +208 -0
- package/dist/round1-CXkXoVQU.cjs.map +1 -0
- package/dist/round1-D8t7EzIo.mjs +373 -0
- package/dist/round1-D8t7EzIo.mjs.map +1 -0
- package/dist/round1-DriPu15x.cjs +221 -0
- package/dist/round1-DriPu15x.cjs.map +1 -0
- package/dist/round1-Y2kcVwnR.mjs +195 -0
- package/dist/round1-Y2kcVwnR.mjs.map +1 -0
- package/dist/round2-AMDYMUIg.cjs +305 -0
- package/dist/round2-AMDYMUIg.cjs.map +1 -0
- package/dist/round2-BHQKVJFo.cjs +410 -0
- package/dist/round2-BHQKVJFo.cjs.map +1 -0
- package/dist/round2-BfetYacV.mjs +450 -0
- package/dist/round2-BfetYacV.mjs.map +1 -0
- package/dist/round2-Cf5CJc_8.mjs +397 -0
- package/dist/round2-Cf5CJc_8.mjs.map +1 -0
- package/dist/round2-CvrmylN1.cjs +293 -0
- package/dist/round2-CvrmylN1.cjs.map +1 -0
- package/dist/round2-Dk_w97nl.cjs +499 -0
- package/dist/round2-Dk_w97nl.cjs.map +1 -0
- package/dist/round2-Z2JhMwxc.mjs +292 -0
- package/dist/round2-Z2JhMwxc.mjs.map +1 -0
- package/dist/round2-mF6UlkT-.mjs +280 -0
- package/dist/round2-mF6UlkT-.mjs.map +1 -0
- package/package.json +14 -14
- package/src/bin/frost.ts +849 -128
- package/src/cmd/common.ts +19 -1
- package/src/cmd/dkg/common.ts +97 -10
- package/src/cmd/dkg/coordinator/invite.ts +5 -2
- package/src/cmd/dkg/participant/finalize.ts +51 -17
- package/src/cmd/dkg/participant/round1.ts +39 -38
- package/src/cmd/dkg/participant/round2.ts +60 -26
- package/src/cmd/sign/coordinator/round2.ts +5 -1
- package/src/cmd/sign/participant/finalize.ts +6 -2
- package/src/cmd/sign/participant/receive.ts +5 -2
- package/src/dkg/group-invite.ts +12 -2
- package/src/dkg/proposed-participant.ts +32 -3
- package/src/registry/owner-record.ts +12 -0
- package/src/registry/participant-record.ts +35 -2
- package/src/registry/registry-impl.ts +74 -18
- package/dist/cmd-5yLeC_QL.mjs +0 -4708
- package/dist/cmd-5yLeC_QL.mjs.map +0 -1
- package/dist/cmd-BfZjC3Uh.cjs +0 -4847
- package/dist/cmd-BfZjC3Uh.cjs.map +0 -1
- package/dist/index-BJlwbPYu.d.cts.map +0 -1
- package/dist/index-BMbPgH0W.d.cts.map +0 -1
- package/dist/index-BkqLimZT.d.mts.map +0 -1
- package/dist/index-DmxfT59Y.d.cts.map +0 -1
- package/dist/index-DoV5HFvV.d.mts.map +0 -1
- package/dist/index-Dzm1v4_4.d.mts.map +0 -1
- package/dist/registry-CgrCZ4En.mjs.map +0 -1
- package/dist/registry-loI1_Mh1.cjs.map +0 -1
- /package/dist/{chunk-CZWwpsFl.cjs → chunk-DakpK96I.cjs} +0 -0
- /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/cmd/busy.ts
|
|
2
|
+
/**
|
|
3
|
+
* Put an envelope to storage with a progress indicator.
|
|
4
|
+
*
|
|
5
|
+
* Port of `put_with_indicator()` from cmd/busy.rs.
|
|
6
|
+
*/
|
|
7
|
+
async function putWithIndicator(client, arid, envelope, message, verbose) {
|
|
8
|
+
if (verbose) console.log(`${message}...`);
|
|
9
|
+
await client.put(arid, envelope);
|
|
10
|
+
if (verbose) console.log(`${message}... done`);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get an envelope from storage with a progress indicator.
|
|
14
|
+
*
|
|
15
|
+
* Port of `get_with_indicator()` from cmd/busy.rs.
|
|
16
|
+
*/
|
|
17
|
+
async function getWithIndicator(client, arid, message, timeoutSeconds, verbose) {
|
|
18
|
+
if (verbose) console.log(`${message}...`);
|
|
19
|
+
const envelope = await client.get(arid, timeoutSeconds);
|
|
20
|
+
if (verbose) if (envelope) console.log(`${message}... found`);
|
|
21
|
+
else console.log(`${message}... not found`);
|
|
22
|
+
return envelope;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { putWithIndicator as n, getWithIndicator as t };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=busy-BlU8_pS2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/cmd/index.cjs
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.
|
|
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");
|
|
7
|
+
exports.CollectionResult = require_parallel.CollectionResult;
|
|
8
|
+
exports.DEFAULT_TIMEOUT_SECONDS = require_parallel.DEFAULT_TIMEOUT_SECONDS;
|
|
9
|
+
exports.Direction = require_parallel.Direction;
|
|
10
|
+
exports.buildFetchRequests = require_parallel.buildFetchRequests;
|
|
8
11
|
exports.checkAridExists = require_cmd.checkAridExists;
|
|
9
|
-
exports.createStorageClient =
|
|
10
|
-
exports.directionEmoji =
|
|
12
|
+
exports.createStorageClient = require_registry.createStorageClient;
|
|
13
|
+
exports.directionEmoji = require_parallel.directionEmoji;
|
|
11
14
|
Object.defineProperty(exports, "dkg", {
|
|
12
15
|
enumerable: true,
|
|
13
16
|
get: function() {
|
|
14
17
|
return require_cmd.dkg_exports;
|
|
15
18
|
}
|
|
16
19
|
});
|
|
17
|
-
exports.emptyCollectionResult =
|
|
18
|
-
exports.fetchStatusError =
|
|
19
|
-
exports.fetchStatusPending =
|
|
20
|
-
exports.fetchStatusRejected =
|
|
21
|
-
exports.fetchStatusSuccess =
|
|
22
|
-
exports.fetchStatusTimeout =
|
|
23
|
-
exports.getWithIndicator =
|
|
24
|
-
exports.groupStateDir =
|
|
25
|
-
exports.isVerbose =
|
|
26
|
-
exports.parallelFetch =
|
|
27
|
-
exports.parallelFetchConfigWithTimeout =
|
|
28
|
-
exports.parallelSend =
|
|
29
|
-
exports.
|
|
20
|
+
exports.emptyCollectionResult = require_parallel.emptyCollectionResult;
|
|
21
|
+
exports.fetchStatusError = require_parallel.fetchStatusError;
|
|
22
|
+
exports.fetchStatusPending = require_parallel.fetchStatusPending;
|
|
23
|
+
exports.fetchStatusRejected = require_parallel.fetchStatusRejected;
|
|
24
|
+
exports.fetchStatusSuccess = require_parallel.fetchStatusSuccess;
|
|
25
|
+
exports.fetchStatusTimeout = require_parallel.fetchStatusTimeout;
|
|
26
|
+
exports.getWithIndicator = require_busy.getWithIndicator;
|
|
27
|
+
exports.groupStateDir = require_common.groupStateDir;
|
|
28
|
+
exports.isVerbose = require_common.isVerbose;
|
|
29
|
+
exports.parallelFetch = require_parallel.parallelFetch;
|
|
30
|
+
exports.parallelFetchConfigWithTimeout = require_parallel.parallelFetchConfigWithTimeout;
|
|
31
|
+
exports.parallelSend = require_parallel.parallelSend;
|
|
32
|
+
exports.parseAridUr = require_common.parseAridUr;
|
|
33
|
+
exports.putWithIndicator = require_busy.putWithIndicator;
|
|
30
34
|
Object.defineProperty(exports, "registry", {
|
|
31
35
|
enumerable: true,
|
|
32
36
|
get: function() {
|
|
33
37
|
return require_registry.registry_exports;
|
|
34
38
|
}
|
|
35
39
|
});
|
|
36
|
-
exports.setVerbose =
|
|
40
|
+
exports.setVerbose = require_common.setVerbose;
|
|
37
41
|
Object.defineProperty(exports, "sign", {
|
|
38
42
|
enumerable: true,
|
|
39
43
|
get: function() {
|
|
40
44
|
return require_cmd.sign_exports;
|
|
41
45
|
}
|
|
42
46
|
});
|
|
47
|
+
exports.signingKeyFromVerifying = require_common.signingKeyFromVerifying;
|
package/dist/cmd/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { 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, 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-
|
|
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, putWithIndicator, index_d_exports$1 as registry, setVerbose, index_d_exports$2 as sign };
|
|
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
|
+
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 };
|
package/dist/cmd/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { 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, 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-
|
|
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, putWithIndicator, index_d_exports$1 as registry, setVerbose, index_d_exports$2 as sign };
|
|
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
|
+
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 };
|
package/dist/cmd/index.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
|
|
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";
|
|
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 };
|
|
@@ -0,0 +1,129 @@
|
|
|
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");
|
|
20
|
+
//#region src/cmd/check.ts
|
|
21
|
+
/**
|
|
22
|
+
* Check if an ARID exists in storage.
|
|
23
|
+
*
|
|
24
|
+
* Port of check functionality from cmd/check.rs.
|
|
25
|
+
*/
|
|
26
|
+
async function checkAridExists(client, arid) {
|
|
27
|
+
return client.exists(arid);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/cmd/dkg/coordinator/index.ts
|
|
31
|
+
var coordinator_exports$1 = /* @__PURE__ */ require_chunk.__exportAll({
|
|
32
|
+
buildFinalizeRequestForParticipant: () => require_round2.buildFinalizeRequestForParticipant,
|
|
33
|
+
collectRound2Parallel: () => require_round2.collectRound2Parallel,
|
|
34
|
+
dispatchFinalizeRequestsParallel: () => require_round2.dispatchFinalizeRequestsParallel,
|
|
35
|
+
finalize: () => require_finalize.finalize,
|
|
36
|
+
invite: () => require_invite.invite,
|
|
37
|
+
persistRound2Packages: () => require_round2.persistRound2Packages,
|
|
38
|
+
round1: () => require_round1.round1,
|
|
39
|
+
round2: () => require_round2.round2,
|
|
40
|
+
updatePendingForFinalizeFromCollection: () => require_round2.updatePendingForFinalizeFromCollection,
|
|
41
|
+
validateAndExtractRound2Response: () => require_round2.validateAndExtractRound2Response
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/cmd/dkg/participant/index.ts
|
|
45
|
+
var participant_exports$1 = /* @__PURE__ */ require_chunk.__exportAll({
|
|
46
|
+
decodeInviteDetails: () => require_receive.decodeInviteDetails,
|
|
47
|
+
finalize: () => require_finalize$1.finalize,
|
|
48
|
+
receive: () => require_receive.receive,
|
|
49
|
+
resolveInviteEnvelope: () => require_receive.resolveInviteEnvelope,
|
|
50
|
+
round1: () => require_round1$1.round1,
|
|
51
|
+
round2: () => require_round2$1.round2
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/cmd/dkg/index.ts
|
|
55
|
+
var dkg_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
56
|
+
buildGroupParticipants: () => require_common.buildGroupParticipants,
|
|
57
|
+
coordinator: () => coordinator_exports$1,
|
|
58
|
+
dkgStateDir: () => require_common.dkgStateDir,
|
|
59
|
+
formatNameWithOwnerMarker: () => require_common.formatNameWithOwnerMarker,
|
|
60
|
+
groupParticipantFromRegistry: () => require_common.groupParticipantFromRegistry,
|
|
61
|
+
groupStateDir: () => require_common.groupStateDir,
|
|
62
|
+
parseAridUr: () => require_common.parseAridUr,
|
|
63
|
+
parseEnvelopeUr: () => require_common.parseEnvelopeUr,
|
|
64
|
+
participant: () => participant_exports$1,
|
|
65
|
+
participantNamesFromRegistry: () => require_common.participantNamesFromRegistry,
|
|
66
|
+
resolveOwnerXidDocument: () => require_common.resolveOwnerXidDocument,
|
|
67
|
+
resolveParticipants: () => require_common.resolveParticipants,
|
|
68
|
+
resolveSender: () => require_common.resolveSender,
|
|
69
|
+
resolveSenderName: () => require_common.resolveSenderName,
|
|
70
|
+
signingKeyFromVerifying: () => require_common.signingKeyFromVerifying
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/cmd/sign/coordinator/index.ts
|
|
74
|
+
var coordinator_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
75
|
+
buildSessionStateJson: () => require_invite$1.buildSessionStateJson,
|
|
76
|
+
buildShareRequestForParticipant: () => require_round1$2.buildShareRequestForParticipant,
|
|
77
|
+
buildSignInviteRequest: () => require_invite$1.buildSignInviteRequest,
|
|
78
|
+
collectCommitmentsParallel: () => require_round1$2.collectCommitmentsParallel,
|
|
79
|
+
createSessionArids: () => require_invite$1.createSessionArids,
|
|
80
|
+
dispatchShareRequestsParallel: () => require_round1$2.dispatchShareRequestsParallel,
|
|
81
|
+
gatherRecipientDocuments: () => require_invite$1.gatherRecipientDocuments,
|
|
82
|
+
invite: () => require_invite$1.invite,
|
|
83
|
+
loadEnvelopeFromPath: () => require_invite$1.loadEnvelopeFromPath,
|
|
84
|
+
persistCommitments: () => require_round1$2.persistCommitments,
|
|
85
|
+
persistSessionState: () => require_invite$1.persistSessionState,
|
|
86
|
+
round1: () => require_round1$2.round1,
|
|
87
|
+
round2: () => require_round2$2.round2,
|
|
88
|
+
updatePendingForShare: () => require_round1$2.updatePendingForShare,
|
|
89
|
+
validateAndExtractCommitResponse: () => require_round1$2.validateAndExtractCommitResponse,
|
|
90
|
+
validateCoordinator: () => require_invite$1.validateCoordinator
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/cmd/sign/participant/index.ts
|
|
94
|
+
var participant_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
95
|
+
finalize: () => require_finalize$2.finalize,
|
|
96
|
+
receive: () => require_receive$1.receive,
|
|
97
|
+
round1: () => require_round1$3.round1,
|
|
98
|
+
round2: () => require_round2$3.round2
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/cmd/sign/index.ts
|
|
102
|
+
var sign_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
103
|
+
SignFinalizeContent: () => require_common$1.SignFinalizeContent,
|
|
104
|
+
coordinator: () => coordinator_exports,
|
|
105
|
+
participant: () => participant_exports,
|
|
106
|
+
signingStateDir: () => require_common$1.signingStateDir,
|
|
107
|
+
signingStateDirForGroup: () => require_common$1.signingStateDirForGroup
|
|
108
|
+
});
|
|
109
|
+
//#endregion
|
|
110
|
+
Object.defineProperty(exports, "checkAridExists", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function() {
|
|
113
|
+
return checkAridExists;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "dkg_exports", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function() {
|
|
119
|
+
return dkg_exports;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "sign_exports", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function() {
|
|
125
|
+
return sign_exports;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=cmd-CCVhHzG7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,112 @@
|
|
|
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";
|
|
20
|
+
//#region src/cmd/check.ts
|
|
21
|
+
/**
|
|
22
|
+
* Check if an ARID exists in storage.
|
|
23
|
+
*
|
|
24
|
+
* Port of check functionality from cmd/check.rs.
|
|
25
|
+
*/
|
|
26
|
+
async function checkAridExists(client, arid) {
|
|
27
|
+
return client.exists(arid);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/cmd/dkg/coordinator/index.ts
|
|
31
|
+
var coordinator_exports$1 = /* @__PURE__ */ __exportAll({
|
|
32
|
+
buildFinalizeRequestForParticipant: () => buildFinalizeRequestForParticipant,
|
|
33
|
+
collectRound2Parallel: () => collectRound2Parallel,
|
|
34
|
+
dispatchFinalizeRequestsParallel: () => dispatchFinalizeRequestsParallel,
|
|
35
|
+
finalize: () => finalize,
|
|
36
|
+
invite: () => invite,
|
|
37
|
+
persistRound2Packages: () => persistRound2Packages,
|
|
38
|
+
round1: () => round1,
|
|
39
|
+
round2: () => round2,
|
|
40
|
+
updatePendingForFinalizeFromCollection: () => updatePendingForFinalizeFromCollection,
|
|
41
|
+
validateAndExtractRound2Response: () => validateAndExtractRound2Response
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/cmd/dkg/participant/index.ts
|
|
45
|
+
var participant_exports$1 = /* @__PURE__ */ __exportAll({
|
|
46
|
+
decodeInviteDetails: () => decodeInviteDetails,
|
|
47
|
+
finalize: () => finalize$1,
|
|
48
|
+
receive: () => receive,
|
|
49
|
+
resolveInviteEnvelope: () => resolveInviteEnvelope,
|
|
50
|
+
round1: () => round1$1,
|
|
51
|
+
round2: () => round2$1
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/cmd/dkg/index.ts
|
|
55
|
+
var dkg_exports = /* @__PURE__ */ __exportAll({
|
|
56
|
+
buildGroupParticipants: () => buildGroupParticipants,
|
|
57
|
+
coordinator: () => coordinator_exports$1,
|
|
58
|
+
dkgStateDir: () => dkgStateDir,
|
|
59
|
+
formatNameWithOwnerMarker: () => formatNameWithOwnerMarker,
|
|
60
|
+
groupParticipantFromRegistry: () => groupParticipantFromRegistry,
|
|
61
|
+
groupStateDir: () => groupStateDir,
|
|
62
|
+
parseAridUr: () => parseAridUr,
|
|
63
|
+
parseEnvelopeUr: () => parseEnvelopeUr,
|
|
64
|
+
participant: () => participant_exports$1,
|
|
65
|
+
participantNamesFromRegistry: () => participantNamesFromRegistry,
|
|
66
|
+
resolveOwnerXidDocument: () => resolveOwnerXidDocument,
|
|
67
|
+
resolveParticipants: () => resolveParticipants,
|
|
68
|
+
resolveSender: () => resolveSender,
|
|
69
|
+
resolveSenderName: () => resolveSenderName,
|
|
70
|
+
signingKeyFromVerifying: () => signingKeyFromVerifying
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/cmd/sign/coordinator/index.ts
|
|
74
|
+
var coordinator_exports = /* @__PURE__ */ __exportAll({
|
|
75
|
+
buildSessionStateJson: () => buildSessionStateJson,
|
|
76
|
+
buildShareRequestForParticipant: () => buildShareRequestForParticipant,
|
|
77
|
+
buildSignInviteRequest: () => buildSignInviteRequest,
|
|
78
|
+
collectCommitmentsParallel: () => collectCommitmentsParallel,
|
|
79
|
+
createSessionArids: () => createSessionArids,
|
|
80
|
+
dispatchShareRequestsParallel: () => dispatchShareRequestsParallel,
|
|
81
|
+
gatherRecipientDocuments: () => gatherRecipientDocuments,
|
|
82
|
+
invite: () => invite$1,
|
|
83
|
+
loadEnvelopeFromPath: () => loadEnvelopeFromPath,
|
|
84
|
+
persistCommitments: () => persistCommitments,
|
|
85
|
+
persistSessionState: () => persistSessionState,
|
|
86
|
+
round1: () => round1$2,
|
|
87
|
+
round2: () => round2$2,
|
|
88
|
+
updatePendingForShare: () => updatePendingForShare,
|
|
89
|
+
validateAndExtractCommitResponse: () => validateAndExtractCommitResponse,
|
|
90
|
+
validateCoordinator: () => validateCoordinator
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/cmd/sign/participant/index.ts
|
|
94
|
+
var participant_exports = /* @__PURE__ */ __exportAll({
|
|
95
|
+
finalize: () => finalize$2,
|
|
96
|
+
receive: () => receive$1,
|
|
97
|
+
round1: () => round1$3,
|
|
98
|
+
round2: () => round2$3
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/cmd/sign/index.ts
|
|
102
|
+
var sign_exports = /* @__PURE__ */ __exportAll({
|
|
103
|
+
SignFinalizeContent: () => SignFinalizeContent,
|
|
104
|
+
coordinator: () => coordinator_exports,
|
|
105
|
+
participant: () => participant_exports,
|
|
106
|
+
signingStateDir: () => signingStateDir,
|
|
107
|
+
signingStateDirForGroup: () => signingStateDirForGroup
|
|
108
|
+
});
|
|
109
|
+
//#endregion
|
|
110
|
+
export { dkg_exports as n, checkAridExists as r, sign_exports as t };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=cmd-DNsHd19v.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const require_common = require("./common-CnvAUC2b.cjs");
|
|
2
|
+
let _bcts_envelope = require("@bcts/envelope");
|
|
3
|
+
//#region src/cmd/sign/common.ts
|
|
4
|
+
/**
|
|
5
|
+
* Copyright © 2023-2026 Blockchain Commons, LLC
|
|
6
|
+
* Copyright © 2025-2026 Parity Technologies
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* Common utilities for sign commands.
|
|
10
|
+
*
|
|
11
|
+
* Port of cmd/sign/common.rs from frost-hubert-rust.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Get the signing state directory for a group (without session).
|
|
17
|
+
*
|
|
18
|
+
* Path: `{registry_dir}/group-state/{group_id.hex()}/signing`
|
|
19
|
+
*
|
|
20
|
+
* Port of `signing_state_dir_for_group()` from cmd/sign/common.rs.
|
|
21
|
+
*/
|
|
22
|
+
function signingStateDirForGroup(registryPath, groupIdHex) {
|
|
23
|
+
return `${require_common.groupStateDir(registryPath, groupIdHex)}/signing`;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get the signing state directory for a given registry path, group ID, and session ID.
|
|
27
|
+
*
|
|
28
|
+
* Path: `{registry_dir}/group-state/{group_id.hex()}/signing/{session_id.hex()}`
|
|
29
|
+
*
|
|
30
|
+
* Port of `signing_state_dir()` from cmd/sign/common.rs.
|
|
31
|
+
*/
|
|
32
|
+
function signingStateDir(registryPath, groupIdHex, sessionIdHex) {
|
|
33
|
+
return `${signingStateDirForGroup(registryPath, groupIdHex)}/${sessionIdHex}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Content wrapper for signFinalize events.
|
|
37
|
+
*
|
|
38
|
+
* This wraps an envelope with a unit subject and type assertion
|
|
39
|
+
* "signFinalize", implementing the traits required by SealedEvent<T>.
|
|
40
|
+
*
|
|
41
|
+
* Port of `struct SignFinalizeContent` from cmd/sign/common.rs.
|
|
42
|
+
*/
|
|
43
|
+
var SignFinalizeContent = class SignFinalizeContent {
|
|
44
|
+
_envelope;
|
|
45
|
+
constructor(envelope) {
|
|
46
|
+
this._envelope = envelope;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new SignFinalizeContent with a unit subject and type assertion.
|
|
50
|
+
*
|
|
51
|
+
* Port of `SignFinalizeContent::new()` from cmd/sign/common.rs.
|
|
52
|
+
*/
|
|
53
|
+
static new() {
|
|
54
|
+
return new SignFinalizeContent(_bcts_envelope.Envelope.unit().addType("signFinalize"));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Adds an assertion to the content envelope.
|
|
58
|
+
*
|
|
59
|
+
* Port of `SignFinalizeContent::add_assertion()` from cmd/sign/common.rs.
|
|
60
|
+
*/
|
|
61
|
+
addAssertion(predicate, object) {
|
|
62
|
+
return new SignFinalizeContent(this._envelope.addAssertion(predicate, object));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Returns the inner envelope.
|
|
66
|
+
*
|
|
67
|
+
* Port of `SignFinalizeContent::envelope()` from cmd/sign/common.rs.
|
|
68
|
+
*/
|
|
69
|
+
envelope() {
|
|
70
|
+
return this._envelope;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Creates a SignFinalizeContent from an envelope with validation.
|
|
74
|
+
*
|
|
75
|
+
* Validates that the envelope has a unit subject and type "signFinalize".
|
|
76
|
+
*
|
|
77
|
+
* Port of `TryFrom<Envelope> for SignFinalizeContent` from cmd/sign/common.rs.
|
|
78
|
+
*/
|
|
79
|
+
static fromEnvelope(envelope) {
|
|
80
|
+
envelope.checkSubjectUnit();
|
|
81
|
+
envelope.checkType("signFinalize");
|
|
82
|
+
return new SignFinalizeContent(envelope);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Converts this SignFinalizeContent to an Envelope.
|
|
86
|
+
*
|
|
87
|
+
* Port of `From<SignFinalizeContent> for Envelope` from cmd/sign/common.rs.
|
|
88
|
+
*/
|
|
89
|
+
toEnvelope() {
|
|
90
|
+
return this._envelope;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
Object.defineProperty(exports, "SignFinalizeContent", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function() {
|
|
97
|
+
return SignFinalizeContent;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "signingStateDir", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function() {
|
|
103
|
+
return signingStateDir;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "signingStateDirForGroup", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function() {
|
|
109
|
+
return signingStateDirForGroup;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=common-7-BOgaTt.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|