@bitgo/public-types 6.70.1 → 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.
@@ -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"}
@@ -1,4 +1,5 @@
1
1
  export * from "./common";
2
2
  export * from "./keyGen";
3
+ export * from "./derive";
3
4
  export * from "./signing";
4
5
  export * from "./smc";
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.70.1",
3
+ "version": "6.71.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -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";
@@ -1,4 +1,5 @@
1
1
  export * from "./common";
2
2
  export * from "./keyGen";
3
+ export * from "./derive";
3
4
  export * from "./signing";
4
5
  export * from "./smc";