@bitgo/public-types 6.16.0 → 6.17.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/smc/eddsaKeygenRound.d.ts +241 -0
- package/dist/src/schema/mpcv2/smc/eddsaKeygenRound.js +131 -0
- package/dist/src/schema/mpcv2/smc/eddsaKeygenRound.js.map +1 -0
- package/dist/src/schema/mpcv2/smc/eddsaKeygenState.d.ts +15 -0
- package/dist/src/schema/mpcv2/smc/eddsaKeygenState.js +53 -0
- package/dist/src/schema/mpcv2/smc/eddsaKeygenState.js.map +1 -0
- package/dist/src/schema/mpcv2/smc/index.d.ts +2 -0
- package/dist/src/schema/mpcv2/smc/index.js +2 -0
- package/dist/src/schema/mpcv2/smc/index.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/mpcv2/smc/eddsaKeygenRound.ts +148 -0
- package/src/schema/mpcv2/smc/eddsaKeygenState.ts +31 -0
- package/src/schema/mpcv2/smc/index.ts +2 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const EddsaOVC1ToOVC2Round1Payload: t.IntersectionC<[t.TypeC<{
|
|
3
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.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
|
+
}>;
|
|
17
|
+
}>]>;
|
|
18
|
+
export type EddsaOVC1ToOVC2Round1Payload = t.TypeOf<typeof EddsaOVC1ToOVC2Round1Payload>;
|
|
19
|
+
export declare const EddsaOVC1ToBitgoRound1Payload: t.IntersectionC<[t.TypeC<{
|
|
20
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
21
|
+
tssVersion: import("io-ts-types").NonEmptyStringC;
|
|
22
|
+
walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
|
|
23
|
+
coin: import("io-ts-types").NonEmptyStringC;
|
|
24
|
+
}>, t.TypeC<{
|
|
25
|
+
ovc: t.TypeC<{
|
|
26
|
+
1: t.TypeC<{
|
|
27
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
28
|
+
ovcMsg1: t.TypeC<{
|
|
29
|
+
message: t.StringC;
|
|
30
|
+
signature: t.StringC;
|
|
31
|
+
}>;
|
|
32
|
+
}>;
|
|
33
|
+
2: t.TypeC<{
|
|
34
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
35
|
+
ovcMsg1: t.TypeC<{
|
|
36
|
+
message: t.StringC;
|
|
37
|
+
signature: t.StringC;
|
|
38
|
+
}>;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
}>]>;
|
|
42
|
+
export type EddsaOVC1ToBitgoRound1Payload = t.TypeOf<typeof EddsaOVC1ToBitgoRound1Payload>;
|
|
43
|
+
export declare const EddsaPlatformRound1Payload: t.TypeC<{
|
|
44
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
45
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
46
|
+
bitgoMsg1: t.TypeC<{
|
|
47
|
+
message: t.StringC;
|
|
48
|
+
signature: t.StringC;
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
export type EddsaPlatformRound1Payload = t.TypeOf<typeof EddsaPlatformRound1Payload>;
|
|
52
|
+
export declare const EddsaBitgoToOVC1Round1Response: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
53
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
54
|
+
tssVersion: import("io-ts-types").NonEmptyStringC;
|
|
55
|
+
walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
|
|
56
|
+
coin: import("io-ts-types").NonEmptyStringC;
|
|
57
|
+
}>, t.TypeC<{
|
|
58
|
+
ovc: t.TypeC<{
|
|
59
|
+
1: t.TypeC<{
|
|
60
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
61
|
+
ovcMsg1: t.TypeC<{
|
|
62
|
+
message: t.StringC;
|
|
63
|
+
signature: t.StringC;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
2: t.TypeC<{
|
|
67
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
68
|
+
ovcMsg1: t.TypeC<{
|
|
69
|
+
message: t.StringC;
|
|
70
|
+
signature: t.StringC;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
}>;
|
|
74
|
+
}>]>, t.TypeC<{
|
|
75
|
+
platform: t.TypeC<{
|
|
76
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
77
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
78
|
+
bitgoMsg1: t.TypeC<{
|
|
79
|
+
message: t.StringC;
|
|
80
|
+
signature: t.StringC;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
}>]>;
|
|
84
|
+
export type EddsaBitgoToOVC1Round1Response = t.TypeOf<typeof EddsaBitgoToOVC1Round1Response>;
|
|
85
|
+
export declare const EddsaOVC1ToOVC2Round2Payload: t.IntersectionC<[t.TypeC<{
|
|
86
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
87
|
+
tssVersion: import("io-ts-types").NonEmptyStringC;
|
|
88
|
+
walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
|
|
89
|
+
coin: import("io-ts-types").NonEmptyStringC;
|
|
90
|
+
}>, t.TypeC<{
|
|
91
|
+
ovc: t.TypeC<{
|
|
92
|
+
1: t.TypeC<{
|
|
93
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
94
|
+
ovcMsg1: t.TypeC<{
|
|
95
|
+
message: t.StringC;
|
|
96
|
+
signature: t.StringC;
|
|
97
|
+
}>;
|
|
98
|
+
ovcMsg2: t.TypeC<{
|
|
99
|
+
message: t.StringC;
|
|
100
|
+
signature: t.StringC;
|
|
101
|
+
}>;
|
|
102
|
+
}>;
|
|
103
|
+
2: t.TypeC<{
|
|
104
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
105
|
+
ovcMsg1: t.TypeC<{
|
|
106
|
+
message: t.StringC;
|
|
107
|
+
signature: t.StringC;
|
|
108
|
+
}>;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
111
|
+
platform: t.TypeC<{
|
|
112
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
113
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
114
|
+
bitgoMsg1: t.TypeC<{
|
|
115
|
+
message: t.StringC;
|
|
116
|
+
signature: t.StringC;
|
|
117
|
+
}>;
|
|
118
|
+
}>;
|
|
119
|
+
}>]>;
|
|
120
|
+
export type EddsaOVC1ToOVC2Round2Payload = t.TypeOf<typeof EddsaOVC1ToOVC2Round2Payload>;
|
|
121
|
+
export declare const EddsaOVC2ToBitgoRound2Payload: t.IntersectionC<[t.TypeC<{
|
|
122
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
123
|
+
tssVersion: import("io-ts-types").NonEmptyStringC;
|
|
124
|
+
walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
|
|
125
|
+
coin: import("io-ts-types").NonEmptyStringC;
|
|
126
|
+
}>, t.TypeC<{
|
|
127
|
+
ovc: t.TypeC<{
|
|
128
|
+
1: t.TypeC<{
|
|
129
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
130
|
+
ovcMsg1: t.TypeC<{
|
|
131
|
+
message: t.StringC;
|
|
132
|
+
signature: t.StringC;
|
|
133
|
+
}>;
|
|
134
|
+
ovcMsg2: t.TypeC<{
|
|
135
|
+
message: t.StringC;
|
|
136
|
+
signature: t.StringC;
|
|
137
|
+
}>;
|
|
138
|
+
}>;
|
|
139
|
+
2: t.TypeC<{
|
|
140
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
141
|
+
ovcMsg1: t.TypeC<{
|
|
142
|
+
message: t.StringC;
|
|
143
|
+
signature: t.StringC;
|
|
144
|
+
}>;
|
|
145
|
+
ovcMsg2: t.TypeC<{
|
|
146
|
+
message: t.StringC;
|
|
147
|
+
signature: t.StringC;
|
|
148
|
+
}>;
|
|
149
|
+
}>;
|
|
150
|
+
}>;
|
|
151
|
+
platform: t.TypeC<{
|
|
152
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
153
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
154
|
+
bitgoMsg1: t.TypeC<{
|
|
155
|
+
message: t.StringC;
|
|
156
|
+
signature: t.StringC;
|
|
157
|
+
}>;
|
|
158
|
+
}>;
|
|
159
|
+
}>]>;
|
|
160
|
+
export type EddsaOVC2ToBitgoRound2Payload = t.TypeOf<typeof EddsaOVC2ToBitgoRound2Payload>;
|
|
161
|
+
export declare const EddsaPlatformRound2Payload: t.IntersectionC<[t.TypeC<{
|
|
162
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
163
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
164
|
+
bitgoMsg1: t.TypeC<{
|
|
165
|
+
message: t.StringC;
|
|
166
|
+
signature: t.StringC;
|
|
167
|
+
}>;
|
|
168
|
+
}>, t.TypeC<{
|
|
169
|
+
commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
|
|
170
|
+
bitgoMsg2: t.TypeC<{
|
|
171
|
+
message: t.StringC;
|
|
172
|
+
signature: t.StringC;
|
|
173
|
+
}>;
|
|
174
|
+
}>]>;
|
|
175
|
+
export type EddsaPlatformRound2Payload = t.TypeOf<typeof EddsaPlatformRound2Payload>;
|
|
176
|
+
export declare const EddsaBitgoToOVC1Round2Response: t.IntersectionC<[t.TypeC<{
|
|
177
|
+
bitGoKeyId: import("io-ts-types").NonEmptyStringC;
|
|
178
|
+
}>, t.IntersectionC<[t.TypeC<{
|
|
179
|
+
state: t.UnionC<[t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<import("./eddsaKeygenState").EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
180
|
+
tssVersion: import("io-ts-types").NonEmptyStringC;
|
|
181
|
+
walletType: t.KeyofC<typeof import("./walletType").WalletTypeEnum>;
|
|
182
|
+
coin: import("io-ts-types").NonEmptyStringC;
|
|
183
|
+
}>, t.TypeC<{
|
|
184
|
+
ovc: t.TypeC<{
|
|
185
|
+
1: t.TypeC<{
|
|
186
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
187
|
+
ovcMsg1: t.TypeC<{
|
|
188
|
+
message: t.StringC;
|
|
189
|
+
signature: t.StringC;
|
|
190
|
+
}>;
|
|
191
|
+
ovcMsg2: t.TypeC<{
|
|
192
|
+
message: t.StringC;
|
|
193
|
+
signature: t.StringC;
|
|
194
|
+
}>;
|
|
195
|
+
}>;
|
|
196
|
+
2: t.TypeC<{
|
|
197
|
+
gpgPubKey: import("io-ts-types").NonEmptyStringC;
|
|
198
|
+
ovcMsg1: t.TypeC<{
|
|
199
|
+
message: t.StringC;
|
|
200
|
+
signature: t.StringC;
|
|
201
|
+
}>;
|
|
202
|
+
ovcMsg2: t.TypeC<{
|
|
203
|
+
message: t.StringC;
|
|
204
|
+
signature: t.StringC;
|
|
205
|
+
}>;
|
|
206
|
+
}>;
|
|
207
|
+
}>;
|
|
208
|
+
platform: t.TypeC<{
|
|
209
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
210
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
211
|
+
bitgoMsg1: t.TypeC<{
|
|
212
|
+
message: t.StringC;
|
|
213
|
+
signature: t.StringC;
|
|
214
|
+
}>;
|
|
215
|
+
}>;
|
|
216
|
+
}>]>, t.TypeC<{
|
|
217
|
+
platform: t.IntersectionC<[t.TypeC<{
|
|
218
|
+
walletGpgPubKeySigs: import("io-ts-types").NonEmptyStringC;
|
|
219
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
220
|
+
bitgoMsg1: t.TypeC<{
|
|
221
|
+
message: t.StringC;
|
|
222
|
+
signature: t.StringC;
|
|
223
|
+
}>;
|
|
224
|
+
}>, t.TypeC<{
|
|
225
|
+
commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
|
|
226
|
+
bitgoMsg2: t.TypeC<{
|
|
227
|
+
message: t.StringC;
|
|
228
|
+
signature: t.StringC;
|
|
229
|
+
}>;
|
|
230
|
+
}>]>;
|
|
231
|
+
}>, t.PartialC<{
|
|
232
|
+
ovc: t.TypeC<{
|
|
233
|
+
1: t.PartialC<{
|
|
234
|
+
commonKeyChainSignature: import("io-ts-types").NonEmptyStringC;
|
|
235
|
+
}>;
|
|
236
|
+
2: t.PartialC<{
|
|
237
|
+
commonKeyChainSignature: import("io-ts-types").NonEmptyStringC;
|
|
238
|
+
}>;
|
|
239
|
+
}>;
|
|
240
|
+
}>]>;
|
|
241
|
+
export type EddsaBitgoToOVC1Round2Response = t.TypeOf<typeof EddsaBitgoToOVC1Round2Response>;
|
|
@@ -0,0 +1,131 @@
|
|
|
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.EddsaBitgoToOVC1Round2Response = exports.EddsaPlatformRound2Payload = exports.EddsaOVC2ToBitgoRound2Payload = exports.EddsaOVC1ToOVC2Round2Payload = exports.EddsaBitgoToOVC1Round1Response = exports.EddsaPlatformRound1Payload = exports.EddsaOVC1ToBitgoRound1Payload = exports.EddsaOVC1ToOVC2Round1Payload = 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 eddsaKeygenState_1 = require("./eddsaKeygenState");
|
|
31
|
+
const keygenRound_1 = require("./keygenRound");
|
|
32
|
+
const walletType_1 = require("./walletType");
|
|
33
|
+
const BaseRoundPayload = t.type({
|
|
34
|
+
state: eddsaKeygenState_1.EddsaKeyCreationMPCv2State,
|
|
35
|
+
tssVersion: io_ts_types_1.NonEmptyString,
|
|
36
|
+
walletType: walletType_1.WalletType,
|
|
37
|
+
coin: io_ts_types_1.NonEmptyString,
|
|
38
|
+
});
|
|
39
|
+
exports.EddsaOVC1ToOVC2Round1Payload = 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
|
+
}),
|
|
48
|
+
}),
|
|
49
|
+
]);
|
|
50
|
+
exports.EddsaOVC1ToBitgoRound1Payload = t.intersection([
|
|
51
|
+
BaseRoundPayload,
|
|
52
|
+
t.type({
|
|
53
|
+
ovc: t.type({
|
|
54
|
+
[keygenRound_1.OVCIndexEnum.ONE]: t.type({
|
|
55
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
56
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
57
|
+
}),
|
|
58
|
+
[keygenRound_1.OVCIndexEnum.TWO]: t.type({
|
|
59
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
60
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
61
|
+
}),
|
|
62
|
+
}),
|
|
63
|
+
}),
|
|
64
|
+
]);
|
|
65
|
+
exports.EddsaPlatformRound1Payload = t.type({
|
|
66
|
+
walletGpgPubKeySigs: io_ts_types_1.NonEmptyString,
|
|
67
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
68
|
+
bitgoMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
69
|
+
});
|
|
70
|
+
exports.EddsaBitgoToOVC1Round1Response = t.intersection([
|
|
71
|
+
exports.EddsaOVC1ToBitgoRound1Payload,
|
|
72
|
+
t.type({ platform: exports.EddsaPlatformRound1Payload }),
|
|
73
|
+
]);
|
|
74
|
+
exports.EddsaOVC1ToOVC2Round2Payload = t.intersection([
|
|
75
|
+
BaseRoundPayload,
|
|
76
|
+
t.type({
|
|
77
|
+
ovc: t.type({
|
|
78
|
+
[keygenRound_1.OVCIndexEnum.ONE]: t.type({
|
|
79
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
80
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
81
|
+
ovcMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
82
|
+
}),
|
|
83
|
+
[keygenRound_1.OVCIndexEnum.TWO]: t.type({
|
|
84
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
85
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
86
|
+
}),
|
|
87
|
+
}),
|
|
88
|
+
platform: exports.EddsaPlatformRound1Payload,
|
|
89
|
+
}),
|
|
90
|
+
]);
|
|
91
|
+
exports.EddsaOVC2ToBitgoRound2Payload = t.intersection([
|
|
92
|
+
BaseRoundPayload,
|
|
93
|
+
t.type({
|
|
94
|
+
ovc: t.type({
|
|
95
|
+
[keygenRound_1.OVCIndexEnum.ONE]: t.type({
|
|
96
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
97
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
98
|
+
ovcMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
99
|
+
}),
|
|
100
|
+
[keygenRound_1.OVCIndexEnum.TWO]: t.type({
|
|
101
|
+
gpgPubKey: io_ts_types_1.NonEmptyString,
|
|
102
|
+
ovcMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
103
|
+
ovcMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
104
|
+
}),
|
|
105
|
+
}),
|
|
106
|
+
platform: exports.EddsaPlatformRound1Payload,
|
|
107
|
+
}),
|
|
108
|
+
]);
|
|
109
|
+
exports.EddsaPlatformRound2Payload = t.intersection([
|
|
110
|
+
exports.EddsaPlatformRound1Payload,
|
|
111
|
+
t.type({
|
|
112
|
+
commonPublicKeychain: io_ts_types_1.NonEmptyString,
|
|
113
|
+
bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
114
|
+
}),
|
|
115
|
+
]);
|
|
116
|
+
exports.EddsaBitgoToOVC1Round2Response = t.intersection([
|
|
117
|
+
t.type({ bitGoKeyId: io_ts_types_1.NonEmptyString }),
|
|
118
|
+
exports.EddsaOVC2ToBitgoRound2Payload,
|
|
119
|
+
t.type({ platform: exports.EddsaPlatformRound2Payload }),
|
|
120
|
+
t.partial({
|
|
121
|
+
ovc: t.type({
|
|
122
|
+
[keygenRound_1.OVCIndexEnum.ONE]: t.partial({
|
|
123
|
+
commonKeyChainSignature: io_ts_types_1.NonEmptyString,
|
|
124
|
+
}),
|
|
125
|
+
[keygenRound_1.OVCIndexEnum.TWO]: t.partial({
|
|
126
|
+
commonKeyChainSignature: io_ts_types_1.NonEmptyString,
|
|
127
|
+
}),
|
|
128
|
+
}),
|
|
129
|
+
}),
|
|
130
|
+
]);
|
|
131
|
+
//# sourceMappingURL=eddsaKeygenRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eddsaKeygenRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/eddsaKeygenRound.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare enum EddsaKeyCreationMPCv2StateEnum {
|
|
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 EddsaKeyCreationMPCv2State: t.UnionC<[t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey>, t.LiteralC<EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete>]>;
|
|
15
|
+
export type EddsaKeyCreationMPCv2State = t.TypeOf<typeof EddsaKeyCreationMPCv2State>;
|
|
@@ -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.EddsaKeyCreationMPCv2State = exports.EddsaKeyCreationMPCv2StateEnum = void 0;
|
|
27
|
+
const t = __importStar(require("io-ts"));
|
|
28
|
+
var EddsaKeyCreationMPCv2StateEnum;
|
|
29
|
+
(function (EddsaKeyCreationMPCv2StateEnum) {
|
|
30
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC1Round0Data"] = -1] = "WaitingForOVC1Round0Data";
|
|
31
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC2Round1Data"] = 0] = "WaitingForOVC2Round1Data";
|
|
32
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC1Round1Data"] = 1] = "WaitingForOVC1Round1Data";
|
|
33
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForBitgoRound1Data"] = 2] = "WaitingForBitgoRound1Data";
|
|
34
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC1Round2Data"] = 3] = "WaitingForOVC1Round2Data";
|
|
35
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC2Round2Data"] = 4] = "WaitingForOVC2Round2Data";
|
|
36
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForBitgoRound2Data"] = 5] = "WaitingForBitgoRound2Data";
|
|
37
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC1GenerateKey"] = 6] = "WaitingForOVC1GenerateKey";
|
|
38
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["WaitingForOVC2GenerateKey"] = 7] = "WaitingForOVC2GenerateKey";
|
|
39
|
+
EddsaKeyCreationMPCv2StateEnum[EddsaKeyCreationMPCv2StateEnum["KeyGenerationComplete"] = 8] = "KeyGenerationComplete";
|
|
40
|
+
})(EddsaKeyCreationMPCv2StateEnum || (exports.EddsaKeyCreationMPCv2StateEnum = EddsaKeyCreationMPCv2StateEnum = {}));
|
|
41
|
+
exports.EddsaKeyCreationMPCv2State = t.union([
|
|
42
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data),
|
|
43
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data),
|
|
44
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data),
|
|
45
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data),
|
|
46
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data),
|
|
47
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data),
|
|
48
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data),
|
|
49
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey),
|
|
50
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey),
|
|
51
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete),
|
|
52
|
+
]);
|
|
53
|
+
//# sourceMappingURL=eddsaKeygenState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eddsaKeygenState.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/smc/eddsaKeygenState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,8BAWX;AAXD,WAAY,8BAA8B;IACxC,4HAA6B,CAAA;IAC7B,2HAAwB,CAAA;IACxB,2HAAwB,CAAA;IACxB,6HAAyB,CAAA;IACzB,2HAAwB,CAAA;IACxB,2HAAwB,CAAA;IACxB,6HAAyB,CAAA;IACzB,6HAAyB,CAAA;IACzB,6HAAyB,CAAA;IACzB,qHAAqB,CAAA;AACvB,CAAC,EAXW,8BAA8B,8CAA9B,8BAA8B,QAWzC;AAEY,QAAA,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC;IAChD,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,yBAAyB,CAAC;IACnE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC;IAClE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,yBAAyB,CAAC;IACnE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,yBAAyB,CAAC;IACnE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,yBAAyB,CAAC;IACnE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,qBAAqB,CAAC;CAChE,CAAC,CAAC"}
|
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./keygenRound"), exports);
|
|
18
18
|
__exportStar(require("./keygenState"), exports);
|
|
19
|
+
__exportStar(require("./eddsaKeygenRound"), exports);
|
|
20
|
+
__exportStar(require("./eddsaKeygenState"), exports);
|
|
19
21
|
__exportStar(require("./walletType"), exports);
|
|
20
22
|
__exportStar(require("./dsgType"), exports);
|
|
21
23
|
//# 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,+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,+CAA6B;AAC7B,4CAA0B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { NonEmptyString } from "io-ts-types";
|
|
3
|
+
|
|
4
|
+
import { EddsaMPCv2SignedMessage } from "../common";
|
|
5
|
+
import { EddsaKeyCreationMPCv2State } from "./eddsaKeygenState";
|
|
6
|
+
import { OVCIndexEnum } from "./keygenRound";
|
|
7
|
+
import { WalletType } from "./walletType";
|
|
8
|
+
|
|
9
|
+
const BaseRoundPayload = t.type({
|
|
10
|
+
state: EddsaKeyCreationMPCv2State,
|
|
11
|
+
tssVersion: NonEmptyString,
|
|
12
|
+
walletType: WalletType,
|
|
13
|
+
coin: NonEmptyString,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
type BaseRoundPayload = t.TypeOf<typeof BaseRoundPayload>;
|
|
17
|
+
|
|
18
|
+
export const EddsaOVC1ToOVC2Round1Payload = t.intersection([
|
|
19
|
+
BaseRoundPayload,
|
|
20
|
+
t.type({
|
|
21
|
+
ovc: t.type({
|
|
22
|
+
[OVCIndexEnum.ONE]: t.type({
|
|
23
|
+
gpgPubKey: NonEmptyString,
|
|
24
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
25
|
+
}),
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
export type EddsaOVC1ToOVC2Round1Payload = t.TypeOf<
|
|
31
|
+
typeof EddsaOVC1ToOVC2Round1Payload
|
|
32
|
+
>;
|
|
33
|
+
|
|
34
|
+
export const EddsaOVC1ToBitgoRound1Payload = t.intersection([
|
|
35
|
+
BaseRoundPayload,
|
|
36
|
+
t.type({
|
|
37
|
+
ovc: t.type({
|
|
38
|
+
[OVCIndexEnum.ONE]: t.type({
|
|
39
|
+
gpgPubKey: NonEmptyString,
|
|
40
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
41
|
+
}),
|
|
42
|
+
[OVCIndexEnum.TWO]: t.type({
|
|
43
|
+
gpgPubKey: NonEmptyString,
|
|
44
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
45
|
+
}),
|
|
46
|
+
}),
|
|
47
|
+
}),
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
export type EddsaOVC1ToBitgoRound1Payload = t.TypeOf<
|
|
51
|
+
typeof EddsaOVC1ToBitgoRound1Payload
|
|
52
|
+
>;
|
|
53
|
+
|
|
54
|
+
export const EddsaPlatformRound1Payload = t.type({
|
|
55
|
+
walletGpgPubKeySigs: NonEmptyString,
|
|
56
|
+
sessionId: NonEmptyString,
|
|
57
|
+
bitgoMsg1: EddsaMPCv2SignedMessage,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export type EddsaPlatformRound1Payload = t.TypeOf<
|
|
61
|
+
typeof EddsaPlatformRound1Payload
|
|
62
|
+
>;
|
|
63
|
+
|
|
64
|
+
export const EddsaBitgoToOVC1Round1Response = t.intersection([
|
|
65
|
+
EddsaOVC1ToBitgoRound1Payload,
|
|
66
|
+
t.type({ platform: EddsaPlatformRound1Payload }),
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
export type EddsaBitgoToOVC1Round1Response = t.TypeOf<
|
|
70
|
+
typeof EddsaBitgoToOVC1Round1Response
|
|
71
|
+
>;
|
|
72
|
+
|
|
73
|
+
export const EddsaOVC1ToOVC2Round2Payload = t.intersection([
|
|
74
|
+
BaseRoundPayload,
|
|
75
|
+
t.type({
|
|
76
|
+
ovc: t.type({
|
|
77
|
+
[OVCIndexEnum.ONE]: t.type({
|
|
78
|
+
gpgPubKey: NonEmptyString,
|
|
79
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
80
|
+
ovcMsg2: EddsaMPCv2SignedMessage,
|
|
81
|
+
}),
|
|
82
|
+
[OVCIndexEnum.TWO]: t.type({
|
|
83
|
+
gpgPubKey: NonEmptyString,
|
|
84
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
85
|
+
}),
|
|
86
|
+
}),
|
|
87
|
+
platform: EddsaPlatformRound1Payload,
|
|
88
|
+
}),
|
|
89
|
+
]);
|
|
90
|
+
|
|
91
|
+
export type EddsaOVC1ToOVC2Round2Payload = t.TypeOf<
|
|
92
|
+
typeof EddsaOVC1ToOVC2Round2Payload
|
|
93
|
+
>;
|
|
94
|
+
|
|
95
|
+
export const EddsaOVC2ToBitgoRound2Payload = t.intersection([
|
|
96
|
+
BaseRoundPayload,
|
|
97
|
+
t.type({
|
|
98
|
+
ovc: t.type({
|
|
99
|
+
[OVCIndexEnum.ONE]: t.type({
|
|
100
|
+
gpgPubKey: NonEmptyString,
|
|
101
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
102
|
+
ovcMsg2: EddsaMPCv2SignedMessage,
|
|
103
|
+
}),
|
|
104
|
+
[OVCIndexEnum.TWO]: t.type({
|
|
105
|
+
gpgPubKey: NonEmptyString,
|
|
106
|
+
ovcMsg1: EddsaMPCv2SignedMessage,
|
|
107
|
+
ovcMsg2: EddsaMPCv2SignedMessage,
|
|
108
|
+
}),
|
|
109
|
+
}),
|
|
110
|
+
platform: EddsaPlatformRound1Payload,
|
|
111
|
+
}),
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
export type EddsaOVC2ToBitgoRound2Payload = t.TypeOf<
|
|
115
|
+
typeof EddsaOVC2ToBitgoRound2Payload
|
|
116
|
+
>;
|
|
117
|
+
|
|
118
|
+
export const EddsaPlatformRound2Payload = t.intersection([
|
|
119
|
+
EddsaPlatformRound1Payload,
|
|
120
|
+
t.type({
|
|
121
|
+
commonPublicKeychain: NonEmptyString,
|
|
122
|
+
bitgoMsg2: EddsaMPCv2SignedMessage,
|
|
123
|
+
}),
|
|
124
|
+
]);
|
|
125
|
+
|
|
126
|
+
export type EddsaPlatformRound2Payload = t.TypeOf<
|
|
127
|
+
typeof EddsaPlatformRound2Payload
|
|
128
|
+
>;
|
|
129
|
+
|
|
130
|
+
export const EddsaBitgoToOVC1Round2Response = t.intersection([
|
|
131
|
+
t.type({ bitGoKeyId: NonEmptyString }),
|
|
132
|
+
EddsaOVC2ToBitgoRound2Payload,
|
|
133
|
+
t.type({ platform: EddsaPlatformRound2Payload }),
|
|
134
|
+
t.partial({
|
|
135
|
+
ovc: t.type({
|
|
136
|
+
[OVCIndexEnum.ONE]: t.partial({
|
|
137
|
+
commonKeyChainSignature: NonEmptyString,
|
|
138
|
+
}),
|
|
139
|
+
[OVCIndexEnum.TWO]: t.partial({
|
|
140
|
+
commonKeyChainSignature: NonEmptyString,
|
|
141
|
+
}),
|
|
142
|
+
}),
|
|
143
|
+
}),
|
|
144
|
+
]);
|
|
145
|
+
|
|
146
|
+
export type EddsaBitgoToOVC1Round2Response = t.TypeOf<
|
|
147
|
+
typeof EddsaBitgoToOVC1Round2Response
|
|
148
|
+
>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
|
|
3
|
+
export enum EddsaKeyCreationMPCv2StateEnum {
|
|
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 EddsaKeyCreationMPCv2State = t.union([
|
|
17
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data),
|
|
18
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data),
|
|
19
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data),
|
|
20
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data),
|
|
21
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data),
|
|
22
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data),
|
|
23
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data),
|
|
24
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey),
|
|
25
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey),
|
|
26
|
+
t.literal(EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete),
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
export type EddsaKeyCreationMPCv2State = t.TypeOf<
|
|
30
|
+
typeof EddsaKeyCreationMPCv2State
|
|
31
|
+
>;
|