@bitgo/public-types 6.39.1 → 6.40.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 @@
1
+ export * from "./vault";
@@ -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("./vault"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/defi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
@@ -0,0 +1,135 @@
1
+ import * as t from "io-ts";
2
+ export declare enum VaultProtocol {
3
+ MORPHO = "morpho",
4
+ CONCRETE_BTCCX = "concrete_btccx"
5
+ }
6
+ export declare const VaultProtocolType: t.UnionC<[t.LiteralC<VaultProtocol.MORPHO>, t.LiteralC<VaultProtocol.CONCRETE_BTCCX>]>;
7
+ export type VaultProtocolType = t.TypeOf<typeof VaultProtocolType>;
8
+ export declare enum VaultStatus {
9
+ ACTIVE = "active",
10
+ PAUSED = "paused",
11
+ DISABLED = "disabled"
12
+ }
13
+ export declare const VaultStatusType: t.UnionC<[t.LiteralC<VaultStatus.ACTIVE>, t.LiteralC<VaultStatus.PAUSED>, t.LiteralC<VaultStatus.DISABLED>]>;
14
+ export type VaultStatusType = t.TypeOf<typeof VaultStatusType>;
15
+ export declare enum VaultCustody {
16
+ QUALIFIED = "qualified",
17
+ NON_QUALIFIED = "non-qualified"
18
+ }
19
+ export declare const VaultCustodyType: t.UnionC<[t.LiteralC<VaultCustody.QUALIFIED>, t.LiteralC<VaultCustody.NON_QUALIFIED>]>;
20
+ export type VaultCustodyType = t.TypeOf<typeof VaultCustodyType>;
21
+ export declare const VaultUrls: t.PartialC<{
22
+ riskManager: t.StringC;
23
+ protocol: t.StringC;
24
+ audits: t.StringC;
25
+ protocolDisclaimers: t.StringC;
26
+ }>;
27
+ export type VaultUrls = t.TypeOf<typeof VaultUrls>;
28
+ export declare const VaultComposition: t.IntersectionC<[t.TypeC<{
29
+ asset: t.StringC;
30
+ apy: t.NumberC;
31
+ tvlUsd: t.NumberC;
32
+ }>, t.PartialC<{
33
+ iconUrl: t.StringC;
34
+ }>]>;
35
+ export type VaultComposition = t.TypeOf<typeof VaultComposition>;
36
+ export declare const ConcreteVaultConfig: t.TypeC<{
37
+ sourceWalletId: t.StringC;
38
+ escrowWalletId: t.StringC;
39
+ escrowDepositAddress: t.StringC;
40
+ positionWalletId: t.StringC;
41
+ positionBaseAddress: t.StringC;
42
+ }>;
43
+ export type ConcreteVaultConfig = t.TypeOf<typeof ConcreteVaultConfig>;
44
+ export declare const Vault: t.IntersectionC<[t.TypeC<{
45
+ id: t.StringC;
46
+ name: t.StringC;
47
+ provider: t.UnionC<[t.LiteralC<VaultProtocol.MORPHO>, t.LiteralC<VaultProtocol.CONCRETE_BTCCX>]>;
48
+ status: t.UnionC<[t.LiteralC<VaultStatus.ACTIVE>, t.LiteralC<VaultStatus.PAUSED>, t.LiteralC<VaultStatus.DISABLED>]>;
49
+ coin: t.StringC;
50
+ assetToken: t.StringC;
51
+ shareToken: t.StringC;
52
+ riskManager: t.StringC;
53
+ custodyType: t.UnionC<[t.LiteralC<VaultCustody.QUALIFIED>, t.LiteralC<VaultCustody.NON_QUALIFIED>]>;
54
+ vaultContractAddress: t.StringC;
55
+ }>, t.PartialC<{
56
+ apy: t.NumberC;
57
+ tvl: t.NumberC;
58
+ tvlUsd: t.NumberC;
59
+ concreteConfig: t.TypeC<{
60
+ sourceWalletId: t.StringC;
61
+ escrowWalletId: t.StringC;
62
+ escrowDepositAddress: t.StringC;
63
+ positionWalletId: t.StringC;
64
+ positionBaseAddress: t.StringC;
65
+ }>;
66
+ }>]>;
67
+ export type Vault = t.TypeOf<typeof Vault>;
68
+ export declare const GetVaultResponse: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
69
+ id: t.StringC;
70
+ name: t.StringC;
71
+ provider: t.UnionC<[t.LiteralC<VaultProtocol.MORPHO>, t.LiteralC<VaultProtocol.CONCRETE_BTCCX>]>;
72
+ status: t.UnionC<[t.LiteralC<VaultStatus.ACTIVE>, t.LiteralC<VaultStatus.PAUSED>, t.LiteralC<VaultStatus.DISABLED>]>;
73
+ coin: t.StringC;
74
+ assetToken: t.StringC;
75
+ shareToken: t.StringC;
76
+ riskManager: t.StringC;
77
+ custodyType: t.UnionC<[t.LiteralC<VaultCustody.QUALIFIED>, t.LiteralC<VaultCustody.NON_QUALIFIED>]>;
78
+ vaultContractAddress: t.StringC;
79
+ }>, t.PartialC<{
80
+ apy: t.NumberC;
81
+ tvl: t.NumberC;
82
+ tvlUsd: t.NumberC;
83
+ concreteConfig: t.TypeC<{
84
+ sourceWalletId: t.StringC;
85
+ escrowWalletId: t.StringC;
86
+ escrowDepositAddress: t.StringC;
87
+ positionWalletId: t.StringC;
88
+ positionBaseAddress: t.StringC;
89
+ }>;
90
+ }>]>, t.PartialC<{
91
+ deployedAt: t.StringC;
92
+ urls: t.PartialC<{
93
+ riskManager: t.StringC;
94
+ protocol: t.StringC;
95
+ audits: t.StringC;
96
+ protocolDisclaimers: t.StringC;
97
+ }>;
98
+ performanceFee: t.NumberC;
99
+ managementFee: t.NumberC;
100
+ composition: t.ArrayC<t.IntersectionC<[t.TypeC<{
101
+ asset: t.StringC;
102
+ apy: t.NumberC;
103
+ tvlUsd: t.NumberC;
104
+ }>, t.PartialC<{
105
+ iconUrl: t.StringC;
106
+ }>]>>;
107
+ }>]>;
108
+ export type GetVaultResponse = t.TypeOf<typeof GetVaultResponse>;
109
+ export declare const ListVaultsResponse: t.TypeC<{
110
+ vaults: t.ArrayC<t.IntersectionC<[t.TypeC<{
111
+ id: t.StringC;
112
+ name: t.StringC;
113
+ provider: t.UnionC<[t.LiteralC<VaultProtocol.MORPHO>, t.LiteralC<VaultProtocol.CONCRETE_BTCCX>]>;
114
+ status: t.UnionC<[t.LiteralC<VaultStatus.ACTIVE>, t.LiteralC<VaultStatus.PAUSED>, t.LiteralC<VaultStatus.DISABLED>]>;
115
+ coin: t.StringC;
116
+ assetToken: t.StringC;
117
+ shareToken: t.StringC;
118
+ riskManager: t.StringC;
119
+ custodyType: t.UnionC<[t.LiteralC<VaultCustody.QUALIFIED>, t.LiteralC<VaultCustody.NON_QUALIFIED>]>;
120
+ vaultContractAddress: t.StringC;
121
+ }>, t.PartialC<{
122
+ apy: t.NumberC;
123
+ tvl: t.NumberC;
124
+ tvlUsd: t.NumberC;
125
+ concreteConfig: t.TypeC<{
126
+ sourceWalletId: t.StringC;
127
+ escrowWalletId: t.StringC;
128
+ escrowDepositAddress: t.StringC;
129
+ positionWalletId: t.StringC;
130
+ positionBaseAddress: t.StringC;
131
+ }>;
132
+ }>]>>;
133
+ totalVaultCount: t.NumberC;
134
+ }>;
135
+ export type ListVaultsResponse = t.TypeOf<typeof ListVaultsResponse>;
@@ -0,0 +1,114 @@
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.ListVaultsResponse = exports.GetVaultResponse = exports.Vault = exports.ConcreteVaultConfig = exports.VaultComposition = exports.VaultUrls = exports.VaultCustodyType = exports.VaultCustody = exports.VaultStatusType = exports.VaultStatus = exports.VaultProtocolType = exports.VaultProtocol = void 0;
27
+ const t = __importStar(require("io-ts"));
28
+ var VaultProtocol;
29
+ (function (VaultProtocol) {
30
+ VaultProtocol["MORPHO"] = "morpho";
31
+ VaultProtocol["CONCRETE_BTCCX"] = "concrete_btccx";
32
+ })(VaultProtocol || (exports.VaultProtocol = VaultProtocol = {}));
33
+ exports.VaultProtocolType = t.union([
34
+ t.literal(VaultProtocol.MORPHO),
35
+ t.literal(VaultProtocol.CONCRETE_BTCCX),
36
+ ]);
37
+ var VaultStatus;
38
+ (function (VaultStatus) {
39
+ VaultStatus["ACTIVE"] = "active";
40
+ VaultStatus["PAUSED"] = "paused";
41
+ VaultStatus["DISABLED"] = "disabled";
42
+ })(VaultStatus || (exports.VaultStatus = VaultStatus = {}));
43
+ exports.VaultStatusType = t.union([
44
+ t.literal(VaultStatus.ACTIVE),
45
+ t.literal(VaultStatus.PAUSED),
46
+ t.literal(VaultStatus.DISABLED),
47
+ ]);
48
+ var VaultCustody;
49
+ (function (VaultCustody) {
50
+ VaultCustody["QUALIFIED"] = "qualified";
51
+ VaultCustody["NON_QUALIFIED"] = "non-qualified";
52
+ })(VaultCustody || (exports.VaultCustody = VaultCustody = {}));
53
+ exports.VaultCustodyType = t.union([
54
+ t.literal(VaultCustody.QUALIFIED),
55
+ t.literal(VaultCustody.NON_QUALIFIED),
56
+ ]);
57
+ exports.VaultUrls = t.partial({
58
+ riskManager: t.string,
59
+ protocol: t.string,
60
+ audits: t.string,
61
+ protocolDisclaimers: t.string,
62
+ });
63
+ exports.VaultComposition = t.intersection([
64
+ t.type({
65
+ asset: t.string,
66
+ apy: t.number,
67
+ tvlUsd: t.number,
68
+ }),
69
+ t.partial({
70
+ iconUrl: t.string,
71
+ }),
72
+ ]);
73
+ exports.ConcreteVaultConfig = t.type({
74
+ sourceWalletId: t.string,
75
+ escrowWalletId: t.string,
76
+ escrowDepositAddress: t.string,
77
+ positionWalletId: t.string,
78
+ positionBaseAddress: t.string,
79
+ });
80
+ exports.Vault = t.intersection([
81
+ t.type({
82
+ id: t.string,
83
+ name: t.string,
84
+ provider: exports.VaultProtocolType,
85
+ status: exports.VaultStatusType,
86
+ coin: t.string,
87
+ assetToken: t.string,
88
+ shareToken: t.string,
89
+ riskManager: t.string,
90
+ custodyType: exports.VaultCustodyType,
91
+ vaultContractAddress: t.string,
92
+ }),
93
+ t.partial({
94
+ apy: t.number,
95
+ tvl: t.number,
96
+ tvlUsd: t.number,
97
+ concreteConfig: exports.ConcreteVaultConfig,
98
+ }),
99
+ ]);
100
+ exports.GetVaultResponse = t.intersection([
101
+ exports.Vault,
102
+ t.partial({
103
+ deployedAt: t.string,
104
+ urls: exports.VaultUrls,
105
+ performanceFee: t.number,
106
+ managementFee: t.number,
107
+ composition: t.array(exports.VaultComposition),
108
+ }),
109
+ ]);
110
+ exports.ListVaultsResponse = t.type({
111
+ vaults: t.array(exports.Vault),
112
+ totalVaultCount: t.number,
113
+ });
114
+ //# sourceMappingURL=vault.js.map
@@ -0,0 +1 @@
1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,CAAC;AAIU,QAAA,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,aAAK;IACL,CAAC,CAAC,OAAO,CAAC;QACR,UAAU,EAAE,CAAC,CAAC,MAAM;QACpB,IAAI,EAAE,iBAAS;QACf,cAAc,EAAE,CAAC,CAAC,MAAM;QACxB,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;KACvC,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,aAAK,CAAC;IACtB,eAAe,EAAE,CAAC,CAAC,MAAM;CAC1B,CAAC,CAAC"}
@@ -8,3 +8,4 @@ export * from "./tss";
8
8
  export * from "./lightning";
9
9
  export * from "./enterprise";
10
10
  export * from "./webauthn";
11
+ export * from "./defi";
@@ -24,4 +24,5 @@ __exportStar(require("./tss"), exports);
24
24
  __exportStar(require("./lightning"), exports);
25
25
  __exportStar(require("./enterprise"), exports);
26
26
  __exportStar(require("./webauthn"), exports);
27
+ __exportStar(require("./defi"), exports);
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,uDAAqC;AACrC,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,yCAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.39.1",
3
+ "version": "6.40.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 @@
1
+ export * from "./vault";
@@ -0,0 +1,115 @@
1
+ import * as t from "io-ts";
2
+
3
+ // ── Enums ──────────────────────────────────────────────────────────────────
4
+
5
+ export enum VaultProtocol {
6
+ MORPHO = "morpho",
7
+ CONCRETE_BTCCX = "concrete_btccx",
8
+ }
9
+
10
+ export const VaultProtocolType = t.union([
11
+ t.literal(VaultProtocol.MORPHO),
12
+ t.literal(VaultProtocol.CONCRETE_BTCCX),
13
+ ]);
14
+ export type VaultProtocolType = t.TypeOf<typeof VaultProtocolType>;
15
+
16
+ export enum VaultStatus {
17
+ ACTIVE = "active",
18
+ PAUSED = "paused",
19
+ DISABLED = "disabled",
20
+ }
21
+
22
+ export const VaultStatusType = t.union([
23
+ t.literal(VaultStatus.ACTIVE),
24
+ t.literal(VaultStatus.PAUSED),
25
+ t.literal(VaultStatus.DISABLED),
26
+ ]);
27
+ export type VaultStatusType = t.TypeOf<typeof VaultStatusType>;
28
+
29
+ export enum VaultCustody {
30
+ QUALIFIED = "qualified",
31
+ NON_QUALIFIED = "non-qualified",
32
+ }
33
+
34
+ export const VaultCustodyType = t.union([
35
+ t.literal(VaultCustody.QUALIFIED),
36
+ t.literal(VaultCustody.NON_QUALIFIED),
37
+ ]);
38
+ export type VaultCustodyType = t.TypeOf<typeof VaultCustodyType>;
39
+
40
+ // ── Sub-shapes ─────────────────────────────────────────────────────────────
41
+
42
+ export const VaultUrls = t.partial({
43
+ riskManager: t.string,
44
+ protocol: t.string,
45
+ audits: t.string,
46
+ protocolDisclaimers: t.string,
47
+ });
48
+ export type VaultUrls = t.TypeOf<typeof VaultUrls>;
49
+
50
+ export const VaultComposition = t.intersection([
51
+ t.type({
52
+ asset: t.string,
53
+ apy: t.number,
54
+ tvlUsd: t.number,
55
+ }),
56
+ t.partial({
57
+ iconUrl: t.string,
58
+ }),
59
+ ]);
60
+ export type VaultComposition = t.TypeOf<typeof VaultComposition>;
61
+
62
+ /** Wallet-mapping block present only on concrete_btccx vaults */
63
+ export const ConcreteVaultConfig = t.type({
64
+ sourceWalletId: t.string,
65
+ escrowWalletId: t.string,
66
+ escrowDepositAddress: t.string,
67
+ positionWalletId: t.string,
68
+ positionBaseAddress: t.string,
69
+ });
70
+ export type ConcreteVaultConfig = t.TypeOf<typeof ConcreteVaultConfig>;
71
+
72
+ // ── API response shapes ────────────────────────────────────────────────────
73
+
74
+ /** Shape of each item returned by GET /vaults */
75
+ export const Vault = t.intersection([
76
+ t.type({
77
+ id: t.string,
78
+ name: t.string,
79
+ provider: VaultProtocolType,
80
+ status: VaultStatusType,
81
+ coin: t.string,
82
+ assetToken: t.string,
83
+ shareToken: t.string,
84
+ riskManager: t.string,
85
+ custodyType: VaultCustodyType,
86
+ vaultContractAddress: t.string,
87
+ }),
88
+ t.partial({
89
+ apy: t.number,
90
+ tvl: t.number,
91
+ tvlUsd: t.number,
92
+ concreteConfig: ConcreteVaultConfig,
93
+ }),
94
+ ]);
95
+ export type Vault = t.TypeOf<typeof Vault>;
96
+
97
+ /** Shape returned by GET /vaults/:id — extends Vault with enriched detail */
98
+ export const GetVaultResponse = t.intersection([
99
+ Vault,
100
+ t.partial({
101
+ deployedAt: t.string,
102
+ urls: VaultUrls,
103
+ performanceFee: t.number,
104
+ managementFee: t.number,
105
+ composition: t.array(VaultComposition),
106
+ }),
107
+ ]);
108
+ export type GetVaultResponse = t.TypeOf<typeof GetVaultResponse>;
109
+
110
+ /** Shape returned by GET /vaults */
111
+ export const ListVaultsResponse = t.type({
112
+ vaults: t.array(Vault),
113
+ totalVaultCount: t.number,
114
+ });
115
+ export type ListVaultsResponse = t.TypeOf<typeof ListVaultsResponse>;
@@ -8,3 +8,4 @@ export * from "./tss";
8
8
  export * from "./lightning";
9
9
  export * from "./enterprise";
10
10
  export * from "./webauthn";
11
+ export * from "./defi";