@bitgo/public-types 6.79.0 → 6.80.1

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.
@@ -2,3 +2,4 @@ export * from "./mpcv2SigningState";
2
2
  export * from "./signingRound";
3
3
  export * from "./eddsaSigningRound";
4
4
  export * from "./redpallasSigningRound";
5
+ export * from "./redpallasRerandRound";
@@ -18,4 +18,5 @@ __exportStar(require("./mpcv2SigningState"), exports);
18
18
  __exportStar(require("./signingRound"), exports);
19
19
  __exportStar(require("./eddsaSigningRound"), exports);
20
20
  __exportStar(require("./redpallasSigningRound"), exports);
21
+ __exportStar(require("./redpallasRerandRound"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,iDAA+B;AAC/B,sDAAoC;AACpC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,iDAA+B;AAC/B,sDAAoC;AACpC,0DAAwC;AACxC,yDAAuC"}
@@ -0,0 +1,49 @@
1
+ import * as t from "io-ts";
2
+ export declare const RedpallasMPCv2RerandShareRound1Input: t.IntersectionC<[t.TypeC<{
3
+ type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">, t.LiteralC<"round3Output">]>;
4
+ }>, t.TypeC<{
5
+ type: t.LiteralC<"round1Input">;
6
+ data: t.TypeC<{
7
+ msg1: t.TypeC<{
8
+ message: t.StringC;
9
+ signature: t.StringC;
10
+ }>;
11
+ }>;
12
+ }>]>;
13
+ export type RedpallasMPCv2RerandShareRound1Input = t.TypeOf<typeof RedpallasMPCv2RerandShareRound1Input>;
14
+ export declare const RedpallasMPCv2RerandShareRound1Output: t.IntersectionC<[t.TypeC<{
15
+ type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">, t.LiteralC<"round3Output">]>;
16
+ }>, t.TypeC<{
17
+ type: t.LiteralC<"round1Output">;
18
+ data: t.TypeC<{
19
+ msg1: t.TypeC<{
20
+ message: t.StringC;
21
+ signature: t.StringC;
22
+ }>;
23
+ }>;
24
+ }>]>;
25
+ export type RedpallasMPCv2RerandShareRound1Output = t.TypeOf<typeof RedpallasMPCv2RerandShareRound1Output>;
26
+ export declare const RedpallasMPCv2RerandShareRound2Input: t.IntersectionC<[t.TypeC<{
27
+ type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">, t.LiteralC<"round3Output">]>;
28
+ }>, t.TypeC<{
29
+ type: t.LiteralC<"round2Input">;
30
+ data: t.TypeC<{
31
+ msg2: t.TypeC<{
32
+ message: t.StringC;
33
+ signature: t.StringC;
34
+ }>;
35
+ }>;
36
+ }>]>;
37
+ export type RedpallasMPCv2RerandShareRound2Input = t.TypeOf<typeof RedpallasMPCv2RerandShareRound2Input>;
38
+ export declare const RedpallasMPCv2RerandShareRound2Output: t.IntersectionC<[t.TypeC<{
39
+ type: t.UnionC<[t.LiteralC<"round1Input">, t.LiteralC<"round1Output">, t.LiteralC<"round2Input">, t.LiteralC<"round2Output">, t.LiteralC<"round3Input">, t.LiteralC<"round3Output">]>;
40
+ }>, t.TypeC<{
41
+ type: t.LiteralC<"round2Output">;
42
+ data: t.TypeC<{
43
+ msg2: t.TypeC<{
44
+ message: t.StringC;
45
+ signature: t.StringC;
46
+ }>;
47
+ }>;
48
+ }>]>;
49
+ export type RedpallasMPCv2RerandShareRound2Output = t.TypeOf<typeof RedpallasMPCv2RerandShareRound2Output>;
@@ -0,0 +1,66 @@
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.RedpallasMPCv2RerandShareRound2Output = exports.RedpallasMPCv2RerandShareRound2Input = exports.RedpallasMPCv2RerandShareRound1Output = exports.RedpallasMPCv2RerandShareRound1Input = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ const common_1 = require("../common");
29
+ const signingRound_1 = require("./signingRound");
30
+ exports.RedpallasMPCv2RerandShareRound1Input = t.intersection([
31
+ signingRound_1.MPCv2SignatureShareBase,
32
+ t.type({
33
+ type: t.literal("round1Input"),
34
+ data: t.type({
35
+ msg1: common_1.EddsaMPCv2SignedMessage,
36
+ }),
37
+ }, "RedpallasMPCv2RerandShareRound1Input"),
38
+ ]);
39
+ exports.RedpallasMPCv2RerandShareRound1Output = t.intersection([
40
+ signingRound_1.MPCv2SignatureShareBase,
41
+ t.type({
42
+ type: t.literal("round1Output"),
43
+ data: t.type({
44
+ msg1: common_1.EddsaMPCv2SignedMessage,
45
+ }),
46
+ }, "RedpallasMPCv2RerandShareRound1Output"),
47
+ ]);
48
+ exports.RedpallasMPCv2RerandShareRound2Input = t.intersection([
49
+ signingRound_1.MPCv2SignatureShareBase,
50
+ t.type({
51
+ type: t.literal("round2Input"),
52
+ data: t.type({
53
+ msg2: common_1.EddsaMPCv2SignedMessage,
54
+ }),
55
+ }, "RedpallasMPCv2RerandShareRound2Input"),
56
+ ]);
57
+ exports.RedpallasMPCv2RerandShareRound2Output = t.intersection([
58
+ signingRound_1.MPCv2SignatureShareBase,
59
+ t.type({
60
+ type: t.literal("round2Output"),
61
+ data: t.type({
62
+ msg2: common_1.EddsaMPCv2SignedMessage,
63
+ }),
64
+ }, "RedpallasMPCv2RerandShareRound2Output"),
65
+ ]);
66
+ //# sourceMappingURL=redpallasRerandRound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redpallasRerandRound.js","sourceRoot":"","sources":["../../../../../src/schema/mpcv2/signing/redpallasRerandRound.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,sCAAoD;AACpD,iDAAyD;AAgB5C,QAAA,oCAAoC,GAAG,CAAC,CAAC,YAAY,CAAC;IACjE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,sCAAsC,CACvC;CACF,CAAC,CAAC;AAWU,QAAA,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC;IAClE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC/B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,uCAAuC,CACxC;CACF,CAAC,CAAC;AAWU,QAAA,oCAAoC,GAAG,CAAC,CAAC,YAAY,CAAC;IACjE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;QAC9B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,sCAAsC,CACvC;CACF,CAAC,CAAC;AAWU,QAAA,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC;IAClE,sCAAuB;IACvB,CAAC,CAAC,IAAI,CACJ;QACE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC/B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,gCAAuB;SAC9B,CAAC;KACH,EACD,uCAAuC,CACxC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.79.0",
3
+ "version": "6.80.1",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -2,3 +2,4 @@ export * from "./mpcv2SigningState";
2
2
  export * from "./signingRound";
3
3
  export * from "./eddsaSigningRound";
4
4
  export * from "./redpallasSigningRound";
5
+ export * from "./redpallasRerandRound";
@@ -0,0 +1,100 @@
1
+ import * as t from "io-ts";
2
+ import { EddsaMPCv2SignedMessage } from "../common";
3
+ import { MPCv2SignatureShareBase } from "./signingRound";
4
+
5
+ /**
6
+ * RedPallas MPCv2 rerand — User to BitGo round 1
7
+ *
8
+ * Rerand exchanges signed messages over two wire rounds — the producer's
9
+ * `getFirstMessage()` yields the round 1 payload and
10
+ * `handleIncomingMessages` in `WaitMsg1` the round 2 payload, each
11
+ * carrying WASM-serialized bytes with a rerand prefix. Round 0 is
12
+ * computed locally and never crosses the wire; there is no round 3.
13
+ *
14
+ * Wire literals reuse the shared signing-round states and the envelope
15
+ * reuses `EddsaMPCv2SignedMessage` (shared with EdDSA despite the name),
16
+ * so disambiguation from DSG signing is by which codec is passed to
17
+ * `decodeWithCodec`, not by the payload.
18
+ */
19
+ export const RedpallasMPCv2RerandShareRound1Input = t.intersection([
20
+ MPCv2SignatureShareBase,
21
+ t.type(
22
+ {
23
+ type: t.literal("round1Input"),
24
+ data: t.type({
25
+ msg1: EddsaMPCv2SignedMessage,
26
+ }),
27
+ },
28
+ "RedpallasMPCv2RerandShareRound1Input",
29
+ ),
30
+ ]);
31
+
32
+ export type RedpallasMPCv2RerandShareRound1Input = t.TypeOf<
33
+ typeof RedpallasMPCv2RerandShareRound1Input
34
+ >;
35
+
36
+ /**
37
+ * RedPallas MPCv2 rerand — BitGo to User round 1
38
+ *
39
+ * BitGo returns its first rerand message.
40
+ */
41
+ export const RedpallasMPCv2RerandShareRound1Output = t.intersection([
42
+ MPCv2SignatureShareBase,
43
+ t.type(
44
+ {
45
+ type: t.literal("round1Output"),
46
+ data: t.type({
47
+ msg1: EddsaMPCv2SignedMessage,
48
+ }),
49
+ },
50
+ "RedpallasMPCv2RerandShareRound1Output",
51
+ ),
52
+ ]);
53
+
54
+ export type RedpallasMPCv2RerandShareRound1Output = t.TypeOf<
55
+ typeof RedpallasMPCv2RerandShareRound1Output
56
+ >;
57
+
58
+ /**
59
+ * RedPallas MPCv2 rerand — User to BitGo round 2
60
+ *
61
+ * User sends their second rerand message.
62
+ */
63
+ export const RedpallasMPCv2RerandShareRound2Input = t.intersection([
64
+ MPCv2SignatureShareBase,
65
+ t.type(
66
+ {
67
+ type: t.literal("round2Input"),
68
+ data: t.type({
69
+ msg2: EddsaMPCv2SignedMessage,
70
+ }),
71
+ },
72
+ "RedpallasMPCv2RerandShareRound2Input",
73
+ ),
74
+ ]);
75
+
76
+ export type RedpallasMPCv2RerandShareRound2Input = t.TypeOf<
77
+ typeof RedpallasMPCv2RerandShareRound2Input
78
+ >;
79
+
80
+ /**
81
+ * RedPallas MPCv2 rerand — BitGo to User round 2
82
+ *
83
+ * BitGo returns its second rerand message.
84
+ */
85
+ export const RedpallasMPCv2RerandShareRound2Output = t.intersection([
86
+ MPCv2SignatureShareBase,
87
+ t.type(
88
+ {
89
+ type: t.literal("round2Output"),
90
+ data: t.type({
91
+ msg2: EddsaMPCv2SignedMessage,
92
+ }),
93
+ },
94
+ "RedpallasMPCv2RerandShareRound2Output",
95
+ ),
96
+ ]);
97
+
98
+ export type RedpallasMPCv2RerandShareRound2Output = t.TypeOf<
99
+ typeof RedpallasMPCv2RerandShareRound2Output
100
+ >;