@bitgo/public-types 6.82.0 → 6.84.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/keyGen/keygenRound.d.ts +40 -8
- package/dist/src/schema/mpcv2/keyGen/keygenRound.js +43 -20
- package/dist/src/schema/mpcv2/keyGen/keygenRound.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.js +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.d.ts +4 -2
- package/dist/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.js +4 -2
- package/dist/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +6 -2
- package/package.json +1 -1
- package/src/schema/mpcv2/keyGen/keygenRound.ts +68 -21
- package/src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.ts +4 -0
- package/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.ts +16 -7
|
@@ -107,7 +107,7 @@ 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<{
|
|
110
|
+
export declare const EddsaMPCv2KeyGenRound1Request: t.IntersectionC<[t.TypeC<{
|
|
111
111
|
userGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
112
112
|
backupGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
113
113
|
userMsg1: t.TypeC<{
|
|
@@ -118,17 +118,31 @@ export declare const EddsaMPCv2KeyGenRound1Request: t.TypeC<{
|
|
|
118
118
|
message: t.StringC;
|
|
119
119
|
signature: t.StringC;
|
|
120
120
|
}>;
|
|
121
|
-
}
|
|
121
|
+
}>, t.PartialC<{
|
|
122
|
+
userVrfMsg1: t.TypeC<{
|
|
123
|
+
message: t.StringC;
|
|
124
|
+
signature: t.StringC;
|
|
125
|
+
}>;
|
|
126
|
+
backupVrfMsg1: t.TypeC<{
|
|
127
|
+
message: t.StringC;
|
|
128
|
+
signature: t.StringC;
|
|
129
|
+
}>;
|
|
130
|
+
}>]>;
|
|
122
131
|
export type EddsaMPCv2KeyGenRound1Request = t.TypeOf<typeof EddsaMPCv2KeyGenRound1Request>;
|
|
123
|
-
export declare const EddsaMPCv2KeyGenRound1Response: t.TypeC<{
|
|
132
|
+
export declare const EddsaMPCv2KeyGenRound1Response: t.IntersectionC<[t.TypeC<{
|
|
124
133
|
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
125
134
|
bitgoMsg1: t.TypeC<{
|
|
126
135
|
message: t.StringC;
|
|
127
136
|
signature: t.StringC;
|
|
128
137
|
}>;
|
|
129
|
-
}
|
|
138
|
+
}>, t.PartialC<{
|
|
139
|
+
bitgoVrfMsg1: t.TypeC<{
|
|
140
|
+
message: t.StringC;
|
|
141
|
+
signature: t.StringC;
|
|
142
|
+
}>;
|
|
143
|
+
}>]>;
|
|
130
144
|
export type EddsaMPCv2KeyGenRound1Response = t.TypeOf<typeof EddsaMPCv2KeyGenRound1Response>;
|
|
131
|
-
export declare const EddsaMPCv2KeyGenRound2Request: t.TypeC<{
|
|
145
|
+
export declare const EddsaMPCv2KeyGenRound2Request: t.IntersectionC<[t.TypeC<{
|
|
132
146
|
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
133
147
|
userMsg2: t.TypeC<{
|
|
134
148
|
message: t.StringC;
|
|
@@ -138,16 +152,34 @@ export declare const EddsaMPCv2KeyGenRound2Request: t.TypeC<{
|
|
|
138
152
|
message: t.StringC;
|
|
139
153
|
signature: t.StringC;
|
|
140
154
|
}>;
|
|
141
|
-
}
|
|
155
|
+
}>, t.PartialC<{
|
|
156
|
+
userVrfMsg2: t.TypeC<{
|
|
157
|
+
message: t.StringC;
|
|
158
|
+
signature: t.StringC;
|
|
159
|
+
}>;
|
|
160
|
+
backupVrfMsg2: t.TypeC<{
|
|
161
|
+
message: t.StringC;
|
|
162
|
+
signature: t.StringC;
|
|
163
|
+
}>;
|
|
164
|
+
}>]>;
|
|
142
165
|
export type EddsaMPCv2KeyGenRound2Request = t.TypeOf<typeof EddsaMPCv2KeyGenRound2Request>;
|
|
143
|
-
export declare const EddsaMPCv2KeyGenRound2Response: t.TypeC<{
|
|
166
|
+
export declare const EddsaMPCv2KeyGenRound2Response: t.IntersectionC<[t.TypeC<{
|
|
144
167
|
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
145
168
|
commonPublicKeychain: import("io-ts-types").NonEmptyStringC;
|
|
146
169
|
bitgoMsg2: t.TypeC<{
|
|
147
170
|
message: t.StringC;
|
|
148
171
|
signature: t.StringC;
|
|
149
172
|
}>;
|
|
150
|
-
}
|
|
173
|
+
}>, t.PartialC<{
|
|
174
|
+
bitgoVrfMsgToUser: t.TypeC<{
|
|
175
|
+
message: t.StringC;
|
|
176
|
+
signature: t.StringC;
|
|
177
|
+
}>;
|
|
178
|
+
bitgoVrfMsgToBackup: t.TypeC<{
|
|
179
|
+
message: t.StringC;
|
|
180
|
+
signature: t.StringC;
|
|
181
|
+
}>;
|
|
182
|
+
}>]>;
|
|
151
183
|
export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<typeof EddsaMPCv2KeyGenRound2Response>;
|
|
152
184
|
export declare const RedpallasMPCv2KeyGenRound1Request: t.TypeC<{
|
|
153
185
|
userGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
@@ -65,26 +65,49 @@ exports.MPCv2KeyGenRound3Response = t.type({
|
|
|
65
65
|
commonKeychain: io_ts_types_1.NonEmptyString,
|
|
66
66
|
bitgoMsg4: common_1.MPCv2BroadcastMessage,
|
|
67
67
|
});
|
|
68
|
-
exports.EddsaMPCv2KeyGenRound1Request = t.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
68
|
+
exports.EddsaMPCv2KeyGenRound1Request = t.intersection([
|
|
69
|
+
t.type({
|
|
70
|
+
userGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
71
|
+
backupGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
72
|
+
userMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
73
|
+
backupMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
74
|
+
}),
|
|
75
|
+
t.partial({
|
|
76
|
+
userVrfMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
77
|
+
backupVrfMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
78
|
+
}),
|
|
79
|
+
], "EddsaMPCv2KeyGenRound1Request");
|
|
80
|
+
exports.EddsaMPCv2KeyGenRound1Response = t.intersection([
|
|
81
|
+
t.type({
|
|
82
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
83
|
+
bitgoMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
84
|
+
}),
|
|
85
|
+
t.partial({
|
|
86
|
+
bitgoVrfMsg1: common_1.EddsaMPCv2SignedMessage,
|
|
87
|
+
}),
|
|
88
|
+
], "EddsaMPCv2KeyGenRound1Response");
|
|
89
|
+
exports.EddsaMPCv2KeyGenRound2Request = t.intersection([
|
|
90
|
+
t.type({
|
|
91
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
92
|
+
userMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
93
|
+
backupMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
94
|
+
}),
|
|
95
|
+
t.partial({
|
|
96
|
+
userVrfMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
97
|
+
backupVrfMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
98
|
+
}),
|
|
99
|
+
], "EddsaMPCv2KeyGenRound2Request");
|
|
100
|
+
exports.EddsaMPCv2KeyGenRound2Response = t.intersection([
|
|
101
|
+
t.type({
|
|
102
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
103
|
+
commonPublicKeychain: io_ts_types_1.NonEmptyString,
|
|
104
|
+
bitgoMsg2: common_1.EddsaMPCv2SignedMessage,
|
|
105
|
+
}),
|
|
106
|
+
t.partial({
|
|
107
|
+
bitgoVrfMsgToUser: common_1.EddsaMPCv2SignedMessage,
|
|
108
|
+
bitgoVrfMsgToBackup: common_1.EddsaMPCv2SignedMessage,
|
|
109
|
+
}),
|
|
110
|
+
], "EddsaMPCv2KeyGenRound2Response");
|
|
88
111
|
exports.RedpallasMPCv2KeyGenRound1Request = t.type({
|
|
89
112
|
userGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
90
113
|
backupGpgPublicKey: io_ts_types_1.NonEmptyString,
|
|
@@ -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,wB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AAC,CAAC,IAAI,CAAC;IACvD,SAAS,EAAE,4BAAc;IACzB,oBAAoB,EAAE,4BAAc;IACpC,SAAS,EAAE,gCAAuB;CACnC,CAAC,CAAC"}
|
|
@@ -102,6 +102,8 @@ export declare const CantonAllocationAllocateIntent: t.IntersectionC<[t.Intersec
|
|
|
102
102
|
receiveAmount: t.StringC;
|
|
103
103
|
allocateBefore: t.StringC;
|
|
104
104
|
settleBefore: t.StringC;
|
|
105
|
+
legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
|
|
106
|
+
parentTradeId: t.StringC;
|
|
105
107
|
comment: t.StringC;
|
|
106
108
|
requestedAt: t.StringC;
|
|
107
109
|
}>]>;
|
|
@@ -47,6 +47,8 @@ exports.CantonAllocationAllocateIntent = t.intersection([
|
|
|
47
47
|
receiveAmount: t.string,
|
|
48
48
|
allocateBefore: t.string,
|
|
49
49
|
settleBefore: t.string,
|
|
50
|
+
legType: t.union([t.literal("trade"), t.literal("fee")]),
|
|
51
|
+
parentTradeId: t.string,
|
|
50
52
|
comment: t.string,
|
|
51
53
|
requestedAt: t.string,
|
|
52
54
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cantonAllocationAllocateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;
|
|
1
|
+
{"version":3,"file":"cantonAllocationAllocateIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationAllocateIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAe9B,QAAA,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,kBAAkB;QAC1C,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;KACtB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -96,12 +96,14 @@ export declare const CantonAllocationRequestIntent: t.IntersectionC<[t.Intersect
|
|
|
96
96
|
receiverPartyId: t.StringC;
|
|
97
97
|
amount: t.StringC;
|
|
98
98
|
token: t.StringC;
|
|
99
|
-
receiveToken: t.StringC;
|
|
100
|
-
receiveAmount: t.StringC;
|
|
101
99
|
allocateBefore: t.StringC;
|
|
102
100
|
settleBefore: t.StringC;
|
|
103
101
|
}>, t.PartialC<{
|
|
104
102
|
comment: t.StringC;
|
|
105
103
|
requestedAt: t.StringC;
|
|
104
|
+
receiveToken: t.StringC;
|
|
105
|
+
receiveAmount: t.StringC;
|
|
106
|
+
legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
|
|
107
|
+
parentTradeId: t.StringC;
|
|
106
108
|
}>]>;
|
|
107
109
|
export type CantonAllocationRequestIntent = t.TypeOf<typeof CantonAllocationRequestIntent>;
|
|
@@ -40,14 +40,16 @@ exports.CantonAllocationRequestIntent = t.intersection([
|
|
|
40
40
|
receiverPartyId: t.string,
|
|
41
41
|
amount: t.string,
|
|
42
42
|
token: t.string,
|
|
43
|
-
receiveToken: t.string,
|
|
44
|
-
receiveAmount: t.string,
|
|
45
43
|
allocateBefore: t.string,
|
|
46
44
|
settleBefore: t.string,
|
|
47
45
|
}),
|
|
48
46
|
t.partial({
|
|
49
47
|
comment: t.string,
|
|
50
48
|
requestedAt: t.string,
|
|
49
|
+
receiveToken: t.string,
|
|
50
|
+
receiveAmount: t.string,
|
|
51
|
+
legType: t.union([t.literal("trade"), t.literal("fee")]),
|
|
52
|
+
parentTradeId: t.string,
|
|
51
53
|
}),
|
|
52
54
|
]);
|
|
53
55
|
//# sourceMappingURL=cantonAllocationRequestIntent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cantonAllocationRequestIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationRequestIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;
|
|
1
|
+
{"version":3,"file":"cantonAllocationRequestIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/cantonAllocationRequestIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA0C;AAC1C,6CAA2C;AAsC9B,QAAA,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,uBAAU;IACV,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,iBAAiB;QACzC,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,eAAe,EAAE,CAAC,CAAC,MAAM;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,YAAY,EAAE,CAAC,CAAC,MAAM;KACvB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,WAAW,EAAE,CAAC,CAAC,MAAM;QACrB,YAAY,EAAE,CAAC,CAAC,MAAM;QACtB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -2029,6 +2029,8 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
|
2029
2029
|
receiveAmount: t.StringC;
|
|
2030
2030
|
allocateBefore: t.StringC;
|
|
2031
2031
|
settleBefore: t.StringC;
|
|
2032
|
+
legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
|
|
2033
|
+
parentTradeId: t.StringC;
|
|
2032
2034
|
comment: t.StringC;
|
|
2033
2035
|
requestedAt: t.StringC;
|
|
2034
2036
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
@@ -2324,13 +2326,15 @@ export declare const TransactionIntent: t.UnionC<[t.IntersectionC<[t.Intersectio
|
|
|
2324
2326
|
receiverPartyId: t.StringC;
|
|
2325
2327
|
amount: t.StringC;
|
|
2326
2328
|
token: t.StringC;
|
|
2327
|
-
receiveToken: t.StringC;
|
|
2328
|
-
receiveAmount: t.StringC;
|
|
2329
2329
|
allocateBefore: t.StringC;
|
|
2330
2330
|
settleBefore: t.StringC;
|
|
2331
2331
|
}>, t.PartialC<{
|
|
2332
2332
|
comment: t.StringC;
|
|
2333
2333
|
requestedAt: t.StringC;
|
|
2334
|
+
receiveToken: t.StringC;
|
|
2335
|
+
receiveAmount: t.StringC;
|
|
2336
|
+
legType: t.UnionC<[t.LiteralC<"trade">, t.LiteralC<"fee">]>;
|
|
2337
|
+
parentTradeId: t.StringC;
|
|
2334
2338
|
}>]>, t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
|
2335
2339
|
intentType: t.KeyofC<{
|
|
2336
2340
|
payment: t.LiteralC<"payment">;
|
package/package.json
CHANGED
|
@@ -75,39 +75,86 @@ export type MPCv2KeyGenRound3Response = t.TypeOf<
|
|
|
75
75
|
>;
|
|
76
76
|
|
|
77
77
|
// EdDSA MPCv2 (2-round) keygen codecs
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
//
|
|
79
|
+
// Safe roots also run a VRF DKG over these same two rounds. Every VRF field is optional and additive:
|
|
80
|
+
// ordinary keygen omits them and is unchanged. The HSM keys VRF mode off the presence of the VRF
|
|
81
|
+
// messages, and requires them all-or-none per round (R1: userVrfMsg1 + backupVrfMsg1; R2: userVrfMsg2 +
|
|
82
|
+
// backupVrfMsg2), so the HSM, not these codecs, enforces the grouping. The HSM's opaque VRF state is not
|
|
83
|
+
// part of these client contracts: the server keeps it between rounds, like the signing-DKG state.
|
|
84
|
+
// Client messages are signed by the sending party's GPG key, like userMsg1/userMsg2.
|
|
85
|
+
|
|
86
|
+
export const EddsaMPCv2KeyGenRound1Request = t.intersection(
|
|
87
|
+
[
|
|
88
|
+
t.type({
|
|
89
|
+
userGpgPublicKey: NonEmptyString,
|
|
90
|
+
backupGpgPublicKey: NonEmptyString,
|
|
91
|
+
userMsg1: EddsaMPCv2SignedMessage,
|
|
92
|
+
backupMsg1: EddsaMPCv2SignedMessage,
|
|
93
|
+
}),
|
|
94
|
+
t.partial({
|
|
95
|
+
userVrfMsg1: EddsaMPCv2SignedMessage,
|
|
96
|
+
backupVrfMsg1: EddsaMPCv2SignedMessage,
|
|
97
|
+
}),
|
|
98
|
+
],
|
|
99
|
+
"EddsaMPCv2KeyGenRound1Request",
|
|
100
|
+
);
|
|
85
101
|
export type EddsaMPCv2KeyGenRound1Request = t.TypeOf<
|
|
86
102
|
typeof EddsaMPCv2KeyGenRound1Request
|
|
87
103
|
>;
|
|
88
104
|
|
|
89
|
-
export const EddsaMPCv2KeyGenRound1Response = t.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
export const EddsaMPCv2KeyGenRound1Response = t.intersection(
|
|
106
|
+
[
|
|
107
|
+
t.type({
|
|
108
|
+
sessionId: NonEmptyString,
|
|
109
|
+
bitgoMsg1: EddsaMPCv2SignedMessage,
|
|
110
|
+
}),
|
|
111
|
+
t.partial({
|
|
112
|
+
bitgoVrfMsg1: EddsaMPCv2SignedMessage,
|
|
113
|
+
}),
|
|
114
|
+
],
|
|
115
|
+
"EddsaMPCv2KeyGenRound1Response",
|
|
116
|
+
);
|
|
93
117
|
export type EddsaMPCv2KeyGenRound1Response = t.TypeOf<
|
|
94
118
|
typeof EddsaMPCv2KeyGenRound1Response
|
|
95
119
|
>;
|
|
96
120
|
|
|
97
|
-
export const EddsaMPCv2KeyGenRound2Request = t.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
export const EddsaMPCv2KeyGenRound2Request = t.intersection(
|
|
122
|
+
[
|
|
123
|
+
t.type({
|
|
124
|
+
sessionId: NonEmptyString,
|
|
125
|
+
userMsg2: EddsaMPCv2SignedMessage,
|
|
126
|
+
backupMsg2: EddsaMPCv2SignedMessage,
|
|
127
|
+
}),
|
|
128
|
+
t.partial({
|
|
129
|
+
userVrfMsg2: EddsaMPCv2SignedMessage,
|
|
130
|
+
backupVrfMsg2: EddsaMPCv2SignedMessage,
|
|
131
|
+
}),
|
|
132
|
+
],
|
|
133
|
+
"EddsaMPCv2KeyGenRound2Request",
|
|
134
|
+
);
|
|
102
135
|
export type EddsaMPCv2KeyGenRound2Request = t.TypeOf<
|
|
103
136
|
typeof EddsaMPCv2KeyGenRound2Request
|
|
104
137
|
>;
|
|
105
138
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
139
|
+
/**
|
|
140
|
+
* `bitgoVrfMsgToUser` / `bitgoVrfMsgToBackup` are BitGo's VRF openings, each PGP-encrypted to the
|
|
141
|
+
* recipient party's GPG key (`message` is the armored ciphertext) with BitGo's signature over the
|
|
142
|
+
* plaintext. Intermediaries must relay them unread.
|
|
143
|
+
*/
|
|
144
|
+
export const EddsaMPCv2KeyGenRound2Response = t.intersection(
|
|
145
|
+
[
|
|
146
|
+
t.type({
|
|
147
|
+
sessionId: NonEmptyString,
|
|
148
|
+
commonPublicKeychain: NonEmptyString,
|
|
149
|
+
bitgoMsg2: EddsaMPCv2SignedMessage,
|
|
150
|
+
}),
|
|
151
|
+
t.partial({
|
|
152
|
+
bitgoVrfMsgToUser: EddsaMPCv2SignedMessage,
|
|
153
|
+
bitgoVrfMsgToBackup: EddsaMPCv2SignedMessage,
|
|
154
|
+
}),
|
|
155
|
+
],
|
|
156
|
+
"EddsaMPCv2KeyGenRound2Response",
|
|
157
|
+
);
|
|
111
158
|
export type EddsaMPCv2KeyGenRound2Response = t.TypeOf<
|
|
112
159
|
typeof EddsaMPCv2KeyGenRound2Response
|
|
113
160
|
>;
|
|
@@ -12,6 +12,8 @@ import { intentTypes } from "./intentType";
|
|
|
12
12
|
*
|
|
13
13
|
* @param {String} intentType - The type of intent (always set to allocationAllocate)
|
|
14
14
|
* @param {String} txRequestId - The allocationRequest txRequestId to allocate against
|
|
15
|
+
* @param {String} [legType] - The leg category: "trade" for a DvP delivery leg, "fee" for a payment-only operator-fee leg; mirrors the parent allocationRequest intent
|
|
16
|
+
* @param {String} [parentTradeId] - For fee legs, the trade identifier of the parent trade this fee belongs to
|
|
15
17
|
*/
|
|
16
18
|
export const CantonAllocationAllocateIntent = t.intersection([
|
|
17
19
|
BaseIntent,
|
|
@@ -33,6 +35,8 @@ export const CantonAllocationAllocateIntent = t.intersection([
|
|
|
33
35
|
receiveAmount: t.string,
|
|
34
36
|
allocateBefore: t.string,
|
|
35
37
|
settleBefore: t.string,
|
|
38
|
+
legType: t.union([t.literal("trade"), t.literal("fee")]),
|
|
39
|
+
parentTradeId: t.string,
|
|
36
40
|
comment: t.string,
|
|
37
41
|
requestedAt: t.string,
|
|
38
42
|
}),
|
|
@@ -10,9 +10,14 @@ import { intentTypes } from "./intentType";
|
|
|
10
10
|
* (Delivery vs Payment) trade. The operator emits an AllocationRequest instructing both
|
|
11
11
|
* parties to lock their respective assets before atomic settlement can proceed.
|
|
12
12
|
*
|
|
13
|
-
* Each intent covers one party's allocation leg.
|
|
14
|
-
* show what the allocating party will receive upon
|
|
15
|
-
* visibility into the trade terms before acting.
|
|
13
|
+
* Each intent covers one party's allocation leg. For a trade leg (`legType` "trade"), the
|
|
14
|
+
* `receiveToken` / `receiveAmount` fields show what the allocating party will receive upon
|
|
15
|
+
* successful settlement, giving the user full visibility into the trade terms before acting.
|
|
16
|
+
*
|
|
17
|
+
* A fee leg (`legType` "fee") is payment-only: the fee payer sends the operator fee and
|
|
18
|
+
* receives nothing, so the receive fields are absent. `parentTradeId` carries the trade
|
|
19
|
+
* identifier of the parent trade the fee belongs to (the fee trade's own `tradeId` is
|
|
20
|
+
* suffixed, e.g. "TC-1234:fee").
|
|
16
21
|
*
|
|
17
22
|
* @param {String} intentType - The type of intent (always set to allocationRequest)
|
|
18
23
|
* @param {String} updateId - The transaction update id of the AllocationRequest event
|
|
@@ -24,8 +29,10 @@ import { intentTypes } from "./intentType";
|
|
|
24
29
|
* @param {String} receiverPartyId - The counterparty receiving the allocated asset
|
|
25
30
|
* @param {String} amount - Quantity to allocate (decimal string, e.g. "70.0000000000")
|
|
26
31
|
* @param {String} token - BitGo token identifier for the asset being allocated
|
|
27
|
-
* @param {String} receiveToken
|
|
28
|
-
* @param {String} receiveAmount
|
|
32
|
+
* @param {String} [receiveToken] - BitGo token identifier the allocating party will receive on settlement; required for trade legs, absent for fee legs
|
|
33
|
+
* @param {String} [receiveAmount] - Quantity the allocating party will receive on settlement; required for trade legs, absent for fee legs
|
|
34
|
+
* @param {String} [legType] - The leg category: "trade" for a DvP delivery leg, "fee" for a payment-only operator-fee leg; absent for legacy trade intents
|
|
35
|
+
* @param {String} [parentTradeId] - For fee legs, the trade identifier of the parent trade this fee belongs to
|
|
29
36
|
* @param {String} allocateBefore - ISO 8601 deadline by which allocation must be submitted
|
|
30
37
|
* @param {String} settleBefore - ISO 8601 deadline by which settlement must complete
|
|
31
38
|
* @param {String} [comment] - Optional free-form note
|
|
@@ -44,14 +51,16 @@ export const CantonAllocationRequestIntent = t.intersection([
|
|
|
44
51
|
receiverPartyId: t.string,
|
|
45
52
|
amount: t.string,
|
|
46
53
|
token: t.string,
|
|
47
|
-
receiveToken: t.string,
|
|
48
|
-
receiveAmount: t.string,
|
|
49
54
|
allocateBefore: t.string,
|
|
50
55
|
settleBefore: t.string,
|
|
51
56
|
}),
|
|
52
57
|
t.partial({
|
|
53
58
|
comment: t.string,
|
|
54
59
|
requestedAt: t.string,
|
|
60
|
+
receiveToken: t.string,
|
|
61
|
+
receiveAmount: t.string,
|
|
62
|
+
legType: t.union([t.literal("trade"), t.literal("fee")]),
|
|
63
|
+
parentTradeId: t.string,
|
|
55
64
|
}),
|
|
56
65
|
]);
|
|
57
66
|
|