@bitgo/public-types 2.30.0 → 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.
@@ -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;CACzC,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
+ {"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,6 +1,20 @@
1
1
  import * as t from "io-ts";
2
2
  export declare const AddWalletWebhookRequestBody: {
3
- type: t.KeyofC<typeof import("./webhookType").WalletWebhookTypeEnum>;
3
+ type: t.KeyofC<{
4
+ txRequest: number;
5
+ txRequestTransaction: number;
6
+ transfer: number;
7
+ transaction: number;
8
+ transactionRemoved: number;
9
+ transactionExpire: number;
10
+ pendingapproval: number;
11
+ block: number;
12
+ admin: number;
13
+ address_confirmation: number;
14
+ lowFee: number;
15
+ circuitBreaker: number;
16
+ wireWithdrawal: number;
17
+ }>;
4
18
  url: import("io-ts-types").NonEmptyStringC;
5
19
  label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6
20
  numConfirmations: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC, t.UndefinedC]>;
@@ -10,7 +24,21 @@ export declare const AddWalletWebhookRequestBody: {
10
24
  txRequestTransactionStates: t.UnionC<[t.Type<("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], ("initialized" | "pendingSignature" | "eddsaPendingCommitment" | "eddsaPendingRShare" | "eddsaPendingGShare" | "ecdsaMPCv2Round1" | "ecdsaMPCv2Round2" | "ecdsaMPCv2Round3" | "readyToCombineShares" | "signed" | "held" | "delivered" | "invalidSignature" | "rejected")[], unknown>, t.UndefinedC]>;
11
25
  };
12
26
  export declare const AddWalletWebhookRequestBodyC: t.TypeC<{
13
- type: t.KeyofC<typeof import("./webhookType").WalletWebhookTypeEnum>;
27
+ type: t.KeyofC<{
28
+ txRequest: number;
29
+ txRequestTransaction: number;
30
+ transfer: number;
31
+ transaction: number;
32
+ transactionRemoved: number;
33
+ transactionExpire: number;
34
+ pendingapproval: number;
35
+ block: number;
36
+ admin: number;
37
+ address_confirmation: number;
38
+ lowFee: number;
39
+ circuitBreaker: number;
40
+ wireWithdrawal: number;
41
+ }>;
14
42
  url: import("io-ts-types").NonEmptyStringC;
15
43
  label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
16
44
  numConfirmations: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC, t.UndefinedC]>;
@@ -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;IACvB,GAAG,EAAE,4BAAc;IACnB,KAAK,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,MAAM,CAAC;IACzB,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,8BAAgB,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IACpE,QAAQ,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,OAAO,CAAC;IAC7B,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
+ {"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,11 +1,17 @@
1
1
  import * as t from "io-ts";
2
2
  export declare const AddEnterpriseWebhookRequestBody: {
3
- type: t.KeyofC<typeof import("./webhookType").EnterpriseWebhookTypeEnum>;
3
+ type: t.KeyofC<{
4
+ bankAccount: number;
5
+ accessToken: number;
6
+ }>;
4
7
  url: import("io-ts-types").NonEmptyStringC;
5
8
  label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
6
9
  };
7
10
  export declare const AddEnterpriseWebhookRequestBodyC: t.TypeC<{
8
- type: t.KeyofC<typeof import("./webhookType").EnterpriseWebhookTypeEnum>;
11
+ type: t.KeyofC<{
12
+ bankAccount: number;
13
+ accessToken: number;
14
+ }>;
9
15
  url: import("io-ts-types").NonEmptyStringC;
10
16
  label: t.UnionC<[t.Type<string, string, unknown>, t.UndefinedC]>;
11
17
  }>;
@@ -38,7 +44,27 @@ export declare const ListEnterpriseWebhooksResponse: t.IntersectionC<[t.TypeC<{
38
44
  enterpriseId: t.StringC;
39
45
  organizationId: t.StringC;
40
46
  userId: t.StringC;
41
- type: t.KeyofC<typeof import("./webhookType").WebhookTypeEnum>;
47
+ type: t.KeyofC<{
48
+ txRequest: number;
49
+ txRequestTransaction: number;
50
+ transfer: number;
51
+ transaction: number;
52
+ transactionRemoved: number;
53
+ transactionExpire: number;
54
+ pendingapproval: number;
55
+ block: number;
56
+ admin: number;
57
+ address_confirmation: number;
58
+ lowFee: number;
59
+ circuitBreaker: number;
60
+ wallet_confirmation: number;
61
+ wireWithdrawal: number;
62
+ bankAccount: number;
63
+ userKycState: number;
64
+ enterpriseKycState: number;
65
+ identityStatus: number;
66
+ accessToken: number;
67
+ }>;
42
68
  numConfirmations: t.NumberC;
43
69
  lastAttempt: import("io-ts-types").DateFromISOStringC;
44
70
  failingSince: import("io-ts-types").DateFromISOStringC;
@@ -15,7 +15,27 @@ export declare const Webhook: t.IntersectionC<[t.TypeC<{
15
15
  enterpriseId: t.StringC;
16
16
  organizationId: t.StringC;
17
17
  userId: t.StringC;
18
- type: t.KeyofC<typeof import("./webhookType").WebhookTypeEnum>;
18
+ type: t.KeyofC<{
19
+ txRequest: number;
20
+ txRequestTransaction: number;
21
+ transfer: number;
22
+ transaction: number;
23
+ transactionRemoved: number;
24
+ transactionExpire: number;
25
+ pendingapproval: number;
26
+ block: number;
27
+ admin: number;
28
+ address_confirmation: number;
29
+ lowFee: number;
30
+ circuitBreaker: number;
31
+ wallet_confirmation: number;
32
+ wireWithdrawal: number;
33
+ bankAccount: number;
34
+ userKycState: number;
35
+ enterpriseKycState: number;
36
+ identityStatus: number;
37
+ accessToken: number;
38
+ }>;
19
39
  numConfirmations: t.NumberC;
20
40
  lastAttempt: import("io-ts-types").DateFromISOStringC;
21
41
  failingSince: import("io-ts-types").DateFromISOStringC;
@@ -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;QAClC,qBAAqB,EAAE,CAAC,CAAC,OAAO;KACjC,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,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,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KAAK,CAAC,mCAAgB,CAAC;KACtD,CAAC;CACH,CAAC,CAAC"}
@@ -4,7 +4,27 @@ export type WebhookNotificationState = t.TypeOf<typeof WebhookNotificationState>
4
4
  export declare const WebhookNotification: t.IntersectionC<[t.TypeC<{
5
5
  id: t.StringC;
6
6
  }>, t.PartialC<{
7
- type: t.KeyofC<typeof import("./webhookType").WebhookTypeEnum>;
7
+ type: t.KeyofC<{
8
+ txRequest: number;
9
+ txRequestTransaction: number;
10
+ transfer: number;
11
+ transaction: number;
12
+ transactionRemoved: number;
13
+ transactionExpire: number;
14
+ pendingapproval: number;
15
+ block: number;
16
+ admin: number;
17
+ address_confirmation: number;
18
+ lowFee: number;
19
+ circuitBreaker: number;
20
+ wallet_confirmation: number;
21
+ wireWithdrawal: number;
22
+ bankAccount: number;
23
+ userKycState: number;
24
+ enterpriseKycState: number;
25
+ identityStatus: number;
26
+ accessToken: number;
27
+ }>;
8
28
  wallet: t.StringC;
9
29
  url: t.StringC;
10
30
  hash: t.StringC;
@@ -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;AAEY,QAAA,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC"}
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"}
@@ -1,47 +1,44 @@
1
1
  import * as t from "io-ts";
2
- export declare enum WebhookTypeEnum {
3
- "txRequest" = "txRequest",
4
- "txRequestTransaction" = "txRequestTransaction",
5
- "transfer" = "transfer",
6
- "transaction" = "transaction",
7
- "transactionRemoved" = "transactionRemoved",
8
- "transactionExpire" = "transactionExpire",
9
- "pendingapproval" = "pendingapproval",
10
- "block" = "block",
11
- "admin" = "admin",
12
- "address_confirmation" = "address_confirmation",
13
- "lowFee" = "lowFee",
14
- "circuitBreaker" = "circuitBreaker",
15
- "wallet_confirmation" = "wallet_confirmation",
16
- "wireWithdrawal" = "wireWithdrawal",
17
- "bankAccount" = "bankAccount",
18
- "userKycState" = "userKycState",
19
- "enterpriseKycState" = "enterpriseKycState",
20
- "identityStatus" = "identityStatus",
21
- "accessToken" = "accessToken"
22
- }
23
- export declare const WebhookType: t.KeyofC<typeof WebhookTypeEnum>;
2
+ export declare const WebhookType: t.KeyofC<{
3
+ txRequest: number;
4
+ txRequestTransaction: number;
5
+ transfer: number;
6
+ transaction: number;
7
+ transactionRemoved: number;
8
+ transactionExpire: number;
9
+ pendingapproval: number;
10
+ block: number;
11
+ admin: number;
12
+ address_confirmation: number;
13
+ lowFee: number;
14
+ circuitBreaker: number;
15
+ wallet_confirmation: number;
16
+ wireWithdrawal: number;
17
+ bankAccount: number;
18
+ userKycState: number;
19
+ enterpriseKycState: number;
20
+ identityStatus: number;
21
+ accessToken: number;
22
+ }>;
24
23
  export type WebhookType = t.TypeOf<typeof WebhookType>;
25
- export declare enum WalletWebhookTypeEnum {
26
- "txRequest" = "txRequest",
27
- "txRequestTransaction" = "txRequestTransaction",
28
- "transfer" = "transfer",
29
- "transaction" = "transaction",
30
- "transactionRemoved" = "transactionRemoved",
31
- "transactionExpire" = "transactionExpire",
32
- "pendingapproval" = "pendingapproval",
33
- "block" = "block",
34
- "admin" = "admin",
35
- "address_confirmation" = "address_confirmation",
36
- "lowFee" = "lowFee",
37
- "circuitBreaker" = "circuitBreaker",
38
- "wireWithdrawal" = "wireWithdrawal"
39
- }
40
- export declare const WalletWebhookType: t.KeyofC<typeof WalletWebhookTypeEnum>;
24
+ export declare const WalletWebhookType: t.KeyofC<{
25
+ txRequest: number;
26
+ txRequestTransaction: number;
27
+ transfer: number;
28
+ transaction: number;
29
+ transactionRemoved: number;
30
+ transactionExpire: number;
31
+ pendingapproval: number;
32
+ block: number;
33
+ admin: number;
34
+ address_confirmation: number;
35
+ lowFee: number;
36
+ circuitBreaker: number;
37
+ wireWithdrawal: number;
38
+ }>;
41
39
  export type WalletWebhookType = t.TypeOf<typeof WalletWebhookType>;
42
- export declare enum EnterpriseWebhookTypeEnum {
43
- "bankAccount" = "bankAccount",
44
- "accessToken" = "accessToken"
45
- }
46
- export declare const EnterpriseWebhookType: t.KeyofC<typeof EnterpriseWebhookTypeEnum>;
40
+ export declare const EnterpriseWebhookType: t.KeyofC<{
41
+ bankAccount: number;
42
+ accessToken: number;
43
+ }>;
47
44
  export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;
@@ -23,52 +23,46 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.EnterpriseWebhookType = exports.EnterpriseWebhookTypeEnum = exports.WalletWebhookType = exports.WalletWebhookTypeEnum = exports.WebhookType = exports.WebhookTypeEnum = void 0;
26
+ exports.EnterpriseWebhookType = exports.WalletWebhookType = exports.WebhookType = void 0;
27
27
  const t = __importStar(require("io-ts"));
28
- var WebhookTypeEnum;
29
- (function (WebhookTypeEnum) {
30
- WebhookTypeEnum["txRequest"] = "txRequest";
31
- WebhookTypeEnum["txRequestTransaction"] = "txRequestTransaction";
32
- WebhookTypeEnum["transfer"] = "transfer";
33
- WebhookTypeEnum["transaction"] = "transaction";
34
- WebhookTypeEnum["transactionRemoved"] = "transactionRemoved";
35
- WebhookTypeEnum["transactionExpire"] = "transactionExpire";
36
- WebhookTypeEnum["pendingapproval"] = "pendingapproval";
37
- WebhookTypeEnum["block"] = "block";
38
- WebhookTypeEnum["admin"] = "admin";
39
- WebhookTypeEnum["address_confirmation"] = "address_confirmation";
40
- WebhookTypeEnum["lowFee"] = "lowFee";
41
- WebhookTypeEnum["circuitBreaker"] = "circuitBreaker";
42
- WebhookTypeEnum["wallet_confirmation"] = "wallet_confirmation";
43
- WebhookTypeEnum["wireWithdrawal"] = "wireWithdrawal";
44
- WebhookTypeEnum["bankAccount"] = "bankAccount";
45
- WebhookTypeEnum["userKycState"] = "userKycState";
46
- WebhookTypeEnum["enterpriseKycState"] = "enterpriseKycState";
47
- WebhookTypeEnum["identityStatus"] = "identityStatus";
48
- WebhookTypeEnum["accessToken"] = "accessToken";
49
- })(WebhookTypeEnum || (exports.WebhookTypeEnum = WebhookTypeEnum = {}));
50
- exports.WebhookType = t.keyof(WebhookTypeEnum, "WebhookType");
51
- var WalletWebhookTypeEnum;
52
- (function (WalletWebhookTypeEnum) {
53
- WalletWebhookTypeEnum["txRequest"] = "txRequest";
54
- WalletWebhookTypeEnum["txRequestTransaction"] = "txRequestTransaction";
55
- WalletWebhookTypeEnum["transfer"] = "transfer";
56
- WalletWebhookTypeEnum["transaction"] = "transaction";
57
- WalletWebhookTypeEnum["transactionRemoved"] = "transactionRemoved";
58
- WalletWebhookTypeEnum["transactionExpire"] = "transactionExpire";
59
- WalletWebhookTypeEnum["pendingapproval"] = "pendingapproval";
60
- WalletWebhookTypeEnum["block"] = "block";
61
- WalletWebhookTypeEnum["admin"] = "admin";
62
- WalletWebhookTypeEnum["address_confirmation"] = "address_confirmation";
63
- WalletWebhookTypeEnum["lowFee"] = "lowFee";
64
- WalletWebhookTypeEnum["circuitBreaker"] = "circuitBreaker";
65
- WalletWebhookTypeEnum["wireWithdrawal"] = "wireWithdrawal";
66
- })(WalletWebhookTypeEnum || (exports.WalletWebhookTypeEnum = WalletWebhookTypeEnum = {}));
67
- exports.WalletWebhookType = t.keyof(WalletWebhookTypeEnum, "WalletWebhookType");
68
- var EnterpriseWebhookTypeEnum;
69
- (function (EnterpriseWebhookTypeEnum) {
70
- EnterpriseWebhookTypeEnum["bankAccount"] = "bankAccount";
71
- EnterpriseWebhookTypeEnum["accessToken"] = "accessToken";
72
- })(EnterpriseWebhookTypeEnum || (exports.EnterpriseWebhookTypeEnum = EnterpriseWebhookTypeEnum = {}));
73
- exports.EnterpriseWebhookType = t.keyof(EnterpriseWebhookTypeEnum, "EnterpriseWebhookType");
28
+ exports.WebhookType = t.keyof({
29
+ txRequest: 1,
30
+ txRequestTransaction: 1,
31
+ transfer: 1,
32
+ transaction: 1,
33
+ transactionRemoved: 1,
34
+ transactionExpire: 1,
35
+ pendingapproval: 1,
36
+ block: 1,
37
+ admin: 1,
38
+ address_confirmation: 1,
39
+ lowFee: 1,
40
+ circuitBreaker: 1,
41
+ wallet_confirmation: 1,
42
+ wireWithdrawal: 1,
43
+ bankAccount: 1,
44
+ userKycState: 1,
45
+ enterpriseKycState: 1,
46
+ identityStatus: 1,
47
+ accessToken: 1,
48
+ }, "WebhookType");
49
+ exports.WalletWebhookType = t.keyof({
50
+ txRequest: 1,
51
+ txRequestTransaction: 1,
52
+ transfer: 1,
53
+ transaction: 1,
54
+ transactionRemoved: 1,
55
+ transactionExpire: 1,
56
+ pendingapproval: 1,
57
+ block: 1,
58
+ admin: 1,
59
+ address_confirmation: 1,
60
+ lowFee: 1,
61
+ circuitBreaker: 1,
62
+ wireWithdrawal: 1,
63
+ }, "WalletWebhookType");
64
+ exports.EnterpriseWebhookType = t.keyof({
65
+ bankAccount: 1,
66
+ accessToken: 1,
67
+ }, "EnterpriseWebhookType");
74
68
  //# sourceMappingURL=webhookType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;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,CAC1C,yBAAyB,EACzB,uBAAuB,CACxB,CAAC"}
1
+ {"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAEd,QAAA,WAAW,GAAG,CAAC,CAAC,KAAK,CAChC;IAEE,SAAS,EAAE,CAAC;IAEZ,oBAAoB,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC;IACd,kBAAkB,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IAGjB,mBAAmB,EAAE,CAAC;IAEtB,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,kBAAkB,EAAE,CAAC;IACrB,cAAc,EAAE,CAAC;IAEjB,WAAW,EAAE,CAAC;CACf,EACD,aAAa,CACd,CAAC;AAIW,QAAA,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACtC;IACE,SAAS,EAAE,CAAC;IACZ,oBAAoB,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,CAAC;IACd,kBAAkB,EAAE,CAAC;IACrB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,oBAAoB,EAAE,CAAC;IACvB,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;CAClB,EACD,mBAAmB,CACpB,CAAC;AAGW,QAAA,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAC1C;IACE,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,CAAC;CACf,EACD,uBAAuB,CACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "2.30.0",
3
+ "version": "2.31.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -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>;
@@ -1,64 +1,63 @@
1
1
  import * as t from "io-ts";
2
2
 
3
- export enum WebhookTypeEnum {
4
- // Webhook for txRequest.state changes
5
- "txRequest" = "txRequest",
6
- // Webhook for any txRequest.transactions[].state changes
7
- "txRequestTransaction" = "txRequestTransaction",
8
- "transfer" = "transfer",
9
- "transaction" = "transaction",
10
- "transactionRemoved" = "transactionRemoved",
11
- "transactionExpire" = "transactionExpire",
12
- "pendingapproval" = "pendingapproval",
13
- "block" = "block",
14
- "admin" = "admin",
15
- "address_confirmation" = "address_confirmation",
16
- "lowFee" = "lowFee",
17
- "circuitBreaker" = "circuitBreaker",
18
-
19
- // Specific to User Webhooks
20
- "wallet_confirmation" = "wallet_confirmation",
21
-
22
- "wireWithdrawal" = "wireWithdrawal",
23
- "bankAccount" = "bankAccount",
24
- "userKycState" = "userKycState",
25
- "enterpriseKycState" = "enterpriseKycState",
26
- "identityStatus" = "identityStatus",
27
-
28
- "accessToken" = "accessToken",
29
- }
3
+ export const WebhookType = t.keyof(
4
+ {
5
+ // Webhook for txRequest.state changes
6
+ txRequest: 1,
7
+ // Webhook for any txRequest.transactions[].state changes
8
+ txRequestTransaction: 1,
9
+ transfer: 1,
10
+ transaction: 1,
11
+ transactionRemoved: 1,
12
+ transactionExpire: 1,
13
+ pendingapproval: 1,
14
+ block: 1,
15
+ admin: 1,
16
+ address_confirmation: 1,
17
+ lowFee: 1,
18
+ circuitBreaker: 1,
19
+
20
+ // Specific to User Webhooks
21
+ wallet_confirmation: 1,
22
+
23
+ wireWithdrawal: 1,
24
+ bankAccount: 1,
25
+ userKycState: 1,
26
+ enterpriseKycState: 1,
27
+ identityStatus: 1,
28
+
29
+ accessToken: 1,
30
+ },
31
+ "WebhookType",
32
+ );
30
33
 
31
- export const WebhookType = t.keyof(WebhookTypeEnum, "WebhookType");
32
34
  export type WebhookType = t.TypeOf<typeof WebhookType>;
33
35
 
34
- export enum WalletWebhookTypeEnum {
35
- "txRequest" = "txRequest",
36
- "txRequestTransaction" = "txRequestTransaction",
37
- "transfer" = "transfer",
38
- "transaction" = "transaction",
39
- "transactionRemoved" = "transactionRemoved",
40
- "transactionExpire" = "transactionExpire",
41
- "pendingapproval" = "pendingapproval",
42
- "block" = "block",
43
- "admin" = "admin",
44
- "address_confirmation" = "address_confirmation",
45
- "lowFee" = "lowFee",
46
- "circuitBreaker" = "circuitBreaker",
47
- "wireWithdrawal" = "wireWithdrawal",
48
- }
49
-
50
36
  export const WalletWebhookType = t.keyof(
51
- WalletWebhookTypeEnum,
37
+ {
38
+ txRequest: 1,
39
+ txRequestTransaction: 1,
40
+ transfer: 1,
41
+ transaction: 1,
42
+ transactionRemoved: 1,
43
+ transactionExpire: 1,
44
+ pendingapproval: 1,
45
+ block: 1,
46
+ admin: 1,
47
+ address_confirmation: 1,
48
+ lowFee: 1,
49
+ circuitBreaker: 1,
50
+ wireWithdrawal: 1,
51
+ },
52
52
  "WalletWebhookType",
53
53
  );
54
54
  export type WalletWebhookType = t.TypeOf<typeof WalletWebhookType>;
55
55
 
56
- export enum EnterpriseWebhookTypeEnum {
57
- "bankAccount" = "bankAccount",
58
- "accessToken" = "accessToken",
59
- }
60
56
  export const EnterpriseWebhookType = t.keyof(
61
- EnterpriseWebhookTypeEnum,
57
+ {
58
+ bankAccount: 1,
59
+ accessToken: 1,
60
+ },
62
61
  "EnterpriseWebhookType",
63
62
  );
64
63
  export type EnterpriseWebhookType = t.TypeOf<typeof EnterpriseWebhookType>;