@bitgo/public-types 2.30.1 → 2.31.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/tss/tssSettings.d.ts +6 -0
- package/dist/src/schema/tss/tssSettings.js +2 -0
- package/dist/src/schema/tss/tssSettings.js.map +1 -1
- package/dist/src/schema/webhook/addWalletWebhookRequest.js.map +1 -1
- package/dist/src/schema/webhook/webhook.js.map +1 -1
- package/dist/src/schema/webhook/webhookState.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/tss/tssSettings.ts +2 -0
- package/src/schema/webhook/addWalletWebhookRequest.ts +17 -0
- package/src/schema/webhook/webhook.ts +2 -0
- package/src/schema/webhook/webhookState.ts +5 -0
@@ -1,11 +1,15 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
2
|
export declare const TssWalletCreationSettings: t.PartialC<{
|
3
3
|
multiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
4
|
+
custodialMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
5
|
+
coldMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
4
6
|
}>;
|
5
7
|
export type TssWalletCreationSettings = t.TypeOf<typeof TssWalletCreationSettings>;
|
6
8
|
export declare const TssCoinSetting: t.IntersectionC<[t.TypeC<{
|
7
9
|
walletCreationSettings: t.PartialC<{
|
8
10
|
multiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
11
|
+
custodialMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
12
|
+
coldMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
9
13
|
}>;
|
10
14
|
}>, t.PartialC<{
|
11
15
|
canMigrateToMPCv2: t.BooleanC;
|
@@ -15,6 +19,8 @@ export declare const TssSettings: t.TypeC<{
|
|
15
19
|
coinSettings: t.RecordC<t.StringC, t.IntersectionC<[t.TypeC<{
|
16
20
|
walletCreationSettings: t.PartialC<{
|
17
21
|
multiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
22
|
+
custodialMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
23
|
+
coldMultiSigTypeVersion: t.KeyofC<typeof import("../wallet").MultisigTypeVersionEnum>;
|
18
24
|
}>;
|
19
25
|
}>, t.PartialC<{
|
20
26
|
canMigrateToMPCv2: t.BooleanC;
|
@@ -28,6 +28,8 @@ const t = __importStar(require("io-ts"));
|
|
28
28
|
const wallet_1 = require("../wallet");
|
29
29
|
exports.TssWalletCreationSettings = t.partial({
|
30
30
|
multiSigTypeVersion: wallet_1.MultisigTypeVersion,
|
31
|
+
custodialMultiSigTypeVersion: wallet_1.MultisigTypeVersion,
|
32
|
+
coldMultiSigTypeVersion: wallet_1.MultisigTypeVersion,
|
31
33
|
});
|
32
34
|
exports.TssCoinSetting = t.intersection([
|
33
35
|
t.type({ walletCreationSettings: exports.TssWalletCreationSettings }),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tssSettings.js","sourceRoot":"","sources":["../../../../src/schema/tss/tssSettings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,sCAAgD;AAEnC,QAAA,yBAAyB,GAAG,CAAC,CAAC,OAAO,CAAC;IACjD,mBAAmB,EAAE,4BAAmB;
|
1
|
+
{"version":3,"file":"tssSettings.js","sourceRoot":"","sources":["../../../../src/schema/tss/tssSettings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,sCAAgD;AAEnC,QAAA,yBAAyB,GAAG,CAAC,CAAC,OAAO,CAAC;IACjD,mBAAmB,EAAE,4BAAmB;IACxC,4BAA4B,EAAE,4BAAmB;IACjD,uBAAuB,EAAE,4BAAmB;CAC7C,CAAC,CAAC;AAMU,QAAA,cAAc,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3C,CAAC,CAAC,IAAI,CAAC,EAAE,sBAAsB,EAAE,iCAAyB,EAAE,CAAC;IAC7D,CAAC,CAAC,OAAO,CAAC;QACR,iBAAiB,EAAE,CAAC,CAAC,OAAO;KAC7B,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,sBAAc,CAAC;CACjD,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"addWalletWebhookRequest.js","sourceRoot":"","sources":["../../../../src/schema/webhook/addWalletWebhookRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA+D;AAC/D,mDAAgD;AAChD,2FAAwF;AACxF,6EAA0E;AAC1E,+CAAkD;AAErC,QAAA,2BAA2B,GAAG;IACzC,IAAI,EAAE,+BAAiB;
|
1
|
+
{"version":3,"file":"addWalletWebhookRequest.js","sourceRoot":"","sources":["../../../../src/schema/webhook/addWalletWebhookRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA+D;AAC/D,mDAAgD;AAChD,2FAAwF;AACxF,6EAA0E;AAC1E,+CAAkD;AAErC,QAAA,2BAA2B,GAAG;IACzC,IAAI,EAAE,+BAAiB;IAMvB,GAAG,EAAE,4BAAc;IAEnB,KAAK,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,MAAM,CAAC;IAOzB,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,8BAAgB,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IAKpE,QAAQ,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;IAE7B,qBAAqB,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;IAC1C,eAAe,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,iDAAuB,CAAC,CAAC;IAC3D,0BAA0B,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,mCAAgB,CAAC,CAAC;CAChE,CAAC;AACW,QAAA,4BAA4B,GAAG,CAAC,CAAC,IAAI,CAAC;IACjD,GAAG,mCAA2B;CAC/B,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAAgD;AAChD,2FAAwF;AACxF,6EAA0E;AAC1E,iDAA8C;AAC9C,+CAA4C;AAC5C,iDAA8C;AAEjC,QAAA,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC;IACpC,CAAC,CAAC,IAAI,CAAC;QAKL,EAAE,EAAE,CAAC,CAAC,MAAM;QAKZ,OAAO,EAAE,+BAAiB;QAK1B,IAAI,EAAE,CAAC,CAAC,MAAM;QAKd,GAAG,EAAE,CAAC,CAAC,MAAM;QAKb,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,KAAK,EAAE,2BAAY;QACnB,KAAK,EAAE,2BAAY;QAInB,wBAAwB,EAAE,CAAC,CAAC,MAAM;
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAAgD;AAChD,2FAAwF;AACxF,6EAA0E;AAC1E,iDAA8C;AAC9C,+CAA4C;AAC5C,iDAA8C;AAEjC,QAAA,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC;IACpC,CAAC,CAAC,IAAI,CAAC;QAKL,EAAE,EAAE,CAAC,CAAC,MAAM;QAKZ,OAAO,EAAE,+BAAiB;QAK1B,IAAI,EAAE,CAAC,CAAC,MAAM;QAKd,GAAG,EAAE,CAAC,CAAC,MAAM;QAKb,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,KAAK,EAAE,2BAAY;QACnB,KAAK,EAAE,2BAAY;QAInB,wBAAwB,EAAE,CAAC,CAAC,MAAM;QAElC,qBAAqB,EAAE,CAAC,CAAC,OAAO;KACjC,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QAER,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM;QAClB,YAAY,EAAE,CAAC,CAAC,MAAM;QAKtB,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,MAAM,EAAE,CAAC,CAAC,MAAM;QAIhB,IAAI,EAAE,yBAAW;QAIjB,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAK1B,WAAW,EAAE,+BAAiB;QAK9B,YAAY,EAAE,+BAAiB;QAC/B,QAAQ,EAAE,CAAC,CAAC,OAAO;QAInB,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,iDAAuB,CAAC;QAIjD,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,mCAAgB,CAAC;KACtD,CAAC;CACH,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"webhookState.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAmB,CAAA;IACnB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;
|
1
|
+
{"version":3,"file":"webhookState.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAmB,CAAA;IACnB,2CAAyB,CAAA;AAC3B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAOY,QAAA,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -3,6 +3,8 @@ import { MultisigTypeVersion } from "../wallet";
|
|
3
3
|
|
4
4
|
export const TssWalletCreationSettings = t.partial({
|
5
5
|
multiSigTypeVersion: MultisigTypeVersion,
|
6
|
+
custodialMultiSigTypeVersion: MultisigTypeVersion,
|
7
|
+
coldMultiSigTypeVersion: MultisigTypeVersion,
|
6
8
|
});
|
7
9
|
|
8
10
|
export type TssWalletCreationSettings = t.TypeOf<
|
@@ -7,10 +7,27 @@ import { WalletWebhookType } from "./webhookType";
|
|
7
7
|
|
8
8
|
export const AddWalletWebhookRequestBody = {
|
9
9
|
type: WalletWebhookType,
|
10
|
+
/**
|
11
|
+
* URL to fire the webhook to.
|
12
|
+
* @example "https://your.server.com/webhook"
|
13
|
+
* @format uri
|
14
|
+
*/
|
10
15
|
url: NonEmptyString,
|
16
|
+
/** Label of the new webhook. */
|
11
17
|
label: Optional(t.string),
|
18
|
+
/**
|
19
|
+
* Number of confirmations before triggering the webhook. If 0 or unspecified,
|
20
|
+
* requests will be sent to the callback endpoint when the transfer is first
|
21
|
+
* seen and when it is confirmed.
|
22
|
+
* @example 6
|
23
|
+
*/
|
12
24
|
numConfirmations: t.union([t.number, NumberFromString, t.undefined]),
|
25
|
+
/**
|
26
|
+
* Triggers on coin transfers and token transfers for ETH and Stellar.
|
27
|
+
* @default false
|
28
|
+
*/
|
13
29
|
allToken: Optional(t.boolean),
|
30
|
+
/** Whether or not to listen to failed transactions on chain. */
|
14
31
|
listenToFailureStates: Optional(t.boolean),
|
15
32
|
txRequestStates: Optional(t.array(TransactionRequestState)),
|
16
33
|
txRequestTransactionStates: Optional(t.array(TransactionState)),
|
@@ -39,9 +39,11 @@ export const Webhook = t.intersection([
|
|
39
39
|
* @example 0
|
40
40
|
*/
|
41
41
|
successiveFailedAttempts: t.number,
|
42
|
+
/** Whether or not to listen to failed transactions on chain. */
|
42
43
|
listenToFailureStates: t.boolean,
|
43
44
|
}),
|
44
45
|
t.partial({
|
46
|
+
/** Label of the new webhook. */
|
45
47
|
label: t.string,
|
46
48
|
walletId: t.string,
|
47
49
|
enterpriseId: t.string,
|
@@ -5,5 +5,10 @@ export enum WebhookStateEnum {
|
|
5
5
|
"suspended" = "suspended",
|
6
6
|
}
|
7
7
|
|
8
|
+
/**
|
9
|
+
* If 'active', indicates the webhook can trigger and send to the URL.
|
10
|
+
* If 'suspended', indicates the webhook can't trigger.
|
11
|
+
* @example active
|
12
|
+
*/
|
8
13
|
export const WebhookState = t.keyof(WebhookStateEnum, "WebhookState");
|
9
14
|
export type WebhookState = t.TypeOf<typeof WebhookState>;
|