@ocap/mpc-hsm 0.0.0-stage → 1.33.6
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/esm/constants.d.mts +76 -0
- package/esm/constants.mjs +78 -0
- package/esm/dkg.d.mts +279 -0
- package/esm/dkg.mjs +903 -0
- package/esm/index.d.mts +9 -0
- package/esm/index.mjs +10 -0
- package/esm/mta.d.mts +63 -0
- package/esm/mta.mjs +275 -0
- package/esm/ot.d.mts +187 -0
- package/esm/ot.mjs +593 -0
- package/esm/presign.d.mts +242 -0
- package/esm/presign.mjs +951 -0
- package/esm/secp256k1-scalar.d.mts +141 -0
- package/esm/secp256k1-scalar.mjs +465 -0
- package/esm/sign.d.mts +113 -0
- package/esm/sign.mjs +225 -0
- package/esm/tweak.d.mts +100 -0
- package/esm/tweak.mjs +168 -0
- package/lib/constants.cjs +136 -0
- package/lib/constants.d.cts +76 -0
- package/lib/dkg.cjs +910 -0
- package/lib/dkg.d.cts +279 -0
- package/lib/index.cjs +171 -0
- package/lib/index.d.cts +9 -0
- package/lib/mta.cjs +280 -0
- package/lib/mta.d.cts +63 -0
- package/lib/ot.cjs +609 -0
- package/lib/ot.d.cts +187 -0
- package/lib/presign.cjs +954 -0
- package/lib/presign.d.cts +242 -0
- package/lib/secp256k1-scalar.cjs +518 -0
- package/lib/secp256k1-scalar.d.cts +141 -0
- package/lib/sign.cjs +233 -0
- package/lib/sign.d.cts +113 -0
- package/lib/tweak.cjs +178 -0
- package/lib/tweak.d.cts +100 -0
- package/package.json +75 -4
- package/README.md +0 -3
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/constants.ts
|
|
3
|
+
/**
|
|
4
|
+
* Protocol, curve, domain-separation, and 3D envelope constants for `@ocap/mpc-hsm`.
|
|
5
|
+
*
|
|
6
|
+
* Security invariants:
|
|
7
|
+
* - Virtual root secret `x_root` and child secret `x_child = (x_root + t_tweak) mod n` are NEVER
|
|
8
|
+
* materialized on any online machine, and zero secret-key export methods exist in this package.
|
|
9
|
+
* - All Fiat-Shamir challenges, NUMS generators, tweaks, OT row pads, presignature IDs, and
|
|
10
|
+
* Groth-Shoup re-randomization scalars use explicit versioned domain-separation tags.
|
|
11
|
+
*/
|
|
12
|
+
const MPC_PROTOCOL_VERSION = 2;
|
|
13
|
+
const DEFAULT_ONLINE_THRESHOLD = 3;
|
|
14
|
+
const DEFAULT_ONLINE_PARTIES = 5;
|
|
15
|
+
const DEFAULT_COLD_THRESHOLD = 2;
|
|
16
|
+
const DEFAULT_COLD_GUARDIANS = 3;
|
|
17
|
+
const MAX_MPC_CLUSTER_NODES = 7;
|
|
18
|
+
const BSGS_M = 680;
|
|
19
|
+
const OT_KAPPA_BITS = 128;
|
|
20
|
+
const OT_KAPPA_BYTES = 16;
|
|
21
|
+
const OT_BASE_PARTIAL_BITS = 256;
|
|
22
|
+
const OT_LHL_EXTRA_BITS = 512;
|
|
23
|
+
const OT_GADGET_BITS = 768;
|
|
24
|
+
const OT_SACRIFICE_BITS = 256;
|
|
25
|
+
const OT_EXTENSION_ROWS = 1024;
|
|
26
|
+
const OT_COLUMN_BYTES = 128;
|
|
27
|
+
const MAX_MPC_SIGN_REQUEST_BYTES = 262144;
|
|
28
|
+
const MAX_MPC_PEER_MESSAGE_BYTES = 524288;
|
|
29
|
+
const MAX_RECOVERY_PACKAGE_BYTES = 2097152;
|
|
30
|
+
const MAX_RULE_YAML_BYTES = 16384;
|
|
31
|
+
const MAX_RULE_DAG_NODES = 128;
|
|
32
|
+
const MAX_ON_DEMAND_SILENCE_SECONDS = 604800;
|
|
33
|
+
const ESCAPE_DRILL_MAX_AGE_SECONDS = 2592e3;
|
|
34
|
+
const SECP256K1_P = 115792089237316195423570985008687907853269984665640564039457584007908834671663n;
|
|
35
|
+
const SECP256K1_N = 115792089237316195423570985008687907852837564279074904382605163141518161494337n;
|
|
36
|
+
const SECP256K1_HALF_N = 57896044618658097711785492504343953926418782139537452191302581570759080747168n;
|
|
37
|
+
const PEDERSEN_H_MESSAGE = "ARC-MPC-SECP256K1-PEDERSEN-H-V1";
|
|
38
|
+
const PEDERSEN_H_DST = "ARC-MPC-H2C-SECP256K1-XMD:SHA-256_SSWU_RO_-V1";
|
|
39
|
+
const PEDERSEN_H_COMPRESSED_HEX = "03b7e44a654b748045cabc6886533d219403b0666f20cec024e4988e3896598eb4";
|
|
40
|
+
const DST_RULE_TWEAK_V1 = "ARC-MPC-RULE-TWEAK-V1";
|
|
41
|
+
const DST_CHILD_TWEAK_V1 = "ARC-MPC-CHILD-TWEAK-V1";
|
|
42
|
+
const DST_DKG_CTX_V2 = "ARC-MPC-DKG-CTX-V2";
|
|
43
|
+
const DST_DKG_STEP1_AUTH_V1 = "ARC-MPC-DKG-STEP1-AUTH-V1";
|
|
44
|
+
const DST_DKG_COM_V2 = "ARC-MPC-DKG-COM-V2";
|
|
45
|
+
const DST_DKG_POK_V2 = "ARC-MPC-DKG-POK-V2";
|
|
46
|
+
const DST_DKG_SHARE_AAD_V2 = "ARC-MPC-DKG-SHARE-V2";
|
|
47
|
+
const DST_DKG_X25519_HKDF_V2 = "ARC-MPC-DKG-X25519-HKDF-V2";
|
|
48
|
+
const DST_DKG_TRANSCRIPT_V2 = "ARC-MPC-DKG-TRANSCRIPT-V2";
|
|
49
|
+
const DST_DKG_ECHO_V2 = "ARC-MPC-DKG-ECHO-V2";
|
|
50
|
+
const DST_DKG_SELFTEST_V2 = "ARC-MPC-DKG-SELFTEST-V2";
|
|
51
|
+
const DST_BASEOT_S_POK_V1 = "ARC-MPC-BASEOT-S-POK-V1";
|
|
52
|
+
const DST_BASEOT_KEY_V1 = "ARC-MPC-BASEOT-KEY-V1";
|
|
53
|
+
const DST_OT_CTR_IV_V1 = "ARC-MPC-OT-CTR-IV-V1";
|
|
54
|
+
const DST_KOS15_CHI_V1 = "ARC-MPC-KOS15-CHI-V1";
|
|
55
|
+
const DST_LHL_GADGET_V1 = "ARC-MPC-LHL-GADGET-V1";
|
|
56
|
+
const DST_COT_ROW_V1 = "ARC-MPC-COT-ROW-V1";
|
|
57
|
+
const DST_MTA_ETA_V1 = "ARC-MPC-MTA-ETA-V1";
|
|
58
|
+
const DST_PRESIG_COM_V1 = "ARC-MPC-PRESIG-COM-V1";
|
|
59
|
+
const DST_PRESIG_ID_V1 = "ARC-MPC-PRESIG-ID-V1";
|
|
60
|
+
const DST_PRESIG_POK_GAMMA_V1 = "ARC-MPC-PRESIG-POK-GAMMA-V1";
|
|
61
|
+
const DST_PRESIG_POK_B_V1 = "ARC-MPC-PRESIG-POK-B-V1";
|
|
62
|
+
const DST_PRESIG_POK_CK_V1 = "ARC-MPC-PRESIG-POK-CK-V1";
|
|
63
|
+
const DST_PRESIG_ZETA_HKDF_V1 = "ARC-MPC-PRESIG-ZETA-HKDF-V1";
|
|
64
|
+
const DST_PRESIG_ZETA_V1 = "ARC-MPC-PRESIG-ZETA-V1";
|
|
65
|
+
const DST_PRESIG_PI_LIN_K_V1 = "ARC-MPC-PRESIG-PI-LIN-K-V1";
|
|
66
|
+
const DST_PRESIG_PI_POK_Z_V1 = "ARC-MPC-PRESIG-PI-POK-Z-V1";
|
|
67
|
+
const DST_PRESIG_RERAND_V1 = "ARC-MPC-PRESIG-RERAND-V1";
|
|
68
|
+
const FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY = "escape-canary";
|
|
69
|
+
var MpcProtocolError = class extends Error {
|
|
70
|
+
constructor(code, message, culpritSlot) {
|
|
71
|
+
super(message);
|
|
72
|
+
this.name = "MpcProtocolError";
|
|
73
|
+
this.code = code;
|
|
74
|
+
if (culpritSlot !== void 0) this.culpritSlot = culpritSlot;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
exports.BSGS_M = BSGS_M;
|
|
80
|
+
exports.DEFAULT_COLD_GUARDIANS = DEFAULT_COLD_GUARDIANS;
|
|
81
|
+
exports.DEFAULT_COLD_THRESHOLD = DEFAULT_COLD_THRESHOLD;
|
|
82
|
+
exports.DEFAULT_ONLINE_PARTIES = DEFAULT_ONLINE_PARTIES;
|
|
83
|
+
exports.DEFAULT_ONLINE_THRESHOLD = DEFAULT_ONLINE_THRESHOLD;
|
|
84
|
+
exports.DST_BASEOT_KEY_V1 = DST_BASEOT_KEY_V1;
|
|
85
|
+
exports.DST_BASEOT_S_POK_V1 = DST_BASEOT_S_POK_V1;
|
|
86
|
+
exports.DST_CHILD_TWEAK_V1 = DST_CHILD_TWEAK_V1;
|
|
87
|
+
exports.DST_COT_ROW_V1 = DST_COT_ROW_V1;
|
|
88
|
+
exports.DST_DKG_COM_V2 = DST_DKG_COM_V2;
|
|
89
|
+
exports.DST_DKG_CTX_V2 = DST_DKG_CTX_V2;
|
|
90
|
+
exports.DST_DKG_ECHO_V2 = DST_DKG_ECHO_V2;
|
|
91
|
+
exports.DST_DKG_POK_V2 = DST_DKG_POK_V2;
|
|
92
|
+
exports.DST_DKG_SELFTEST_V2 = DST_DKG_SELFTEST_V2;
|
|
93
|
+
exports.DST_DKG_SHARE_AAD_V2 = DST_DKG_SHARE_AAD_V2;
|
|
94
|
+
exports.DST_DKG_STEP1_AUTH_V1 = DST_DKG_STEP1_AUTH_V1;
|
|
95
|
+
exports.DST_DKG_TRANSCRIPT_V2 = DST_DKG_TRANSCRIPT_V2;
|
|
96
|
+
exports.DST_DKG_X25519_HKDF_V2 = DST_DKG_X25519_HKDF_V2;
|
|
97
|
+
exports.DST_KOS15_CHI_V1 = DST_KOS15_CHI_V1;
|
|
98
|
+
exports.DST_LHL_GADGET_V1 = DST_LHL_GADGET_V1;
|
|
99
|
+
exports.DST_MTA_ETA_V1 = DST_MTA_ETA_V1;
|
|
100
|
+
exports.DST_OT_CTR_IV_V1 = DST_OT_CTR_IV_V1;
|
|
101
|
+
exports.DST_PRESIG_COM_V1 = DST_PRESIG_COM_V1;
|
|
102
|
+
exports.DST_PRESIG_ID_V1 = DST_PRESIG_ID_V1;
|
|
103
|
+
exports.DST_PRESIG_PI_LIN_K_V1 = DST_PRESIG_PI_LIN_K_V1;
|
|
104
|
+
exports.DST_PRESIG_PI_POK_Z_V1 = DST_PRESIG_PI_POK_Z_V1;
|
|
105
|
+
exports.DST_PRESIG_POK_B_V1 = DST_PRESIG_POK_B_V1;
|
|
106
|
+
exports.DST_PRESIG_POK_CK_V1 = DST_PRESIG_POK_CK_V1;
|
|
107
|
+
exports.DST_PRESIG_POK_GAMMA_V1 = DST_PRESIG_POK_GAMMA_V1;
|
|
108
|
+
exports.DST_PRESIG_RERAND_V1 = DST_PRESIG_RERAND_V1;
|
|
109
|
+
exports.DST_PRESIG_ZETA_HKDF_V1 = DST_PRESIG_ZETA_HKDF_V1;
|
|
110
|
+
exports.DST_PRESIG_ZETA_V1 = DST_PRESIG_ZETA_V1;
|
|
111
|
+
exports.DST_RULE_TWEAK_V1 = DST_RULE_TWEAK_V1;
|
|
112
|
+
exports.ESCAPE_DRILL_MAX_AGE_SECONDS = ESCAPE_DRILL_MAX_AGE_SECONDS;
|
|
113
|
+
exports.FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY = FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY;
|
|
114
|
+
exports.MAX_MPC_CLUSTER_NODES = MAX_MPC_CLUSTER_NODES;
|
|
115
|
+
exports.MAX_MPC_PEER_MESSAGE_BYTES = MAX_MPC_PEER_MESSAGE_BYTES;
|
|
116
|
+
exports.MAX_MPC_SIGN_REQUEST_BYTES = MAX_MPC_SIGN_REQUEST_BYTES;
|
|
117
|
+
exports.MAX_ON_DEMAND_SILENCE_SECONDS = MAX_ON_DEMAND_SILENCE_SECONDS;
|
|
118
|
+
exports.MAX_RECOVERY_PACKAGE_BYTES = MAX_RECOVERY_PACKAGE_BYTES;
|
|
119
|
+
exports.MAX_RULE_DAG_NODES = MAX_RULE_DAG_NODES;
|
|
120
|
+
exports.MAX_RULE_YAML_BYTES = MAX_RULE_YAML_BYTES;
|
|
121
|
+
exports.MPC_PROTOCOL_VERSION = MPC_PROTOCOL_VERSION;
|
|
122
|
+
exports.MpcProtocolError = MpcProtocolError;
|
|
123
|
+
exports.OT_BASE_PARTIAL_BITS = OT_BASE_PARTIAL_BITS;
|
|
124
|
+
exports.OT_COLUMN_BYTES = OT_COLUMN_BYTES;
|
|
125
|
+
exports.OT_EXTENSION_ROWS = OT_EXTENSION_ROWS;
|
|
126
|
+
exports.OT_GADGET_BITS = OT_GADGET_BITS;
|
|
127
|
+
exports.OT_KAPPA_BITS = OT_KAPPA_BITS;
|
|
128
|
+
exports.OT_KAPPA_BYTES = OT_KAPPA_BYTES;
|
|
129
|
+
exports.OT_LHL_EXTRA_BITS = OT_LHL_EXTRA_BITS;
|
|
130
|
+
exports.OT_SACRIFICE_BITS = OT_SACRIFICE_BITS;
|
|
131
|
+
exports.PEDERSEN_H_COMPRESSED_HEX = PEDERSEN_H_COMPRESSED_HEX;
|
|
132
|
+
exports.PEDERSEN_H_DST = PEDERSEN_H_DST;
|
|
133
|
+
exports.PEDERSEN_H_MESSAGE = PEDERSEN_H_MESSAGE;
|
|
134
|
+
exports.SECP256K1_HALF_N = SECP256K1_HALF_N;
|
|
135
|
+
exports.SECP256K1_N = SECP256K1_N;
|
|
136
|
+
exports.SECP256K1_P = SECP256K1_P;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/constants.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Protocol, curve, domain-separation, and 3D envelope constants for `@ocap/mpc-hsm`.
|
|
4
|
+
*
|
|
5
|
+
* Security invariants:
|
|
6
|
+
* - Virtual root secret `x_root` and child secret `x_child = (x_root + t_tweak) mod n` are NEVER
|
|
7
|
+
* materialized on any online machine, and zero secret-key export methods exist in this package.
|
|
8
|
+
* - All Fiat-Shamir challenges, NUMS generators, tweaks, OT row pads, presignature IDs, and
|
|
9
|
+
* Groth-Shoup re-randomization scalars use explicit versioned domain-separation tags.
|
|
10
|
+
*/
|
|
11
|
+
declare const MPC_PROTOCOL_VERSION: 2;
|
|
12
|
+
declare const DEFAULT_ONLINE_THRESHOLD: 3;
|
|
13
|
+
declare const DEFAULT_ONLINE_PARTIES: 5;
|
|
14
|
+
declare const DEFAULT_COLD_THRESHOLD: 2;
|
|
15
|
+
declare const DEFAULT_COLD_GUARDIANS: 3;
|
|
16
|
+
declare const MAX_MPC_CLUSTER_NODES: 7;
|
|
17
|
+
declare const BSGS_M: 680;
|
|
18
|
+
declare const OT_KAPPA_BITS: 128;
|
|
19
|
+
declare const OT_KAPPA_BYTES: 16;
|
|
20
|
+
declare const OT_BASE_PARTIAL_BITS: 256;
|
|
21
|
+
declare const OT_LHL_EXTRA_BITS: 512;
|
|
22
|
+
declare const OT_GADGET_BITS: 768;
|
|
23
|
+
declare const OT_SACRIFICE_BITS: 256;
|
|
24
|
+
declare const OT_EXTENSION_ROWS: 1024;
|
|
25
|
+
declare const OT_COLUMN_BYTES: 128;
|
|
26
|
+
declare const MAX_MPC_SIGN_REQUEST_BYTES: 262144;
|
|
27
|
+
declare const MAX_MPC_PEER_MESSAGE_BYTES: 524288;
|
|
28
|
+
declare const MAX_RECOVERY_PACKAGE_BYTES: 2097152;
|
|
29
|
+
declare const MAX_RULE_YAML_BYTES: 16384;
|
|
30
|
+
declare const MAX_RULE_DAG_NODES: 128;
|
|
31
|
+
declare const MAX_ON_DEMAND_SILENCE_SECONDS: 604800;
|
|
32
|
+
declare const ESCAPE_DRILL_MAX_AGE_SECONDS: 2592000;
|
|
33
|
+
declare const SECP256K1_P = 115792089237316195423570985008687907853269984665640564039457584007908834671663n;
|
|
34
|
+
declare const SECP256K1_N = 115792089237316195423570985008687907852837564279074904382605163141518161494337n;
|
|
35
|
+
declare const SECP256K1_HALF_N = 57896044618658097711785492504343953926418782139537452191302581570759080747168n;
|
|
36
|
+
declare const PEDERSEN_H_MESSAGE: "ARC-MPC-SECP256K1-PEDERSEN-H-V1";
|
|
37
|
+
declare const PEDERSEN_H_DST: "ARC-MPC-H2C-SECP256K1-XMD:SHA-256_SSWU_RO_-V1";
|
|
38
|
+
declare const PEDERSEN_H_COMPRESSED_HEX: "03b7e44a654b748045cabc6886533d219403b0666f20cec024e4988e3896598eb4";
|
|
39
|
+
declare const DST_RULE_TWEAK_V1: "ARC-MPC-RULE-TWEAK-V1";
|
|
40
|
+
declare const DST_CHILD_TWEAK_V1: "ARC-MPC-CHILD-TWEAK-V1";
|
|
41
|
+
declare const DST_DKG_CTX_V2: "ARC-MPC-DKG-CTX-V2";
|
|
42
|
+
declare const DST_DKG_STEP1_AUTH_V1: "ARC-MPC-DKG-STEP1-AUTH-V1";
|
|
43
|
+
declare const DST_DKG_COM_V2: "ARC-MPC-DKG-COM-V2";
|
|
44
|
+
declare const DST_DKG_POK_V2: "ARC-MPC-DKG-POK-V2";
|
|
45
|
+
declare const DST_DKG_SHARE_AAD_V2: "ARC-MPC-DKG-SHARE-V2";
|
|
46
|
+
declare const DST_DKG_X25519_HKDF_V2: "ARC-MPC-DKG-X25519-HKDF-V2";
|
|
47
|
+
declare const DST_DKG_TRANSCRIPT_V2: "ARC-MPC-DKG-TRANSCRIPT-V2";
|
|
48
|
+
declare const DST_DKG_ECHO_V2: "ARC-MPC-DKG-ECHO-V2";
|
|
49
|
+
declare const DST_DKG_SELFTEST_V2: "ARC-MPC-DKG-SELFTEST-V2";
|
|
50
|
+
declare const DST_BASEOT_S_POK_V1: "ARC-MPC-BASEOT-S-POK-V1";
|
|
51
|
+
declare const DST_BASEOT_KEY_V1: "ARC-MPC-BASEOT-KEY-V1";
|
|
52
|
+
declare const DST_OT_CTR_IV_V1: "ARC-MPC-OT-CTR-IV-V1";
|
|
53
|
+
declare const DST_KOS15_CHI_V1: "ARC-MPC-KOS15-CHI-V1";
|
|
54
|
+
declare const DST_LHL_GADGET_V1: "ARC-MPC-LHL-GADGET-V1";
|
|
55
|
+
declare const DST_COT_ROW_V1: "ARC-MPC-COT-ROW-V1";
|
|
56
|
+
declare const DST_MTA_ETA_V1: "ARC-MPC-MTA-ETA-V1";
|
|
57
|
+
declare const DST_PRESIG_COM_V1: "ARC-MPC-PRESIG-COM-V1";
|
|
58
|
+
declare const DST_PRESIG_ID_V1: "ARC-MPC-PRESIG-ID-V1";
|
|
59
|
+
declare const DST_PRESIG_POK_GAMMA_V1: "ARC-MPC-PRESIG-POK-GAMMA-V1";
|
|
60
|
+
declare const DST_PRESIG_POK_B_V1: "ARC-MPC-PRESIG-POK-B-V1";
|
|
61
|
+
declare const DST_PRESIG_POK_CK_V1: "ARC-MPC-PRESIG-POK-CK-V1";
|
|
62
|
+
declare const DST_PRESIG_ZETA_HKDF_V1: "ARC-MPC-PRESIG-ZETA-HKDF-V1";
|
|
63
|
+
declare const DST_PRESIG_ZETA_V1: "ARC-MPC-PRESIG-ZETA-V1";
|
|
64
|
+
declare const DST_PRESIG_PI_LIN_K_V1: "ARC-MPC-PRESIG-PI-LIN-K-V1";
|
|
65
|
+
declare const DST_PRESIG_PI_POK_Z_V1: "ARC-MPC-PRESIG-PI-POK-Z-V1";
|
|
66
|
+
declare const DST_PRESIG_RERAND_V1: "ARC-MPC-PRESIG-RERAND-V1";
|
|
67
|
+
declare const FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY: "escape-canary";
|
|
68
|
+
type MpcRootLifecycleState = 'INITIALIZING' | 'PROVISIONED_UNDRILLED' | 'ACTIVE' | 'FROZEN_PANIC';
|
|
69
|
+
type MpcErrorCode = 'INVALID_SCALAR' | 'INVALID_POINT' | 'INVALID_PARAMETER' | 'INVALID_ETH_ADDRESS' | 'FORBIDDEN_ONLINE_ROLE' | 'DEGENERATE_TWEAK' | 'DKG_INVALID_CONFIG' | 'DKG_COMMITMENT_MISMATCH' | 'DKG_POK_INVALID' | 'DKG_SHARE_DECRYPT_FAILED' | 'DKG_FELDMAN_VERIFY_FAILED' | 'DKG_DEGENERATE_KEY' | 'DKG_COLD_PLUGIN_FAILED' | 'DKG_ECHO_LOCK_CONFLICT' | 'DKG_ECHO_INVALID' | 'DKG_SELFTEST_FAILED' | 'BASE_OT_INVALID_PROOF' | 'BASE_OT_INVALID_POINT' | 'OT_STATE_INVALIDATED' | 'OT_NONCE_REUSE' | 'KOS15_CORRELATION_CHECK_FAILED' | 'MTA_COMMITMENT_MISMATCH' | 'MTA_CONSISTENCY_CHECK_FAILED' | 'PRESIG_INVALID_SUBSET' | 'PRESIG_COMMITMENT_MISMATCH' | 'PRESIG_POK_INVALID' | 'PRESIG_ROUND3_E_MISMATCH' | 'PRESIG_DEGENERATE_NONCE' | 'PRESIG_PI_LIN_K_INVALID' | 'PRESIG_PI_POK_Z_INVALID' | 'PRESIG_GLOBAL_SUM_MISMATCH' | 'PRESIG_STATE_VIOLATION' | 'PRESIG_ALREADY_CONSUMED' | 'PRESIG_SUBSET_MISMATCH' | 'PRESIG_RERAND_BURN_RETRY' | 'SIGN_SHARE_VERIFICATION_FAILED' | 'SIGN_AGGREGATION_FAILED';
|
|
70
|
+
declare class MpcProtocolError extends Error {
|
|
71
|
+
readonly code: MpcErrorCode;
|
|
72
|
+
readonly culpritSlot?: number;
|
|
73
|
+
constructor(code: MpcErrorCode, message: string, culpritSlot?: number);
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { BSGS_M, DEFAULT_COLD_GUARDIANS, DEFAULT_COLD_THRESHOLD, DEFAULT_ONLINE_PARTIES, DEFAULT_ONLINE_THRESHOLD, DST_BASEOT_KEY_V1, DST_BASEOT_S_POK_V1, DST_CHILD_TWEAK_V1, DST_COT_ROW_V1, DST_DKG_COM_V2, DST_DKG_CTX_V2, DST_DKG_ECHO_V2, DST_DKG_POK_V2, DST_DKG_SELFTEST_V2, DST_DKG_SHARE_AAD_V2, DST_DKG_STEP1_AUTH_V1, DST_DKG_TRANSCRIPT_V2, DST_DKG_X25519_HKDF_V2, DST_KOS15_CHI_V1, DST_LHL_GADGET_V1, DST_MTA_ETA_V1, DST_OT_CTR_IV_V1, DST_PRESIG_COM_V1, DST_PRESIG_ID_V1, DST_PRESIG_PI_LIN_K_V1, DST_PRESIG_PI_POK_Z_V1, DST_PRESIG_POK_B_V1, DST_PRESIG_POK_CK_V1, DST_PRESIG_POK_GAMMA_V1, DST_PRESIG_RERAND_V1, DST_PRESIG_ZETA_HKDF_V1, DST_PRESIG_ZETA_V1, DST_RULE_TWEAK_V1, ESCAPE_DRILL_MAX_AGE_SECONDS, FORBIDDEN_ONLINE_ROLE_ESCAPE_CANARY, MAX_MPC_CLUSTER_NODES, MAX_MPC_PEER_MESSAGE_BYTES, MAX_MPC_SIGN_REQUEST_BYTES, MAX_ON_DEMAND_SILENCE_SECONDS, MAX_RECOVERY_PACKAGE_BYTES, MAX_RULE_DAG_NODES, MAX_RULE_YAML_BYTES, MPC_PROTOCOL_VERSION, MpcErrorCode, MpcProtocolError, MpcRootLifecycleState, OT_BASE_PARTIAL_BITS, OT_COLUMN_BYTES, OT_EXTENSION_ROWS, OT_GADGET_BITS, OT_KAPPA_BITS, OT_KAPPA_BYTES, OT_LHL_EXTRA_BITS, OT_SACRIFICE_BITS, PEDERSEN_H_COMPRESSED_HEX, PEDERSEN_H_DST, PEDERSEN_H_MESSAGE, SECP256K1_HALF_N, SECP256K1_N, SECP256K1_P };
|