@bitgo/public-types 5.91.0 → 5.93.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/common/mpcv2BroadcastMessage.d.ts +6 -0
- package/dist/src/schema/mpcv2/common/mpcv2BroadcastMessage.js +3 -1
- package/dist/src/schema/mpcv2/common/mpcv2BroadcastMessage.js.map +1 -1
- package/dist/src/schema/mpcv2/keyGen/keygenRound.d.ts +42 -0
- package/dist/src/schema/mpcv2/keyGen/keygenRound.js +21 -1
- package/dist/src/schema/mpcv2/keyGen/keygenRound.js.map +1 -1
- package/dist/src/schema/mpcv2/signing/signingRound.d.ts +1 -0
- package/package.json +1 -1
- package/src/schema/mpcv2/common/mpcv2BroadcastMessage.ts +11 -0
- package/src/schema/mpcv2/keyGen/keygenRound.ts +43 -1
|
@@ -11,5 +11,11 @@ export declare const MPCv2BroadcastMessageWithSignatureR: t.IntersectionC<[t.Typ
|
|
|
11
11
|
signature: t.StringC;
|
|
12
12
|
}>, t.TypeC<{
|
|
13
13
|
signatureR: t.StringC;
|
|
14
|
+
signatureRSignature: t.StringC;
|
|
14
15
|
}>]>;
|
|
15
16
|
export type MPCv2BroadcastMessageWithSignatureR = t.TypeOf<typeof MPCv2BroadcastMessageWithSignatureR>;
|
|
17
|
+
export declare const EddsaMPCv2SignedMessage: t.TypeC<{
|
|
18
|
+
message: t.StringC;
|
|
19
|
+
signature: t.StringC;
|
|
20
|
+
}>;
|
|
21
|
+
export type EddsaMPCv2SignedMessage = t.TypeOf<typeof EddsaMPCv2SignedMessage>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MPCv2BroadcastMessageWithSignatureR = exports.MPCv2BroadcastMessage = void 0;
|
|
26
|
+
exports.EddsaMPCv2SignedMessage = exports.MPCv2BroadcastMessageWithSignatureR = exports.MPCv2BroadcastMessage = void 0;
|
|
27
27
|
const t = __importStar(require("io-ts"));
|
|
28
28
|
const mpcv2PartyFromStringOrNumber_1 = require("./mpcv2PartyFromStringOrNumber");
|
|
29
29
|
exports.MPCv2BroadcastMessage = t.type({
|
|
@@ -35,6 +35,8 @@ exports.MPCv2BroadcastMessageWithSignatureR = t.intersection([
|
|
|
35
35
|
exports.MPCv2BroadcastMessage,
|
|
36
36
|
t.type({
|
|
37
37
|
signatureR: t.string,
|
|
38
|
+
signatureRSignature: t.string,
|
|
38
39
|
}),
|
|
39
40
|
]);
|
|
41
|
+
exports.EddsaMPCv2SignedMessage = t.type({ message: t.string, signature: t.string }, "EddsaMPCv2SignedMessage");
|
|
40
42
|
//# sourceMappingURL=mpcv2BroadcastMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mpcv2BroadcastMessage.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/common/mpcv2BroadcastMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,iFAA8E;AAEjE,QAAA,qBAAqB,GAAG,CAAC,CAAC,IAAI,CACzC;IACE,IAAI,EAAE,2DAA4B;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,EACD,uBAAuB,CACxB,CAAC;AAIW,QAAA,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAChE,6BAAqB;IACrB,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,CAAC,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"mpcv2BroadcastMessage.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/common/mpcv2BroadcastMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,iFAA8E;AAEjE,QAAA,qBAAqB,GAAG,CAAC,CAAC,IAAI,CACzC;IACE,IAAI,EAAE,2DAA4B;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM;CACpB,EACD,uBAAuB,CACxB,CAAC;AAIW,QAAA,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAChE,6BAAqB;IACrB,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,mBAAmB,EAAE,CAAC,CAAC,MAAM;KAC9B,CAAC;CACH,CAAC,CAAC;AAUU,QAAA,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAC3C,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAC1C,yBAAyB,CAC1B,CAAC"}
|
|
@@ -107,3 +107,45 @@ export declare const MPCv2KeyGenRound3Response: t.TypeC<{
|
|
|
107
107
|
}>;
|
|
108
108
|
}>;
|
|
109
109
|
export type MPCv2KeyGenRound3Response = t.TypeOf<typeof MPCv2KeyGenRound3Response>;
|
|
110
|
+
export declare const EddsaMPCv2KeyGenRound1Request: t.TypeC<{
|
|
111
|
+
userGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
112
|
+
backupGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
113
|
+
userMsg1: t.TypeC<{
|
|
114
|
+
message: t.StringC;
|
|
115
|
+
signature: t.StringC;
|
|
116
|
+
}>;
|
|
117
|
+
backupMsg1: t.TypeC<{
|
|
118
|
+
message: t.StringC;
|
|
119
|
+
signature: t.StringC;
|
|
120
|
+
}>;
|
|
121
|
+
}>;
|
|
122
|
+
export type EddsaMPCv2KeyGenRound1Request = t.TypeOf<typeof EddsaMPCv2KeyGenRound1Request>;
|
|
123
|
+
export declare const EddsaMPCv2KeyGenRound1Response: t.TypeC<{
|
|
124
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
125
|
+
bitgoMsg1: t.TypeC<{
|
|
126
|
+
message: t.StringC;
|
|
127
|
+
signature: t.StringC;
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
130
|
+
export type EddsaMPCv2KeyGenRound1Response = t.TypeOf<typeof EddsaMPCv2KeyGenRound1Response>;
|
|
131
|
+
export declare const EddsaMPCv2KeyGenRound2Request: t.TypeC<{
|
|
132
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
133
|
+
userMsg2: t.TypeC<{
|
|
134
|
+
message: t.StringC;
|
|
135
|
+
signature: t.StringC;
|
|
136
|
+
}>;
|
|
137
|
+
backupMsg2: t.TypeC<{
|
|
138
|
+
message: t.StringC;
|
|
139
|
+
signature: t.StringC;
|
|
140
|
+
}>;
|
|
141
|
+
}>;
|
|
142
|
+
export type EddsaMPCv2KeyGenRound2Request = t.TypeOf<typeof EddsaMPCv2KeyGenRound2Request>;
|
|
143
|
+
export declare const EddsaMPCv2KeyGenRound2Response: t.TypeC<{
|
|
144
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
145
|
+
commonPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
146
|
+
bitgoMsg2: t.TypeC<{
|
|
147
|
+
message: t.StringC;
|
|
148
|
+
signature: t.StringC;
|
|
149
|
+
}>;
|
|
150
|
+
}>;
|
|
151
|
+
export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<typeof EddsaMPCv2KeyGenRound2Response>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MPCv2KeyGenRound3Response = exports.MPCv2KeyGenRound3Request = exports.MPCv2KeyGenRound2Response = exports.MPCv2KeyGenRound2Request = exports.MPCv2KeyGenRound1Response = exports.MPCv2KeyGenRound1Request = void 0;
|
|
26
|
+
exports.EddsaMPCv2KeyGenRound2Response = exports.EddsaMPCv2KeyGenRound2Request = exports.EddsaMPCv2KeyGenRound1Response = exports.EddsaMPCv2KeyGenRound1Request = exports.MPCv2KeyGenRound3Response = exports.MPCv2KeyGenRound3Request = exports.MPCv2KeyGenRound2Response = exports.MPCv2KeyGenRound2Request = exports.MPCv2KeyGenRound1Response = exports.MPCv2KeyGenRound1Request = void 0;
|
|
27
27
|
const t = __importStar(require("io-ts"));
|
|
28
28
|
const io_ts_types_1 = require("io-ts-types");
|
|
29
29
|
const common_1 = require("../common");
|
|
@@ -65,4 +65,24 @@ exports.MPCv2KeyGenRound3Response = t.type({
|
|
|
65
65
|
commonKeychain: io_ts_types_1.NonEmptyString,
|
|
66
66
|
bitgoMsg4: common_1.MPCv2BroadcastMessage,
|
|
67
67
|
});
|
|
68
|
+
exports.EddsaMPCv2KeyGenRound1Request = t.type({
|
|
69
|
+
userGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
70
|
+
backupGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
71
|
+
userMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
72
|
+
backupMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
73
|
+
});
|
|
74
|
+
exports.EddsaMPCv2KeyGenRound1Response = t.type({
|
|
75
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
76
|
+
bitgoMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
77
|
+
});
|
|
78
|
+
exports.EddsaMPCv2KeyGenRound2Request = t.type({
|
|
79
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
80
|
+
userMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
81
|
+
backupMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
82
|
+
});
|
|
83
|
+
exports.EddsaMPCv2KeyGenRound2Response = t.type({
|
|
84
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
85
|
+
commonPublicKey: io_ts_types_1.NonEmptyString,
|
|
86
|
+
bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
87
|
+
});
|
|
68
88
|
//# sourceMappingURL=keygenRound.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keygenRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/keyGen/keygenRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"keygenRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/keyGen/keygenRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA6C;AAC7C,sCAImB;AAEN,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,gBAAgB,EAAE,4BAAc;IAChC,kBAAkB,EAAE,4BAAc;IAClC,QAAQ,EAAE,8BAAqB;IAC/B,UAAU,EAAE,8BAAqB;CAClC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,mBAAmB,EAAE,4BAAc;IACnC,SAAS,EAAE,4BAAc;IACzB,SAAS,EAAE,8BAAqB;IAChC,eAAe,EAAE,wBAAe;IAChC,iBAAiB,EAAE,wBAAe;CACnC,CAAC,CAAC;AAMU,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,SAAS,EAAE,4BAAc;IACzB,QAAQ,EAAE,wBAAe;IACzB,eAAe,EAAE,4BAAc;IAC/B,UAAU,EAAE,wBAAe;IAC3B,iBAAiB,EAAE,4BAAc;CAClC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,4BAAc;IACzB,gBAAgB,EAAE,4BAAc;IAChC,eAAe,EAAE,wBAAe;IAChC,iBAAiB,EAAE,wBAAe;CACnC,CAAC,CAAC;AAMU,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,SAAS,EAAE,4BAAc;IACzB,QAAQ,EAAE,wBAAe;IACzB,UAAU,EAAE,wBAAe;IAC3B,QAAQ,EAAE,8BAAqB;IAC/B,UAAU,EAAE,8BAAqB;CAClC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,4BAAc;IACzB,cAAc,EAAE,4BAAc;IAC9B,SAAS,EAAE,8BAAqB;CACjC,CAAC,CAAC;AAQU,QAAA,6BAA6B,GAAG,CAAC,CAAC,IAAI,CAAC;IAClD,gBAAgB,EAAE,4BAAc;IAChC,kBAAkB,EAAE,4BAAc;IAClC,QAAQ,EAAE,gCAAuB;IACjC,UAAU,EAAE,gCAAuB;CACpC,CAAC,CAAC;AAKU,QAAA,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,SAAS,EAAE,4BAAc;IACzB,SAAS,EAAE,gCAAuB;CACnC,CAAC,CAAC;AAKU,QAAA,6BAA6B,GAAG,CAAC,CAAC,IAAI,CAAC;IAClD,SAAS,EAAE,4BAAc;IACzB,QAAQ,EAAE,gCAAuB;IACjC,UAAU,EAAE,gCAAuB;CACpC,CAAC,CAAC;AAKU,QAAA,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,SAAS,EAAE,4BAAc;IACzB,eAAe,EAAE,4BAAc;IAC/B,SAAS,EAAE,gCAAuB;CACnC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -16,9 +16,20 @@ export const MPCv2BroadcastMessageWithSignatureR = t.intersection([
|
|
|
16
16
|
MPCv2BroadcastMessage,
|
|
17
17
|
t.type({
|
|
18
18
|
signatureR: t.string,
|
|
19
|
+
signatureRSignature: t.string,
|
|
19
20
|
}),
|
|
20
21
|
]);
|
|
21
22
|
|
|
22
23
|
export type MPCv2BroadcastMessageWithSignatureR = t.TypeOf<
|
|
23
24
|
typeof MPCv2BroadcastMessageWithSignatureR
|
|
24
25
|
>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* `message` is base64-encoded raw WASM bytes.
|
|
29
|
+
* `signature` is an armored PGP detached signature over those bytes.
|
|
30
|
+
*/
|
|
31
|
+
export const EddsaMPCv2SignedMessage = t.type(
|
|
32
|
+
{ message: t.string, signature: t.string },
|
|
33
|
+
"EddsaMPCv2SignedMessage",
|
|
34
|
+
);
|
|
35
|
+
export type EddsaMPCv2SignedMessage = t.TypeOf<typeof EddsaMPCv2SignedMessage>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
import { NonEmptyString } from "io-ts-types";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
MPCv2BroadcastMessage,
|
|
5
|
+
MPCv2P2PMessage,
|
|
6
|
+
EddsaMPCv2SignedMessage,
|
|
7
|
+
} from "../common";
|
|
4
8
|
|
|
5
9
|
export const MPCv2KeyGenRound1Request = t.type({
|
|
6
10
|
userGpgPublicKey: NonEmptyString,
|
|
@@ -69,3 +73,41 @@ export const MPCv2KeyGenRound3Response = t.type({
|
|
|
69
73
|
export type MPCv2KeyGenRound3Response = t.TypeOf<
|
|
70
74
|
typeof MPCv2KeyGenRound3Response
|
|
71
75
|
>;
|
|
76
|
+
|
|
77
|
+
// EdDSA MPCv2 (2-round) keygen codecs
|
|
78
|
+
|
|
79
|
+
export const EddsaMPCv2KeyGenRound1Request = t.type({
|
|
80
|
+
userGpgPublicKey: NonEmptyString,
|
|
81
|
+
backupGpgPublicKey: NonEmptyString,
|
|
82
|
+
userMsg1: EddsaMPCv2SignedMessage,
|
|
83
|
+
backupMsg1: EddsaMPCv2SignedMessage,
|
|
84
|
+
});
|
|
85
|
+
export type EddsaMPCv2KeyGenRound1Request = t.TypeOf<
|
|
86
|
+
typeof EddsaMPCv2KeyGenRound1Request
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
export const EddsaMPCv2KeyGenRound1Response = t.type({
|
|
90
|
+
sessionId: NonEmptyString,
|
|
91
|
+
bitgoMsg1: EddsaMPCv2SignedMessage,
|
|
92
|
+
});
|
|
93
|
+
export type EddsaMPCv2KeyGenRound1Response = t.TypeOf<
|
|
94
|
+
typeof EddsaMPCv2KeyGenRound1Response
|
|
95
|
+
>;
|
|
96
|
+
|
|
97
|
+
export const EddsaMPCv2KeyGenRound2Request = t.type({
|
|
98
|
+
sessionId: NonEmptyString,
|
|
99
|
+
userMsg2: EddsaMPCv2SignedMessage,
|
|
100
|
+
backupMsg2: EddsaMPCv2SignedMessage,
|
|
101
|
+
});
|
|
102
|
+
export type EddsaMPCv2KeyGenRound2Request = t.TypeOf<
|
|
103
|
+
typeof EddsaMPCv2KeyGenRound2Request
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export const EddsaMPCv2KeyGenRound2Response = t.type({
|
|
107
|
+
sessionId: NonEmptyString,
|
|
108
|
+
commonPublicKey: NonEmptyString,
|
|
109
|
+
bitgoMsg2: EddsaMPCv2SignedMessage,
|
|
110
|
+
});
|
|
111
|
+
export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<
|
|
112
|
+
typeof EddsaMPCv2KeyGenRound2Response
|
|
113
|
+
>;
|