@bitgo/public-types 6.70.0 → 6.71.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/derive/deriveRound.d.ts +70 -0
- package/dist/src/schema/mpcv2/derive/deriveRound.js +60 -0
- package/dist/src/schema/mpcv2/derive/deriveRound.js.map +1 -0
- package/dist/src/schema/mpcv2/derive/index.d.ts +1 -0
- package/dist/src/schema/mpcv2/derive/index.js +18 -0
- package/dist/src/schema/mpcv2/derive/index.js.map +1 -0
- package/dist/src/schema/mpcv2/index.d.ts +1 -0
- package/dist/src/schema/mpcv2/index.js +1 -0
- package/dist/src/schema/mpcv2/index.js.map +1 -1
- package/dist/src/schema/transactions/coinSpecific.d.ts +3 -1
- package/dist/src/schema/transactions/coinSpecific.js +6 -2
- package/dist/src/schema/transactions/coinSpecific.js.map +1 -1
- package/dist/src/schema/transactions/index.d.ts +1 -0
- package/dist/src/schema/transactions/index.js +1 -0
- package/dist/src/schema/transactions/index.js.map +1 -1
- package/dist/src/schema/transactions/sendTransactions.d.ts +1 -1
- package/package.json +1 -1
- package/src/schema/mpcv2/derive/deriveRound.ts +66 -0
- package/src/schema/mpcv2/derive/index.ts +1 -0
- package/src/schema/mpcv2/index.ts +1 -0
- package/src/schema/transactions/coinSpecific.ts +13 -1
- package/src/schema/transactions/index.ts +1 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const MPCv2DeriveRound1Request: t.IntersectionC<[t.TypeC<{
|
|
3
|
+
userGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
4
|
+
backupGpgPublicKey: import("io-ts-types").NonEmptyStringC;
|
|
5
|
+
userMsg1: t.TypeC<{
|
|
6
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
7
|
+
message: t.StringC;
|
|
8
|
+
signature: t.StringC;
|
|
9
|
+
}>;
|
|
10
|
+
backupMsg1: t.TypeC<{
|
|
11
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
12
|
+
message: t.StringC;
|
|
13
|
+
signature: t.StringC;
|
|
14
|
+
}>;
|
|
15
|
+
}>, t.TypeC<{
|
|
16
|
+
parentKeyId: import("io-ts-types").NonEmptyStringC;
|
|
17
|
+
derivationIndex: t.NumberC;
|
|
18
|
+
}>]>;
|
|
19
|
+
export type MPCv2DeriveRound1Request = t.TypeOf<typeof MPCv2DeriveRound1Request>;
|
|
20
|
+
export declare const MPCv2DeriveRound1Response: t.TypeC<{
|
|
21
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
22
|
+
bitgoUserMsg1: t.TypeC<{
|
|
23
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
24
|
+
message: t.StringC;
|
|
25
|
+
signature: t.StringC;
|
|
26
|
+
}>;
|
|
27
|
+
bitgoBackupMsg1: t.TypeC<{
|
|
28
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
29
|
+
message: t.StringC;
|
|
30
|
+
signature: t.StringC;
|
|
31
|
+
}>;
|
|
32
|
+
}>;
|
|
33
|
+
export type MPCv2DeriveRound1Response = t.TypeOf<typeof MPCv2DeriveRound1Response>;
|
|
34
|
+
export declare const MPCv2DeriveRound2Request: t.TypeC<{
|
|
35
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
36
|
+
userMsg2: t.TypeC<{
|
|
37
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
38
|
+
message: t.StringC;
|
|
39
|
+
signature: t.StringC;
|
|
40
|
+
}>;
|
|
41
|
+
backupMsg2: t.TypeC<{
|
|
42
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
43
|
+
message: t.StringC;
|
|
44
|
+
signature: t.StringC;
|
|
45
|
+
}>;
|
|
46
|
+
}>;
|
|
47
|
+
export type MPCv2DeriveRound2Request = t.TypeOf<typeof MPCv2DeriveRound2Request>;
|
|
48
|
+
export declare const MPCv2DeriveRound2Response: t.TypeC<{
|
|
49
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
50
|
+
bitgoUserMsg2: t.TypeC<{
|
|
51
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
52
|
+
message: t.StringC;
|
|
53
|
+
signature: t.StringC;
|
|
54
|
+
}>;
|
|
55
|
+
bitgoBackupMsg2: t.TypeC<{
|
|
56
|
+
from: t.UnionC<[t.UnionC<[t.LiteralC<0>, t.LiteralC<1>, t.LiteralC<2>]>, t.Type<0 | 2 | 1, string, unknown>]>;
|
|
57
|
+
message: t.StringC;
|
|
58
|
+
signature: t.StringC;
|
|
59
|
+
}>;
|
|
60
|
+
}>;
|
|
61
|
+
export type MPCv2DeriveRound2Response = t.TypeOf<typeof MPCv2DeriveRound2Response>;
|
|
62
|
+
export declare const MPCv2DeriveRound3Request: t.TypeC<{
|
|
63
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
64
|
+
}>;
|
|
65
|
+
export type MPCv2DeriveRound3Request = t.TypeOf<typeof MPCv2DeriveRound3Request>;
|
|
66
|
+
export declare const MPCv2DeriveRound3Response: t.TypeC<{
|
|
67
|
+
sessionId: import("io-ts-types").NonEmptyStringC;
|
|
68
|
+
commonKeychain: import("io-ts-types").NonEmptyStringC;
|
|
69
|
+
}>;
|
|
70
|
+
export type MPCv2DeriveRound3Response = t.TypeOf<typeof MPCv2DeriveRound3Response>;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.MPCv2DeriveRound3Response = exports.MPCv2DeriveRound3Request = exports.MPCv2DeriveRound2Response = exports.MPCv2DeriveRound2Request = exports.MPCv2DeriveRound1Response = exports.MPCv2DeriveRound1Request = 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 keygenRound_1 = require("../keyGen/keygenRound");
|
|
31
|
+
exports.MPCv2DeriveRound1Request = t.intersection([
|
|
32
|
+
keygenRound_1.MPCv2KeyGenRound1Request,
|
|
33
|
+
t.type({
|
|
34
|
+
parentKeyId: io_ts_types_1.NonEmptyString,
|
|
35
|
+
derivationIndex: t.number,
|
|
36
|
+
}),
|
|
37
|
+
], "MPCv2DeriveRound1Request");
|
|
38
|
+
exports.MPCv2DeriveRound1Response = t.type({
|
|
39
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
40
|
+
bitgoUserMsg1: common_1.MPCv2BroadcastMessage,
|
|
41
|
+
bitgoBackupMsg1: common_1.MPCv2BroadcastMessage,
|
|
42
|
+
});
|
|
43
|
+
exports.MPCv2DeriveRound2Request = t.type({
|
|
44
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
45
|
+
userMsg2: common_1.MPCv2BroadcastMessage,
|
|
46
|
+
backupMsg2: common_1.MPCv2BroadcastMessage,
|
|
47
|
+
});
|
|
48
|
+
exports.MPCv2DeriveRound2Response = t.type({
|
|
49
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
50
|
+
bitgoUserMsg2: common_1.MPCv2BroadcastMessage,
|
|
51
|
+
bitgoBackupMsg2: common_1.MPCv2BroadcastMessage,
|
|
52
|
+
});
|
|
53
|
+
exports.MPCv2DeriveRound3Request = t.type({
|
|
54
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
55
|
+
});
|
|
56
|
+
exports.MPCv2DeriveRound3Response = t.type({
|
|
57
|
+
sessionId: io_ts_types_1.NonEmptyString,
|
|
58
|
+
commonKeychain: io_ts_types_1.NonEmptyString,
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=deriveRound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deriveRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/derive/deriveRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA6C;AAC7C,sCAAkD;AAClD,uDAAiE;AAEpD,QAAA,wBAAwB,GAAG,CAAC,CAAC,YAAY,CACpD;IACE,sCAAwB;IACxB,CAAC,CAAC,IAAI,CAAC;QACL,WAAW,EAAE,4BAAc;QAC3B,eAAe,EAAE,CAAC,CAAC,MAAM;KAC1B,CAAC;CACH,EACD,0BAA0B,CAC3B,CAAC;AAMW,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,4BAAc;IACzB,aAAa,EAAE,8BAAqB;IACpC,eAAe,EAAE,8BAAqB;CACvC,CAAC,CAAC;AAMU,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,SAAS,EAAE,4BAAc;IACzB,QAAQ,EAAE,8BAAqB;IAC/B,UAAU,EAAE,8BAAqB;CAClC,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,4BAAc;IACzB,aAAa,EAAE,8BAAqB;IACpC,eAAe,EAAE,8BAAqB;CACvC,CAAC,CAAC;AAMU,QAAA,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,SAAS,EAAE,4BAAc;CAC1B,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS,EAAE,4BAAc;IACzB,cAAc,EAAE,4BAAc;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./deriveRound";
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./deriveRound"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/derive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./common"), exports);
|
|
18
18
|
__exportStar(require("./keyGen"), exports);
|
|
19
|
+
__exportStar(require("./derive"), exports);
|
|
19
20
|
__exportStar(require("./signing"), exports);
|
|
20
21
|
__exportStar(require("./smc"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/mpcv2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,wCAAsB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/mpcv2/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,wCAAsB"}
|
|
@@ -12,6 +12,8 @@ export declare const SbtcWithdrawParams: t.PartialC<{
|
|
|
12
12
|
btcAddress: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
13
13
|
maxFee: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
|
14
14
|
}>;
|
|
15
|
+
export declare const unifiedAddressPreference: t.UnionC<[t.LiteralC<"shielded">, t.LiteralC<"transparent">]>;
|
|
16
|
+
export type unifiedAddressPreference = t.TypeOf<typeof unifiedAddressPreference>;
|
|
15
17
|
export declare const CoinSpecificBuildParams: {
|
|
16
18
|
utxo: {
|
|
17
19
|
locktime: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
|
|
@@ -32,7 +34,7 @@ export declare const CoinSpecificBuildParams: {
|
|
|
32
34
|
lockTime: number;
|
|
33
35
|
} | undefined;
|
|
34
36
|
}, unknown>, t.UndefinedC]>;
|
|
35
|
-
unifiedRecipientPreference: t.UnionC<[t.Type<
|
|
37
|
+
unifiedRecipientPreference: t.UnionC<[t.Type<"shielded" | "transparent", "shielded" | "transparent", unknown>, t.UndefinedC]>;
|
|
36
38
|
};
|
|
37
39
|
avaxp: {
|
|
38
40
|
locktime: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
|
|
@@ -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.CoinSpecificBuildParams = exports.SbtcWithdrawParams = exports.BridgingParams = void 0;
|
|
26
|
+
exports.CoinSpecificBuildParams = exports.unifiedAddressPreference = exports.SbtcWithdrawParams = exports.BridgingParams = void 0;
|
|
27
27
|
const t = __importStar(require("io-ts"));
|
|
28
28
|
const utils_1 = require("../../utils");
|
|
29
29
|
const BaseBuildParams = {
|
|
@@ -61,13 +61,17 @@ exports.SbtcWithdrawParams = t.partial({
|
|
|
61
61
|
btcAddress: utils_1.optionalString,
|
|
62
62
|
maxFee: utils_1.optionalString,
|
|
63
63
|
});
|
|
64
|
+
exports.unifiedAddressPreference = t.union([
|
|
65
|
+
t.literal("shielded"),
|
|
66
|
+
t.literal("transparent"),
|
|
67
|
+
]);
|
|
64
68
|
exports.CoinSpecificBuildParams = {
|
|
65
69
|
utxo: {
|
|
66
70
|
locktime: utils_1.optionalNumber,
|
|
67
71
|
limit: utils_1.optionalNumber,
|
|
68
72
|
bulk: utils_1.optionalBoolean,
|
|
69
73
|
bridgingParams: (0, utils_1.Optional)(exports.BridgingParams),
|
|
70
|
-
unifiedRecipientPreference: utils_1.
|
|
74
|
+
unifiedRecipientPreference: (0, utils_1.Optional)(exports.unifiedAddressPreference),
|
|
71
75
|
},
|
|
72
76
|
avaxp: {
|
|
73
77
|
locktime: utils_1.optionalNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coinSpecific.js","sourceRoot":"","sources":["../../../../src/schema/transactions/coinSpecific.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uCAQqB;AAErB,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,CAAC,CAAC,MAAM;IACd,KAAK,EAAE,sBAAc;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC;QACd,IAAI,EAAE,sBAAc;QACpB,KAAK,EAAE,sBAAc;KACtB,CAAC;IACF,OAAO,EAAE,sBAAc;IACvB,mBAAmB,EAAE,sBAAc;IACnC,kBAAkB,EAAE,sBAAc;IAClC,OAAO,EAAE,8BAAsB;IAC/B,UAAU,EAAE,sBAAc;IAC1B,iBAAiB,EAAE,uBAAe;IAClC,iBAAiB,EAAE,sBAAc;IACjC,UAAU,EAAE,sBAAc;CAC3B,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,GAAG,eAAe;IAClB,aAAa,EAAE,sBAAc;IAC7B,aAAa,EAAE,sBAAc;CAC9B,CAAC;AAEF,MAAM,kBAA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,sBAAc;QACrB,SAAS,EAAE,sBAAc;QACzB,cAAc,EAAE,sBAAc;QAC9B,KAAK,EAAE,uBAAe;QACtB,KAAK,EAAE,uBAAe;QACtB,KAAK,EAAE,uBAAe;QACtB,cAAc,EAAE,uBAAe;QAC/B,OAAO,EAAE,uBAAe;QACxB,cAAc,EAAE,uBAAe;KAChC;IACD,GAAG,EAAE;QACH,SAAS,EAAE,sBAAc;KAC1B;IACD,GAAG,EAAE;QACH,YAAY,EAAE,sBAAc;QAC5B,YAAY,EAAE,sBAAc;QAC5B,kBAAkB,EAAE,IAAA,gBAAQ,EAAC,0BAAkB,CAAC;KACjD;CACF,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./sendTransactions"), exports);
|
|
18
18
|
__exportStar(require("./tronTransaction"), exports);
|
|
19
|
+
__exportStar(require("./coinSpecific"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/transactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/transactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,oDAAkC;AAClC,iDAA+B"}
|
|
@@ -477,7 +477,7 @@ export declare const TxSendBody: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
|
477
477
|
lockTime: number;
|
|
478
478
|
} | undefined;
|
|
479
479
|
}, unknown>, t.UndefinedC]>;
|
|
480
|
-
unifiedRecipientPreference: t.UnionC<[t.Type<
|
|
480
|
+
unifiedRecipientPreference: t.UnionC<[t.Type<"shielded" | "transparent", "shielded" | "transparent", unknown>, t.UndefinedC]>;
|
|
481
481
|
}>, t.PartialC<{
|
|
482
482
|
locktime: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
|
|
483
483
|
sourceChain: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
|
package/package.json
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { NonEmptyString } from "io-ts-types";
|
|
3
|
+
import { MPCv2BroadcastMessage } from "../common";
|
|
4
|
+
import { MPCv2KeyGenRound1Request } from "../keyGen/keygenRound";
|
|
5
|
+
|
|
6
|
+
export const MPCv2DeriveRound1Request = t.intersection(
|
|
7
|
+
[
|
|
8
|
+
MPCv2KeyGenRound1Request,
|
|
9
|
+
t.type({
|
|
10
|
+
parentKeyId: NonEmptyString,
|
|
11
|
+
derivationIndex: t.number,
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
"MPCv2DeriveRound1Request",
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export type MPCv2DeriveRound1Request = t.TypeOf<
|
|
18
|
+
typeof MPCv2DeriveRound1Request
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export const MPCv2DeriveRound1Response = t.type({
|
|
22
|
+
sessionId: NonEmptyString,
|
|
23
|
+
bitgoUserMsg1: MPCv2BroadcastMessage,
|
|
24
|
+
bitgoBackupMsg1: MPCv2BroadcastMessage,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type MPCv2DeriveRound1Response = t.TypeOf<
|
|
28
|
+
typeof MPCv2DeriveRound1Response
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export const MPCv2DeriveRound2Request = t.type({
|
|
32
|
+
sessionId: NonEmptyString,
|
|
33
|
+
userMsg2: MPCv2BroadcastMessage,
|
|
34
|
+
backupMsg2: MPCv2BroadcastMessage,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export type MPCv2DeriveRound2Request = t.TypeOf<
|
|
38
|
+
typeof MPCv2DeriveRound2Request
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
export const MPCv2DeriveRound2Response = t.type({
|
|
42
|
+
sessionId: NonEmptyString,
|
|
43
|
+
bitgoUserMsg2: MPCv2BroadcastMessage,
|
|
44
|
+
bitgoBackupMsg2: MPCv2BroadcastMessage,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export type MPCv2DeriveRound2Response = t.TypeOf<
|
|
48
|
+
typeof MPCv2DeriveRound2Response
|
|
49
|
+
>;
|
|
50
|
+
|
|
51
|
+
export const MPCv2DeriveRound3Request = t.type({
|
|
52
|
+
sessionId: NonEmptyString,
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export type MPCv2DeriveRound3Request = t.TypeOf<
|
|
56
|
+
typeof MPCv2DeriveRound3Request
|
|
57
|
+
>;
|
|
58
|
+
|
|
59
|
+
export const MPCv2DeriveRound3Response = t.type({
|
|
60
|
+
sessionId: NonEmptyString,
|
|
61
|
+
commonKeychain: NonEmptyString,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export type MPCv2DeriveRound3Response = t.TypeOf<
|
|
65
|
+
typeof MPCv2DeriveRound3Response
|
|
66
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./deriveRound";
|
|
@@ -51,6 +51,18 @@ export const SbtcWithdrawParams = t.partial({
|
|
|
51
51
|
maxFee: optionalString,
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* How a Zcash unified address recipient should be resolved.
|
|
56
|
+
* `shielded` uses the shielded (Orchard) receiver, `transparent` uses the transparent receiver.
|
|
57
|
+
*/
|
|
58
|
+
export const unifiedAddressPreference = t.union([
|
|
59
|
+
t.literal("shielded"),
|
|
60
|
+
t.literal("transparent"),
|
|
61
|
+
]);
|
|
62
|
+
export type unifiedAddressPreference = t.TypeOf<
|
|
63
|
+
typeof unifiedAddressPreference
|
|
64
|
+
>;
|
|
65
|
+
|
|
54
66
|
// Coin Specific Build Params
|
|
55
67
|
export const CoinSpecificBuildParams = {
|
|
56
68
|
utxo: {
|
|
@@ -59,7 +71,7 @@ export const CoinSpecificBuildParams = {
|
|
|
59
71
|
limit: optionalNumber,
|
|
60
72
|
bulk: optionalBoolean,
|
|
61
73
|
bridgingParams: Optional(BridgingParams),
|
|
62
|
-
unifiedRecipientPreference:
|
|
74
|
+
unifiedRecipientPreference: Optional(unifiedAddressPreference),
|
|
63
75
|
},
|
|
64
76
|
avaxp: {
|
|
65
77
|
locktime: optionalNumber,
|