@bitgo/public-types 5.96.2 → 5.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/schema/mpcv2/signing/eddsaSigningRound.d.ts +61 -0
- package/dist/src/schema/mpcv2/signing/eddsaSigningRound.js +75 -0
- package/dist/src/schema/mpcv2/signing/eddsaSigningRound.js.map +1 -0
- package/dist/src/schema/mpcv2/signing/index.d.ts +1 -0
- package/dist/src/schema/mpcv2/signing/index.js +1 -0
- package/dist/src/schema/mpcv2/signing/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/message.d.ts +3 -0
- package/dist/src/schema/transactionRequest/transaction.d.ts +3 -0
- package/dist/src/schema/transactionRequest/transactionRequest.d.ts +12 -0
- package/dist/src/schema/transactionRequest/transactionState.d.ts +3 -0
- package/dist/src/schema/transactionRequest/transactionState.js +3 -0
- package/dist/src/schema/transactionRequest/transactionState.js.map +1 -1
- package/dist/src/schema/webhook/addWalletWebhookRequest.d.ts +2 -2
- package/dist/src/schema/webhook/enterpriseWebhooks.d.ts +3 -0
- package/dist/src/schema/webhook/organizationWebhooks.d.ts +3 -0
- package/dist/src/schema/webhook/webhook.d.ts +3 -0
- package/package.json +1 -1
- package/src/schema/mpcv2/signing/eddsaSigningRound.ts +117 -0
- package/src/schema/mpcv2/signing/index.ts +1 -0
- package/src/schema/transactionRequest/transactionState.ts +3 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const EddsaMPCv2SignatureShareRound1Input: t.IntersectionC<[t.TypeC<{
|
|
3
|
+
type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">]>;
|
|
4
|
+
}>, t.TypeC<{
|
|
5
|
+
type: t.LiteralC<"round1Input">;
|
|
6
|
+
data: t.TypeC<{
|
|
7
|
+
msg1: t.TypeC<{
|
|
8
|
+
message: t.StringC;
|
|
9
|
+
signature: t.StringC;
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
12
|
+
}>]>;
|
|
13
|
+
export type EddsaMPCv2SignatureShareRound1Input = t.TypeOf<typeof EddsaMPCv2SignatureShareRound1Input>;
|
|
14
|
+
export declare const EddsaMPCv2SignatureShareRound1Output: t.IntersectionC<[t.TypeC<{
|
|
15
|
+
type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">]>;
|
|
16
|
+
}>, t.TypeC<{
|
|
17
|
+
type: t.LiteralC<"round1Output">;
|
|
18
|
+
data: t.TypeC<{
|
|
19
|
+
msg1: t.TypeC<{
|
|
20
|
+
message: t.StringC;
|
|
21
|
+
signature: t.StringC;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
}>]>;
|
|
25
|
+
export type EddsaMPCv2SignatureShareRound1Output = t.TypeOf<typeof EddsaMPCv2SignatureShareRound1Output>;
|
|
26
|
+
export declare const EddsaMPCv2SignatureShareRound2Input: t.IntersectionC<[t.TypeC<{
|
|
27
|
+
type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">]>;
|
|
28
|
+
}>, t.TypeC<{
|
|
29
|
+
type: t.LiteralC<"round2Input">;
|
|
30
|
+
data: t.TypeC<{
|
|
31
|
+
msg2: t.TypeC<{
|
|
32
|
+
message: t.StringC;
|
|
33
|
+
signature: t.StringC;
|
|
34
|
+
}>;
|
|
35
|
+
}>;
|
|
36
|
+
}>]>;
|
|
37
|
+
export type EddsaMPCv2SignatureShareRound2Input = t.TypeOf<typeof EddsaMPCv2SignatureShareRound2Input>;
|
|
38
|
+
export declare const EddsaMPCv2SignatureShareRound2Output: t.IntersectionC<[t.TypeC<{
|
|
39
|
+
type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">]>;
|
|
40
|
+
}>, t.TypeC<{
|
|
41
|
+
type: t.LiteralC<"round2Output">;
|
|
42
|
+
data: t.TypeC<{
|
|
43
|
+
msg2: t.TypeC<{
|
|
44
|
+
message: t.StringC;
|
|
45
|
+
signature: t.StringC;
|
|
46
|
+
}>;
|
|
47
|
+
}>;
|
|
48
|
+
}>]>;
|
|
49
|
+
export type EddsaMPCv2SignatureShareRound2Output = t.TypeOf<typeof EddsaMPCv2SignatureShareRound2Output>;
|
|
50
|
+
export declare const EddsaMPCv2SignatureShareRound3Input: t.IntersectionC<[t.TypeC<{
|
|
51
|
+
type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">]>;
|
|
52
|
+
}>, t.TypeC<{
|
|
53
|
+
type: t.LiteralC<"round3Input">;
|
|
54
|
+
data: t.TypeC<{
|
|
55
|
+
msg3: t.TypeC<{
|
|
56
|
+
message: t.StringC;
|
|
57
|
+
signature: t.StringC;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
}>]>;
|
|
61
|
+
export type EddsaMPCv2SignatureShareRound3Input = t.TypeOf<typeof EddsaMPCv2SignatureShareRound3Input>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.EddsaMPCv2SignatureShareRound3Input = exports.EddsaMPCv2SignatureShareRound2Output = exports.EddsaMPCv2SignatureShareRound2Input = exports.EddsaMPCv2SignatureShareRound1Output = exports.EddsaMPCv2SignatureShareRound1Input = void 0;
|
|
27
|
+
const t = __importStar(require("io-ts"));
|
|
28
|
+
const common_1 = require("../common");
|
|
29
|
+
const signingRound_1 = require("./signingRound");
|
|
30
|
+
exports.EddsaMPCv2SignatureShareRound1Input = t.intersection([
|
|
31
|
+
signingRound_1.MPCv2SignatureShareBase,
|
|
32
|
+
t.type({
|
|
33
|
+
type: t.literal("round1Input"),
|
|
34
|
+
data: t.type({
|
|
35
|
+
msg1: common_1.EddsaMPCv2SignedMessage,
|
|
36
|
+
}),
|
|
37
|
+
}, "EddsaMPCv2SignatureShareRound1Input"),
|
|
38
|
+
]);
|
|
39
|
+
exports.EddsaMPCv2SignatureShareRound1Output = t.intersection([
|
|
40
|
+
signingRound_1.MPCv2SignatureShareBase,
|
|
41
|
+
t.type({
|
|
42
|
+
type: t.literal("round1Output"),
|
|
43
|
+
data: t.type({
|
|
44
|
+
msg1: common_1.EddsaMPCv2SignedMessage,
|
|
45
|
+
}),
|
|
46
|
+
}, "EddsaMPCv2SignatureShareRound1Output"),
|
|
47
|
+
]);
|
|
48
|
+
exports.EddsaMPCv2SignatureShareRound2Input = t.intersection([
|
|
49
|
+
signingRound_1.MPCv2SignatureShareBase,
|
|
50
|
+
t.type({
|
|
51
|
+
type: t.literal("round2Input"),
|
|
52
|
+
data: t.type({
|
|
53
|
+
msg2: common_1.EddsaMPCv2SignedMessage,
|
|
54
|
+
}),
|
|
55
|
+
}, "EddsaMPCv2SignatureShareRound2Input"),
|
|
56
|
+
]);
|
|
57
|
+
exports.EddsaMPCv2SignatureShareRound2Output = t.intersection([
|
|
58
|
+
signingRound_1.MPCv2SignatureShareBase,
|
|
59
|
+
t.type({
|
|
60
|
+
type: t.literal("round2Output"),
|
|
61
|
+
data: t.type({
|
|
62
|
+
msg2: common_1.EddsaMPCv2SignedMessage,
|
|
63
|
+
}),
|
|
64
|
+
}, "EddsaMPCv2SignatureShareRound2Output"),
|
|
65
|
+
]);
|
|
66
|
+
exports.EddsaMPCv2SignatureShareRound3Input = t.intersection([
|
|
67
|
+
signingRound_1.MPCv2SignatureShareBase,
|
|
68
|
+
t.type({
|
|
69
|
+
type: t.literal("round3Input"),
|
|
70
|
+
data: t.type({
|
|
71
|
+
msg3: common_1.EddsaMPCv2SignedMessage,
|
|
72
|
+
}),
|
|
73
|
+
}, "EddsaMPCv2SignatureShareRound3Input"),
|
|
74
|
+
]);
|
|
75
|
+
//# sourceMappingURL=eddsaSigningRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eddsaSigningRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/eddsaSigningRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,sCAAoD;AACpD,iDAAyD;AAQ5C,QAAA,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAChE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,qCAAqC,CACtC;CACF,CAAC,CAAC;AAYU,QAAA,oCAAoC,GAAG,CAAC,CAAC,YAAY,CAAC;IACjE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC/B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,sCAAsC,CACvC;CACF,CAAC,CAAC;AAYU,QAAA,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAChE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,qCAAqC,CACtC;CACF,CAAC,CAAC;AAYU,QAAA,oCAAoC,GAAG,CAAC,CAAC,YAAY,CAAC;IACjE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC/B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,sCAAsC,CACvC;CACF,CAAC,CAAC;AAWU,QAAA,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAChE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,qCAAqC,CACtC;CACF,CAAC,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./mpcv2SigningState"), exports);
|
|
18
18
|
__exportStar(require("./signingRound"), exports);
|
|
19
|
+
__exportStar(require("./eddsaSigningRound"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,iDAA+B;AAC/B,sDAAoC"}
|
|
@@ -9,6 +9,9 @@ export declare const Message: t.IntersectionC<[t.TypeC<{
|
|
|
9
9
|
ecdsaMPCv2Round1: number;
|
|
10
10
|
ecdsaMPCv2Round2: number;
|
|
11
11
|
ecdsaMPCv2Round3: number;
|
|
12
|
+
eddsaMPCv2Round1: number;
|
|
13
|
+
eddsaMPCv2Round2: number;
|
|
14
|
+
eddsaMPCv2Round3: number;
|
|
12
15
|
readyToCombineShares: number;
|
|
13
16
|
signed: number;
|
|
14
17
|
held: number;
|
|
@@ -9,6 +9,9 @@ export declare const Transaction: t.IntersectionC<[t.TypeC<{
|
|
|
9
9
|
ecdsaMPCv2Round1: number;
|
|
10
10
|
ecdsaMPCv2Round2: number;
|
|
11
11
|
ecdsaMPCv2Round3: number;
|
|
12
|
+
eddsaMPCv2Round1: number;
|
|
13
|
+
eddsaMPCv2Round2: number;
|
|
14
|
+
eddsaMPCv2Round3: number;
|
|
12
15
|
readyToCombineShares: number;
|
|
13
16
|
signed: number;
|
|
14
17
|
held: number;
|
|
@@ -10606,6 +10606,9 @@ export declare const TransactionRequestFull: t.IntersectionC<[t.IntersectionC<[t
|
|
|
10606
10606
|
ecdsaMPCv2Round1: number;
|
|
10607
10607
|
ecdsaMPCv2Round2: number;
|
|
10608
10608
|
ecdsaMPCv2Round3: number;
|
|
10609
|
+
eddsaMPCv2Round1: number;
|
|
10610
|
+
eddsaMPCv2Round2: number;
|
|
10611
|
+
eddsaMPCv2Round3: number;
|
|
10609
10612
|
readyToCombineShares: number;
|
|
10610
10613
|
signed: number;
|
|
10611
10614
|
held: number;
|
|
@@ -10709,6 +10712,9 @@ export declare const TransactionRequestFull: t.IntersectionC<[t.IntersectionC<[t
|
|
|
10709
10712
|
ecdsaMPCv2Round1: number;
|
|
10710
10713
|
ecdsaMPCv2Round2: number;
|
|
10711
10714
|
ecdsaMPCv2Round3: number;
|
|
10715
|
+
eddsaMPCv2Round1: number;
|
|
10716
|
+
eddsaMPCv2Round2: number;
|
|
10717
|
+
eddsaMPCv2Round3: number;
|
|
10712
10718
|
readyToCombineShares: number;
|
|
10713
10719
|
signed: number;
|
|
10714
10720
|
held: number;
|
|
@@ -21353,6 +21359,9 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
|
|
|
21353
21359
|
ecdsaMPCv2Round1: number;
|
|
21354
21360
|
ecdsaMPCv2Round2: number;
|
|
21355
21361
|
ecdsaMPCv2Round3: number;
|
|
21362
|
+
eddsaMPCv2Round1: number;
|
|
21363
|
+
eddsaMPCv2Round2: number;
|
|
21364
|
+
eddsaMPCv2Round3: number;
|
|
21356
21365
|
readyToCombineShares: number;
|
|
21357
21366
|
signed: number;
|
|
21358
21367
|
held: number;
|
|
@@ -21456,6 +21465,9 @@ export declare const TransactionRequest: t.UnionC<[t.IntersectionC<[t.Intersecti
|
|
|
21456
21465
|
ecdsaMPCv2Round1: number;
|
|
21457
21466
|
ecdsaMPCv2Round2: number;
|
|
21458
21467
|
ecdsaMPCv2Round3: number;
|
|
21468
|
+
eddsaMPCv2Round1: number;
|
|
21469
|
+
eddsaMPCv2Round2: number;
|
|
21470
|
+
eddsaMPCv2Round3: number;
|
|
21459
21471
|
readyToCombineShares: number;
|
|
21460
21472
|
signed: number;
|
|
21461
21473
|
held: number;
|
|
@@ -8,6 +8,9 @@ export declare const TransactionState: t.KeyofC<{
|
|
|
8
8
|
ecdsaMPCv2Round1: number;
|
|
9
9
|
ecdsaMPCv2Round2: number;
|
|
10
10
|
ecdsaMPCv2Round3: number;
|
|
11
|
+
eddsaMPCv2Round1: number;
|
|
12
|
+
eddsaMPCv2Round2: number;
|
|
13
|
+
eddsaMPCv2Round3: number;
|
|
11
14
|
readyToCombineShares: number;
|
|
12
15
|
signed: number;
|
|
13
16
|
held: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionState.js","sourceRoot":"","sources":["../../../../src/schema/transactionRequest/transactionState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAOd,QAAA,gBAAgB,GAAG,CAAC,CAAC,KAAK,CACrC;IACE,WAAW,EAAE,CAAC;IACd,gBAAgB,EAAE,CAAC;IACnB,sBAAsB,EAAE,CAAC;IACzB,kBAAkB,EAAE,CAAC;IACrB,kBAAkB,EAAE,CAAC;IACrB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CAAC;IACP,SAAS,EAAE,CAAC;IACZ,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC;CACZ,EACD,kBAAkB,CACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"transactionState.js","sourceRoot":"","sources":["../../../../src/schema/transactionRequest/transactionState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAOd,QAAA,gBAAgB,GAAG,CAAC,CAAC,KAAK,CACrC;IACE,WAAW,EAAE,CAAC;IACd,gBAAgB,EAAE,CAAC;IACnB,sBAAsB,EAAE,CAAC;IACzB,kBAAkB,EAAE,CAAC;IACrB,kBAAkB,EAAE,CAAC;IACrB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,CAAC;IACnB,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CAAC;IACP,SAAS,EAAE,CAAC;IACZ,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC;CACZ,EACD,kBAAkB,CACnB,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const AddWalletWebhookRequestBody: {
|
|
|
7
7
|
allToken: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
|
8
8
|
listenToFailureStates: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
|
9
9
|
txRequestStates: t.UnionC<[t.Type<("initialized" | "signed" | "delivered" | "rejected" | "pendingApproval" | "canceled" | "pendingDelivery" | "pendingUserSignature" | "pendingUserCommitment" | "pendingUserRShare" | "pendingUserGShare" | "readyToSend" | "failed")[], ("initialized" | "signed" | "delivered" | "rejected" | "pendingApproval" | "canceled" | "pendingDelivery" | "pendingUserSignature" | "pendingUserCommitment" | "pendingUserRShare" | "pendingUserGShare" | "readyToSend" | "failed")[], unknown>, t.UndefinedC]>;
|
|
10
|
-
txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
|
|
10
|
+
txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "eddsaMPCv2Round1" | "eddsaMPCv2Round2" | "eddsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "eddsaMPCv2Round1" | "eddsaMPCv2Round2" | "eddsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
|
|
11
11
|
customHttpHeaders: t.UnionC<[t.Type<{
|
|
12
12
|
[x: string]: string;
|
|
13
13
|
}, {
|
|
@@ -22,7 +22,7 @@ export declare const AddWalletWebhookRequestBodyC: t.TypeC<{
|
|
|
22
22
|
allToken: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
|
23
23
|
listenToFailureStates: t.UnionC<[t.Type<boolean, boolean, unknown>, t.UndefinedC]>;
|
|
24
24
|
txRequestStates: t.UnionC<[t.Type<("initialized" | "signed" | "delivered" | "rejected" | "pendingApproval" | "canceled" | "pendingDelivery" | "pendingUserSignature" | "pendingUserCommitment" | "pendingUserRShare" | "pendingUserGShare" | "readyToSend" | "failed")[], ("initialized" | "signed" | "delivered" | "rejected" | "pendingApproval" | "canceled" | "pendingDelivery" | "pendingUserSignature" | "pendingUserCommitment" | "pendingUserRShare" | "pendingUserGShare" | "readyToSend" | "failed")[], unknown>, t.UndefinedC]>;
|
|
25
|
-
txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
|
|
25
|
+
txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "eddsaMPCv2Round1" | "eddsaMPCv2Round2" | "eddsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "eddsaMPCv2Round1" | "eddsaMPCv2Round2" | "eddsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
|
|
26
26
|
customHttpHeaders: t.UnionC<[t.Type<{
|
|
27
27
|
[x: string]: string;
|
|
28
28
|
}, {
|
|
@@ -67,6 +67,9 @@ export declare const ListEnterpriseWebhooksResponse: t.IntersectionC<[t.TypeC<{
|
|
|
67
67
|
ecdsaMPCv2Round1: number;
|
|
68
68
|
ecdsaMPCv2Round2: number;
|
|
69
69
|
ecdsaMPCv2Round3: number;
|
|
70
|
+
eddsaMPCv2Round1: number;
|
|
71
|
+
eddsaMPCv2Round2: number;
|
|
72
|
+
eddsaMPCv2Round3: number;
|
|
70
73
|
readyToCombineShares: number;
|
|
71
74
|
signed: number;
|
|
72
75
|
held: number;
|
|
@@ -67,6 +67,9 @@ export declare const ListOrganizationWebhooksResponse: t.IntersectionC<[t.TypeC<
|
|
|
67
67
|
ecdsaMPCv2Round1: number;
|
|
68
68
|
ecdsaMPCv2Round2: number;
|
|
69
69
|
ecdsaMPCv2Round3: number;
|
|
70
|
+
eddsaMPCv2Round1: number;
|
|
71
|
+
eddsaMPCv2Round2: number;
|
|
72
|
+
eddsaMPCv2Round3: number;
|
|
70
73
|
readyToCombineShares: number;
|
|
71
74
|
signed: number;
|
|
72
75
|
held: number;
|
|
@@ -44,6 +44,9 @@ export declare const Webhook: t.IntersectionC<[t.TypeC<{
|
|
|
44
44
|
ecdsaMPCv2Round1: number;
|
|
45
45
|
ecdsaMPCv2Round2: number;
|
|
46
46
|
ecdsaMPCv2Round3: number;
|
|
47
|
+
eddsaMPCv2Round1: number;
|
|
48
|
+
eddsaMPCv2Round2: number;
|
|
49
|
+
eddsaMPCv2Round3: number;
|
|
47
50
|
readyToCombineShares: number;
|
|
48
51
|
signed: number;
|
|
49
52
|
held: number;
|
package/package.json
CHANGED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { EddsaMPCv2SignedMessage } from "../common";
|
|
3
|
+
import { MPCv2SignatureShareBase } from "./signingRound";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* EdDSA MPCv2 — User to BitGo round 1
|
|
7
|
+
*
|
|
8
|
+
* User sends their first signing message (PGP-signed base64 WASM bytes).
|
|
9
|
+
* EdDSA uses EddsaMPCv2SignedMessage.
|
|
10
|
+
*/
|
|
11
|
+
export const EddsaMPCv2SignatureShareRound1Input = t.intersection([
|
|
12
|
+
MPCv2SignatureShareBase,
|
|
13
|
+
t.type(
|
|
14
|
+
{
|
|
15
|
+
type: t.literal("round1Input"),
|
|
16
|
+
data: t.type({
|
|
17
|
+
msg1: EddsaMPCv2SignedMessage,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
"EddsaMPCv2SignatureShareRound1Input",
|
|
21
|
+
),
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
export type EddsaMPCv2SignatureShareRound1Input = t.TypeOf<
|
|
25
|
+
typeof EddsaMPCv2SignatureShareRound1Input
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* EdDSA MPCv2 — BitGo to User round 1
|
|
30
|
+
*
|
|
31
|
+
* BitGo returns its first signing message.
|
|
32
|
+
* Unlike ECDSA which returns msg1 + msg2, EdDSA round 1 returns only msg1.
|
|
33
|
+
*/
|
|
34
|
+
export const EddsaMPCv2SignatureShareRound1Output = t.intersection([
|
|
35
|
+
MPCv2SignatureShareBase,
|
|
36
|
+
t.type(
|
|
37
|
+
{
|
|
38
|
+
type: t.literal("round1Output"),
|
|
39
|
+
data: t.type({
|
|
40
|
+
msg1: EddsaMPCv2SignedMessage,
|
|
41
|
+
}),
|
|
42
|
+
},
|
|
43
|
+
"EddsaMPCv2SignatureShareRound1Output",
|
|
44
|
+
),
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
export type EddsaMPCv2SignatureShareRound1Output = t.TypeOf<
|
|
48
|
+
typeof EddsaMPCv2SignatureShareRound1Output
|
|
49
|
+
>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* EdDSA MPCv2 — User to BitGo round 2
|
|
53
|
+
*
|
|
54
|
+
* User sends their second signing message.
|
|
55
|
+
* Unlike ECDSA which sends msg2 + msg3, EdDSA round 2 sends only msg2.
|
|
56
|
+
*/
|
|
57
|
+
export const EddsaMPCv2SignatureShareRound2Input = t.intersection([
|
|
58
|
+
MPCv2SignatureShareBase,
|
|
59
|
+
t.type(
|
|
60
|
+
{
|
|
61
|
+
type: t.literal("round2Input"),
|
|
62
|
+
data: t.type({
|
|
63
|
+
msg2: EddsaMPCv2SignedMessage,
|
|
64
|
+
}),
|
|
65
|
+
},
|
|
66
|
+
"EddsaMPCv2SignatureShareRound2Input",
|
|
67
|
+
),
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
export type EddsaMPCv2SignatureShareRound2Input = t.TypeOf<
|
|
71
|
+
typeof EddsaMPCv2SignatureShareRound2Input
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* EdDSA MPCv2 — BitGo to User round 2
|
|
76
|
+
*
|
|
77
|
+
* BitGo returns its second signing message.
|
|
78
|
+
* Unlike ECDSA which returns msg3, EdDSA round 2 returns msg2.
|
|
79
|
+
*/
|
|
80
|
+
export const EddsaMPCv2SignatureShareRound2Output = t.intersection([
|
|
81
|
+
MPCv2SignatureShareBase,
|
|
82
|
+
t.type(
|
|
83
|
+
{
|
|
84
|
+
type: t.literal("round2Output"),
|
|
85
|
+
data: t.type({
|
|
86
|
+
msg2: EddsaMPCv2SignedMessage,
|
|
87
|
+
}),
|
|
88
|
+
},
|
|
89
|
+
"EddsaMPCv2SignatureShareRound2Output",
|
|
90
|
+
),
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
export type EddsaMPCv2SignatureShareRound2Output = t.TypeOf<
|
|
94
|
+
typeof EddsaMPCv2SignatureShareRound2Output
|
|
95
|
+
>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* EdDSA MPCv2 — User to BitGo round 3
|
|
99
|
+
*
|
|
100
|
+
* User sends their third signing message.
|
|
101
|
+
*/
|
|
102
|
+
export const EddsaMPCv2SignatureShareRound3Input = t.intersection([
|
|
103
|
+
MPCv2SignatureShareBase,
|
|
104
|
+
t.type(
|
|
105
|
+
{
|
|
106
|
+
type: t.literal("round3Input"),
|
|
107
|
+
data: t.type({
|
|
108
|
+
msg3: EddsaMPCv2SignedMessage,
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
"EddsaMPCv2SignatureShareRound3Input",
|
|
112
|
+
),
|
|
113
|
+
]);
|
|
114
|
+
|
|
115
|
+
export type EddsaMPCv2SignatureShareRound3Input = t.TypeOf<
|
|
116
|
+
typeof EddsaMPCv2SignatureShareRound3Input
|
|
117
|
+
>;
|