@bitgo/public-types 6.62.0 → 6.63.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.
@@ -149,3 +149,46 @@ export declare const EddsaMPCv2KeyGenRound2Response: t.TypeC<{
149
149
  }>;
150
150
  }>;
151
151
  export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<typeof EddsaMPCv2KeyGenRound2Response>;
152
+ export declare const RedpallasMPCv2KeyGenRound1Request: t.TypeC<{
153
+ userGpgPublicKey: import("io-ts-types").NonEmptyStringC;
154
+ backupGpgPublicKey: import("io-ts-types").NonEmptyStringC;
155
+ userMsg1: t.TypeC<{
156
+ message: t.StringC;
157
+ signature: t.StringC;
158
+ }>;
159
+ backupMsg1: t.TypeC<{
160
+ message: t.StringC;
161
+ signature: t.StringC;
162
+ }>;
163
+ }>;
164
+ export type RedpallasMPCv2KeyGenRound1Request = t.TypeOf<typeof RedpallasMPCv2KeyGenRound1Request>;
165
+ export declare const RedpallasMPCv2KeyGenRound1Response: t.TypeC<{
166
+ sessionId: import("io-ts-types").NonEmptyStringC;
167
+ bitgoMsg1: t.TypeC<{
168
+ message: t.StringC;
169
+ signature: t.StringC;
170
+ }>;
171
+ }>;
172
+ export type RedpallasMPCv2KeyGenRound1Response = t.TypeOf<typeof RedpallasMPCv2KeyGenRound1Response>;
173
+ export declare const RedpallasMPCv2KeyGenRound2Request: t.TypeC<{
174
+ sessionId: import("io-ts-types").NonEmptyStringC;
175
+ userMsg2: t.TypeC<{
176
+ message: t.StringC;
177
+ signature: t.StringC;
178
+ }>;
179
+ backupMsg2: t.TypeC<{
180
+ message: t.StringC;
181
+ signature: t.StringC;
182
+ }>;
183
+ derivationSeed: t.StringC;
184
+ }>;
185
+ export type RedpallasMPCv2KeyGenRound2Request = t.TypeOf<typeof RedpallasMPCv2KeyGenRound2Request>;
186
+ export declare const RedpallasMPCv2KeyGenRound2Response: t.TypeC<{
187
+ sessionId: import("io-ts-types").NonEmptyStringC;
188
+ commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
189
+ bitgoMsg2: t.TypeC<{
190
+ message: t.StringC;
191
+ signature: t.StringC;
192
+ }>;
193
+ }>;
194
+ export type RedpallasMPCv2KeyGenRound2Response = t.TypeOf<typeof RedpallasMPCv2KeyGenRound2Response>;
@@ -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.EddsaMPCv2KeyGenRound2Response = exports.EddsaMPCv2KeyGenRound2Request = exports.EddsaMPCv2KeyGenRound1Response = exports.EddsaMPCv2KeyGenRound1Request = exports.MPCv2KeyGenRound3Response = exports.MPCv2KeyGenRound3Request = exports.MPCv2KeyGenRound2Response = exports.MPCv2KeyGenRound2Request = exports.MPCv2KeyGenRound1Response = exports.MPCv2KeyGenRound1Request = void 0;
26
+ exports.RedpallasMPCv2KeyGenRound2Response = exports.RedpallasMPCv2KeyGenRound2Request = exports.RedpallasMPCv2KeyGenRound1Response = exports.RedpallasMPCv2KeyGenRound1Request = 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");
@@ -85,4 +85,25 @@ exports.EddsaMPCv2KeyGenRound2Response = t.type({
85
85
  commonPublicKeychain: io_ts_types_1.NonEmptyString,
86
86
  bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
87
87
  });
88
+ exports.RedpallasMPCv2KeyGenRound1Request = t.type({
89
+ userGpgPublicKey: io_ts_types_1.NonEmptyString,
90
+ backupGpgPublicKey: io_ts_types_1.NonEmptyString,
91
+ userMsg1: common_1.EddsaMPCv2SignedMessage,
92
+ backupMsg1: common_1.EddsaMPCv2SignedMessage,
93
+ });
94
+ exports.RedpallasMPCv2KeyGenRound1Response = t.type({
95
+ sessionId: io_ts_types_1.NonEmptyString,
96
+ bitgoMsg1: common_1.EddsaMPCv2SignedMessage,
97
+ });
98
+ exports.RedpallasMPCv2KeyGenRound2Request = t.type({
99
+ sessionId: io_ts_types_1.NonEmptyString,
100
+ userMsg2: common_1.EddsaMPCv2SignedMessage,
101
+ backupMsg2: common_1.EddsaMPCv2SignedMessage,
102
+ derivationSeed: t.string,
103
+ });
104
+ exports.RedpallasMPCv2KeyGenRound2Response = t.type({
105
+ sessionId: io_ts_types_1.NonEmptyString,
106
+ commonPublicKeychain: io_ts_types_1.NonEmptyString,
107
+ bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
108
+ });
88
109
  //# 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,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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IACzB,oBAAoB,EAAE,4BAAc;IACpC,SAAS,EAAE,gCAAuB;CACnC,CAAC,CAAC"}
@@ -2,5 +2,7 @@ export * from "./keygenRound";
2
2
  export * from "./keygenState";
3
3
  export * from "./eddsaKeygenRound";
4
4
  export * from "./eddsaKeygenState";
5
+ export * from "./redpallasKeygenRound";
6
+ export * from "./redpallasKeygenState";
5
7
  export * from "./walletType";
6
8
  export * from "./dsgType";
@@ -18,6 +18,8 @@ __exportStar(require("./keygenRound"), exports);
18
18
  __exportStar(require("./keygenState"), exports);
19
19
  __exportStar(require("./eddsaKeygenRound"), exports);
20
20
  __exportStar(require("./eddsaKeygenState"), exports);
21
+ __exportStar(require("./redpallasKeygenRound"), exports);
22
+ __exportStar(require("./redpallasKeygenState"), exports);
21
23
  __exportStar(require("./walletType"), exports);
22
24
  __exportStar(require("./dsgType"), exports);
23
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,qDAAmC;AACnC,qDAAmC;AACnC,+CAA6B;AAC7B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,qDAAmC;AACnC,qDAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,4CAA0B"}
@@ -0,0 +1,175 @@
1
+ import * as t from "io-ts";
2
+ export declare const RedpallasOVC1ToBitgoRound1Payload: t.IntersectionC<[t.TypeC<{
3
+ state: t.UnionC<[t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
4
+ tssVersion: import("io-ts-types").NonEmptyStringC;
5
+ walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
6
+ coin: import("io-ts-types").NonEmptyStringC;
7
+ }>, t.TypeC<{
8
+ ovc: t.TypeC<{
9
+ 1: t.TypeC<{
10
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
11
+ ovcMsg1: t.TypeC<{
12
+ message: t.StringC;
13
+ signature: t.StringC;
14
+ }>;
15
+ }>;
16
+ 2: t.TypeC<{
17
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
18
+ ovcMsg1: t.TypeC<{
19
+ message: t.StringC;
20
+ signature: t.StringC;
21
+ }>;
22
+ }>;
23
+ }>;
24
+ }>]>;
25
+ export type RedpallasOVC1ToBitgoRound1Payload = t.TypeOf<typeof RedpallasOVC1ToBitgoRound1Payload>;
26
+ export declare const RedpallasPlatformRound1Payload: t.TypeC<{
27
+ sessionId: import("io-ts-types").NonEmptyStringC;
28
+ bitgoMsg1: t.TypeC<{
29
+ message: t.StringC;
30
+ signature: t.StringC;
31
+ }>;
32
+ }>;
33
+ export type RedpallasPlatformRound1Payload = t.TypeOf<typeof RedpallasPlatformRound1Payload>;
34
+ export declare const RedpallasBitgoToOVC1Round1Response: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
35
+ state: t.UnionC<[t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
36
+ tssVersion: import("io-ts-types").NonEmptyStringC;
37
+ walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
38
+ coin: import("io-ts-types").NonEmptyStringC;
39
+ }>, t.TypeC<{
40
+ ovc: t.TypeC<{
41
+ 1: t.TypeC<{
42
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
43
+ ovcMsg1: t.TypeC<{
44
+ message: t.StringC;
45
+ signature: t.StringC;
46
+ }>;
47
+ }>;
48
+ 2: t.TypeC<{
49
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
50
+ ovcMsg1: t.TypeC<{
51
+ message: t.StringC;
52
+ signature: t.StringC;
53
+ }>;
54
+ }>;
55
+ }>;
56
+ }>]>, t.TypeC<{
57
+ platform: t.TypeC<{
58
+ sessionId: import("io-ts-types").NonEmptyStringC;
59
+ bitgoMsg1: t.TypeC<{
60
+ message: t.StringC;
61
+ signature: t.StringC;
62
+ }>;
63
+ }>;
64
+ }>]>;
65
+ export type RedpallasBitgoToOVC1Round1Response = t.TypeOf<typeof RedpallasBitgoToOVC1Round1Response>;
66
+ export declare const RedpallasOVC2ToBitgoRound2Payload: t.IntersectionC<[t.TypeC<{
67
+ state: t.UnionC<[t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
68
+ tssVersion: import("io-ts-types").NonEmptyStringC;
69
+ walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
70
+ coin: import("io-ts-types").NonEmptyStringC;
71
+ }>, t.TypeC<{
72
+ ovc: t.TypeC<{
73
+ 1: t.TypeC<{
74
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
75
+ ovcMsg1: t.TypeC<{
76
+ message: t.StringC;
77
+ signature: t.StringC;
78
+ }>;
79
+ ovcMsg2: t.TypeC<{
80
+ message: t.StringC;
81
+ signature: t.StringC;
82
+ }>;
83
+ }>;
84
+ 2: t.TypeC<{
85
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
86
+ ovcMsg1: t.TypeC<{
87
+ message: t.StringC;
88
+ signature: t.StringC;
89
+ }>;
90
+ ovcMsg2: t.TypeC<{
91
+ message: t.StringC;
92
+ signature: t.StringC;
93
+ }>;
94
+ }>;
95
+ }>;
96
+ platform: t.TypeC<{
97
+ sessionId: import("io-ts-types").NonEmptyStringC;
98
+ bitgoMsg1: t.TypeC<{
99
+ message: t.StringC;
100
+ signature: t.StringC;
101
+ }>;
102
+ }>;
103
+ derivationSeed: t.StringC;
104
+ }>]>;
105
+ export type RedpallasOVC2ToBitgoRound2Payload = t.TypeOf<typeof RedpallasOVC2ToBitgoRound2Payload>;
106
+ export declare const RedpallasPlatformRound2Payload: t.IntersectionC<[t.TypeC<{
107
+ sessionId: import("io-ts-types").NonEmptyStringC;
108
+ bitgoMsg1: t.TypeC<{
109
+ message: t.StringC;
110
+ signature: t.StringC;
111
+ }>;
112
+ }>, t.TypeC<{
113
+ commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
114
+ bitgoMsg2: t.TypeC<{
115
+ message: t.StringC;
116
+ signature: t.StringC;
117
+ }>;
118
+ }>]>;
119
+ export type RedpallasPlatformRound2Payload = t.TypeOf<typeof RedpallasPlatformRound2Payload>;
120
+ export declare const RedpallasBitgoToOVC1Round2Response: t.IntersectionC<[t.TypeC<{
121
+ bitGoKeyId: import("io-ts-types").NonEmptyStringC;
122
+ }>, t.IntersectionC<[t.TypeC<{
123
+ state: t.UnionC<[t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./redpallasKeygenState").RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
124
+ tssVersion: import("io-ts-types").NonEmptyStringC;
125
+ walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
126
+ coin: import("io-ts-types").NonEmptyStringC;
127
+ }>, t.TypeC<{
128
+ ovc: t.TypeC<{
129
+ 1: t.TypeC<{
130
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
131
+ ovcMsg1: t.TypeC<{
132
+ message: t.StringC;
133
+ signature: t.StringC;
134
+ }>;
135
+ ovcMsg2: t.TypeC<{
136
+ message: t.StringC;
137
+ signature: t.StringC;
138
+ }>;
139
+ }>;
140
+ 2: t.TypeC<{
141
+ gpgPubKey: import("io-ts-types").NonEmptyStringC;
142
+ ovcMsg1: t.TypeC<{
143
+ message: t.StringC;
144
+ signature: t.StringC;
145
+ }>;
146
+ ovcMsg2: t.TypeC<{
147
+ message: t.StringC;
148
+ signature: t.StringC;
149
+ }>;
150
+ }>;
151
+ }>;
152
+ platform: t.TypeC<{
153
+ sessionId: import("io-ts-types").NonEmptyStringC;
154
+ bitgoMsg1: t.TypeC<{
155
+ message: t.StringC;
156
+ signature: t.StringC;
157
+ }>;
158
+ }>;
159
+ derivationSeed: t.StringC;
160
+ }>]>, t.TypeC<{
161
+ platform: t.IntersectionC<[t.TypeC<{
162
+ sessionId: import("io-ts-types").NonEmptyStringC;
163
+ bitgoMsg1: t.TypeC<{
164
+ message: t.StringC;
165
+ signature: t.StringC;
166
+ }>;
167
+ }>, t.TypeC<{
168
+ commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
169
+ bitgoMsg2: t.TypeC<{
170
+ message: t.StringC;
171
+ signature: t.StringC;
172
+ }>;
173
+ }>]>;
174
+ }>]>;
175
+ export type RedpallasBitgoToOVC1Round2Response = t.TypeOf<typeof RedpallasBitgoToOVC1Round2Response>;
@@ -0,0 +1,93 @@
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.RedpallasBitgoToOVC1Round2Response = exports.RedpallasPlatformRound2Payload = exports.RedpallasOVC2ToBitgoRound2Payload = exports.RedpallasBitgoToOVC1Round1Response = exports.RedpallasPlatformRound1Payload = exports.RedpallasOVC1ToBitgoRound1Payload = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const io_ts_types_1 = require("io-ts-types");
29
+ const common_1 = require("../common");
30
+ const redpallasKeygenState_1 = require("./redpallasKeygenState");
31
+ const keygenRound_1 = require("./keygenRound");
32
+ const walletType_1 = require("./walletType");
33
+ const BaseRoundPayload = t.type({
34
+ state: redpallasKeygenState_1.RedpallasKeyCreationMPCv2State,
35
+ tssVersion: io_ts_types_1.NonEmptyString,
36
+ walletType: walletType_1.WalletType,
37
+ coin: io_ts_types_1.NonEmptyString,
38
+ });
39
+ exports.RedpallasOVC1ToBitgoRound1Payload = t.intersection([
40
+ BaseRoundPayload,
41
+ t.type({
42
+ ovc: t.type({
43
+ [keygenRound_1.OVCIndexEnum.ONE]: t.type({
44
+ gpgPubKey: io_ts_types_1.NonEmptyString,
45
+ ovcMsg1: common_1.EddsaMPCv2SignedMessage,
46
+ }),
47
+ [keygenRound_1.OVCIndexEnum.TWO]: t.type({
48
+ gpgPubKey: io_ts_types_1.NonEmptyString,
49
+ ovcMsg1: common_1.EddsaMPCv2SignedMessage,
50
+ }),
51
+ }),
52
+ }),
53
+ ]);
54
+ exports.RedpallasPlatformRound1Payload = t.type({
55
+ sessionId: io_ts_types_1.NonEmptyString,
56
+ bitgoMsg1: common_1.EddsaMPCv2SignedMessage,
57
+ });
58
+ exports.RedpallasBitgoToOVC1Round1Response = t.intersection([
59
+ exports.RedpallasOVC1ToBitgoRound1Payload,
60
+ t.type({ platform: exports.RedpallasPlatformRound1Payload }),
61
+ ]);
62
+ exports.RedpallasOVC2ToBitgoRound2Payload = t.intersection([
63
+ BaseRoundPayload,
64
+ t.type({
65
+ ovc: t.type({
66
+ [keygenRound_1.OVCIndexEnum.ONE]: t.type({
67
+ gpgPubKey: io_ts_types_1.NonEmptyString,
68
+ ovcMsg1: common_1.EddsaMPCv2SignedMessage,
69
+ ovcMsg2: common_1.EddsaMPCv2SignedMessage,
70
+ }),
71
+ [keygenRound_1.OVCIndexEnum.TWO]: t.type({
72
+ gpgPubKey: io_ts_types_1.NonEmptyString,
73
+ ovcMsg1: common_1.EddsaMPCv2SignedMessage,
74
+ ovcMsg2: common_1.EddsaMPCv2SignedMessage,
75
+ }),
76
+ }),
77
+ platform: exports.RedpallasPlatformRound1Payload,
78
+ derivationSeed: t.string,
79
+ }),
80
+ ]);
81
+ exports.RedpallasPlatformRound2Payload = t.intersection([
82
+ exports.RedpallasPlatformRound1Payload,
83
+ t.type({
84
+ commonPublicKeychain: io_ts_types_1.NonEmptyString,
85
+ bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
86
+ }),
87
+ ]);
88
+ exports.RedpallasBitgoToOVC1Round2Response = t.intersection([
89
+ t.type({ bitGoKeyId: io_ts_types_1.NonEmptyString }),
90
+ exports.RedpallasOVC2ToBitgoRound2Payload,
91
+ t.type({ platform: exports.RedpallasPlatformRound2Payload }),
92
+ ]);
93
+ //# sourceMappingURL=redpallasKeygenRound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redpallasKeygenRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/redpallasKeygenRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA6C;AAE7C,sCAAoD;AACpD,iEAAwE;AACxE,+CAA6C;AAC7C,6CAA0C;AAE1C,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,qDAA8B;IACrC,UAAU,EAAE,4BAAc;IAC1B,UAAU,EAAE,uBAAU;IACtB,IAAI,EAAE,4BAAc;CACrB,CAAC,CAAC;AAIU,QAAA,iCAAiC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9D,gBAAgB;IAChB,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C,CAAC,YAAY,CAAC;IAC3D,sCAA8B;IAC9B,CAAC,CAAC,IAAI,CAAC;QACL,oBAAoB,EAAE,4BAAc;QACpC,SAAS,EAAE,gCAAuB;KACnC,CAAC;CACH,CAAC,CAAC;AAMU,QAAA,kCAAkC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/D,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,4BAAc,EAAE,CAAC;IACtC,yCAAiC;IACjC,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,sCAA8B,EAAE,CAAC;CACrD,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as t from "io-ts";
2
+ export declare enum RedpallasKeyCreationMPCv2StateEnum {
3
+ WaitingForOVC1Round0Data = -1,
4
+ WaitingForOVC2Round1Data = 0,
5
+ WaitingForOVC1Round1Data = 1,
6
+ WaitingForBitgoRound1Data = 2,
7
+ WaitingForOVC1Round2Data = 3,
8
+ WaitingForOVC2Round2Data = 4,
9
+ WaitingForBitgoRound2Data = 5,
10
+ WaitingForOVC1GenerateKey = 6,
11
+ WaitingForOVC2GenerateKey = 7,
12
+ KeyGenerationComplete = 8
13
+ }
14
+ export declare const RedpallasKeyCreationMPCv2State: t.UnionC<[t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
15
+ export type RedpallasKeyCreationMPCv2State = t.TypeOf<typeof RedpallasKeyCreationMPCv2State>;
@@ -0,0 +1,53 @@
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.RedpallasKeyCreationMPCv2State = exports.RedpallasKeyCreationMPCv2StateEnum = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ var RedpallasKeyCreationMPCv2StateEnum;
29
+ (function (RedpallasKeyCreationMPCv2StateEnum) {
30
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC1Round0Data"] = -1] = "WaitingForOVC1Round0Data";
31
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC2Round1Data"] = 0] = "WaitingForOVC2Round1Data";
32
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC1Round1Data"] = 1] = "WaitingForOVC1Round1Data";
33
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForBitgoRound1Data"] = 2] = "WaitingForBitgoRound1Data";
34
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC1Round2Data"] = 3] = "WaitingForOVC1Round2Data";
35
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC2Round2Data"] = 4] = "WaitingForOVC2Round2Data";
36
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForBitgoRound2Data"] = 5] = "WaitingForBitgoRound2Data";
37
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC1GenerateKey"] = 6] = "WaitingForOVC1GenerateKey";
38
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["WaitingForOVC2GenerateKey"] = 7] = "WaitingForOVC2GenerateKey";
39
+ RedpallasKeyCreationMPCv2StateEnum[RedpallasKeyCreationMPCv2StateEnum["KeyGenerationComplete"] = 8] = "KeyGenerationComplete";
40
+ })(RedpallasKeyCreationMPCv2StateEnum || (exports.RedpallasKeyCreationMPCv2StateEnum = RedpallasKeyCreationMPCv2StateEnum = {}));
41
+ exports.RedpallasKeyCreationMPCv2State = t.union([
42
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data),
43
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data),
44
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data),
45
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data),
46
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data),
47
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data),
48
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data),
49
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey),
50
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey),
51
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete),
52
+ ]);
53
+ //# sourceMappingURL=redpallasKeygenState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redpallasKeygenState.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/redpallasKeygenState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,kCAWX;AAXD,WAAY,kCAAkC;IAC5C,oIAA6B,CAAA;IAC7B,mIAAwB,CAAA;IACxB,mIAAwB,CAAA;IACxB,qIAAyB,CAAA;IACzB,mIAAwB,CAAA;IACxB,mIAAwB,CAAA;IACxB,qIAAyB,CAAA;IACzB,qIAAyB,CAAA;IACzB,qIAAyB,CAAA;IACzB,6HAAqB,CAAA;AACvB,CAAC,EAXW,kCAAkC,kDAAlC,kCAAkC,QAW7C;AAEY,QAAA,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC;IACpD,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,wBAAwB,CAAC;IACtE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,wBAAwB,CAAC;IACtE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,wBAAwB,CAAC;IACtE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,wBAAwB,CAAC;IACtE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,wBAAwB,CAAC;IACtE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,yBAAyB,CAAC;IACvE,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,qBAAqB,CAAC;CACpE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.62.0",
3
+ "version": "6.63.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -111,3 +111,43 @@ export const EddsaMPCv2KeyGenRound2Response = t.type({
111
111
  export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<
112
112
  typeof EddsaMPCv2KeyGenRound2Response
113
113
  >;
114
+
115
+ // RedPallas MPCv2 (2-round) keygen codecs
116
+
117
+ export const RedpallasMPCv2KeyGenRound1Request = t.type({
118
+ userGpgPublicKey: NonEmptyString,
119
+ backupGpgPublicKey: NonEmptyString,
120
+ userMsg1: EddsaMPCv2SignedMessage,
121
+ backupMsg1: EddsaMPCv2SignedMessage,
122
+ });
123
+ export type RedpallasMPCv2KeyGenRound1Request = t.TypeOf<
124
+ typeof RedpallasMPCv2KeyGenRound1Request
125
+ >;
126
+
127
+ export const RedpallasMPCv2KeyGenRound1Response = t.type({
128
+ sessionId: NonEmptyString,
129
+ bitgoMsg1: EddsaMPCv2SignedMessage,
130
+ });
131
+ export type RedpallasMPCv2KeyGenRound1Response = t.TypeOf<
132
+ typeof RedpallasMPCv2KeyGenRound1Response
133
+ >;
134
+
135
+ export const RedpallasMPCv2KeyGenRound2Request = t.type({
136
+ sessionId: NonEmptyString,
137
+ userMsg2: EddsaMPCv2SignedMessage,
138
+ backupMsg2: EddsaMPCv2SignedMessage,
139
+ // hex-encoded 32-byte seed; must be identical across user/backup/BitGo DKG parties.
140
+ derivationSeed: t.string,
141
+ });
142
+ export type RedpallasMPCv2KeyGenRound2Request = t.TypeOf<
143
+ typeof RedpallasMPCv2KeyGenRound2Request
144
+ >;
145
+
146
+ export const RedpallasMPCv2KeyGenRound2Response = t.type({
147
+ sessionId: NonEmptyString,
148
+ commonPublicKeychain: NonEmptyString,
149
+ bitgoMsg2: EddsaMPCv2SignedMessage,
150
+ });
151
+ export type RedpallasMPCv2KeyGenRound2Response = t.TypeOf<
152
+ typeof RedpallasMPCv2KeyGenRound2Response
153
+ >;
@@ -2,5 +2,7 @@ export * from "./keygenRound";
2
2
  export * from "./keygenState";
3
3
  export * from "./eddsaKeygenRound";
4
4
  export * from "./eddsaKeygenState";
5
+ export * from "./redpallasKeygenRound";
6
+ export * from "./redpallasKeygenState";
5
7
  export * from "./walletType";
6
8
  export * from "./dsgType";
@@ -0,0 +1,101 @@
1
+ import * as t from "io-ts";
2
+ import { NonEmptyString } from "io-ts-types";
3
+
4
+ import { EddsaMPCv2SignedMessage } from "../common";
5
+ import { RedpallasKeyCreationMPCv2State } from "./redpallasKeygenState";
6
+ import { OVCIndexEnum } from "./keygenRound";
7
+ import { WalletType } from "./walletType";
8
+
9
+ const BaseRoundPayload = t.type({
10
+ state: RedpallasKeyCreationMPCv2State,
11
+ tssVersion: NonEmptyString,
12
+ walletType: WalletType,
13
+ coin: NonEmptyString,
14
+ });
15
+
16
+ type BaseRoundPayload = t.TypeOf<typeof BaseRoundPayload>;
17
+
18
+ export const RedpallasOVC1ToBitgoRound1Payload = t.intersection([
19
+ BaseRoundPayload,
20
+ t.type({
21
+ ovc: t.type({
22
+ [OVCIndexEnum.ONE]: t.type({
23
+ gpgPubKey: NonEmptyString,
24
+ ovcMsg1: EddsaMPCv2SignedMessage,
25
+ }),
26
+ [OVCIndexEnum.TWO]: t.type({
27
+ gpgPubKey: NonEmptyString,
28
+ ovcMsg1: EddsaMPCv2SignedMessage,
29
+ }),
30
+ }),
31
+ }),
32
+ ]);
33
+
34
+ export type RedpallasOVC1ToBitgoRound1Payload = t.TypeOf<
35
+ typeof RedpallasOVC1ToBitgoRound1Payload
36
+ >;
37
+
38
+ export const RedpallasPlatformRound1Payload = t.type({
39
+ sessionId: NonEmptyString,
40
+ bitgoMsg1: EddsaMPCv2SignedMessage,
41
+ });
42
+
43
+ export type RedpallasPlatformRound1Payload = t.TypeOf<
44
+ typeof RedpallasPlatformRound1Payload
45
+ >;
46
+
47
+ export const RedpallasBitgoToOVC1Round1Response = t.intersection([
48
+ RedpallasOVC1ToBitgoRound1Payload,
49
+ t.type({ platform: RedpallasPlatformRound1Payload }),
50
+ ]);
51
+
52
+ export type RedpallasBitgoToOVC1Round1Response = t.TypeOf<
53
+ typeof RedpallasBitgoToOVC1Round1Response
54
+ >;
55
+
56
+ export const RedpallasOVC2ToBitgoRound2Payload = t.intersection([
57
+ BaseRoundPayload,
58
+ t.type({
59
+ ovc: t.type({
60
+ [OVCIndexEnum.ONE]: t.type({
61
+ gpgPubKey: NonEmptyString,
62
+ ovcMsg1: EddsaMPCv2SignedMessage,
63
+ ovcMsg2: EddsaMPCv2SignedMessage,
64
+ }),
65
+ [OVCIndexEnum.TWO]: t.type({
66
+ gpgPubKey: NonEmptyString,
67
+ ovcMsg1: EddsaMPCv2SignedMessage,
68
+ ovcMsg2: EddsaMPCv2SignedMessage,
69
+ }),
70
+ }),
71
+ platform: RedpallasPlatformRound1Payload,
72
+ // hex-encoded 32-byte seed; must be identical across user/backup/BitGo DKG parties.
73
+ derivationSeed: t.string,
74
+ }),
75
+ ]);
76
+
77
+ export type RedpallasOVC2ToBitgoRound2Payload = t.TypeOf<
78
+ typeof RedpallasOVC2ToBitgoRound2Payload
79
+ >;
80
+
81
+ export const RedpallasPlatformRound2Payload = t.intersection([
82
+ RedpallasPlatformRound1Payload,
83
+ t.type({
84
+ commonPublicKeychain: NonEmptyString,
85
+ bitgoMsg2: EddsaMPCv2SignedMessage,
86
+ }),
87
+ ]);
88
+
89
+ export type RedpallasPlatformRound2Payload = t.TypeOf<
90
+ typeof RedpallasPlatformRound2Payload
91
+ >;
92
+
93
+ export const RedpallasBitgoToOVC1Round2Response = t.intersection([
94
+ t.type({ bitGoKeyId: NonEmptyString }),
95
+ RedpallasOVC2ToBitgoRound2Payload,
96
+ t.type({ platform: RedpallasPlatformRound2Payload }),
97
+ ]);
98
+
99
+ export type RedpallasBitgoToOVC1Round2Response = t.TypeOf<
100
+ typeof RedpallasBitgoToOVC1Round2Response
101
+ >;
@@ -0,0 +1,31 @@
1
+ import * as t from "io-ts";
2
+
3
+ export enum RedpallasKeyCreationMPCv2StateEnum {
4
+ WaitingForOVC1Round0Data = -1,
5
+ WaitingForOVC2Round1Data,
6
+ WaitingForOVC1Round1Data,
7
+ WaitingForBitgoRound1Data,
8
+ WaitingForOVC1Round2Data,
9
+ WaitingForOVC2Round2Data,
10
+ WaitingForBitgoRound2Data,
11
+ WaitingForOVC1GenerateKey,
12
+ WaitingForOVC2GenerateKey,
13
+ KeyGenerationComplete,
14
+ }
15
+
16
+ export const RedpallasKeyCreationMPCv2State = t.union([
17
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data),
18
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data),
19
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data),
20
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data),
21
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data),
22
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data),
23
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data),
24
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey),
25
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey),
26
+ t.literal(RedpallasKeyCreationMPCv2StateEnum.KeyGenerationComplete),
27
+ ]);
28
+
29
+ export type RedpallasKeyCreationMPCv2State = t.TypeOf<
30
+ typeof RedpallasKeyCreationMPCv2State
31
+ >;