@drift-labs/vaults-sdk 0.1.423 → 0.1.425
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/lib/accounts/vaultAccount.d.ts +1 -6
- package/lib/accounts/vaultAccount.js +0 -116
- package/lib/addresses.d.ts +0 -1
- package/lib/addresses.js +0 -7
- package/lib/math/vaultDepositor.d.ts +2 -11
- package/lib/math/vaultDepositor.js +2 -20
- package/lib/types/drift_vaults.d.ts +24 -450
- package/lib/types/drift_vaults.js +24 -450
- package/lib/types/types.d.ts +1 -66
- package/lib/vaultClient.d.ts +5 -53
- package/lib/vaultClient.js +42 -407
- package/package.json +2 -2
- package/src/accounts/vaultAccount.ts +3 -164
- package/src/addresses.ts +0 -13
- package/src/idl/drift_vaults.json +24 -453
- package/src/math/vaultDepositor.ts +4 -36
- package/src/types/drift_vaults.ts +55 -907
- package/src/types/types.ts +1 -79
- package/src/vaultClient.ts +42 -540
package/src/types/types.ts
CHANGED
|
@@ -19,40 +19,6 @@ export type WithdrawRequest = {
|
|
|
19
19
|
ts: BN;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export type VaultParams = {
|
|
23
|
-
name: number[];
|
|
24
|
-
spotMarketIndex: number;
|
|
25
|
-
redeemPeriod: BN;
|
|
26
|
-
maxTokens: BN;
|
|
27
|
-
minDepositAmount: BN;
|
|
28
|
-
managementFee: BN;
|
|
29
|
-
profitShare: number;
|
|
30
|
-
hurdleRate: number;
|
|
31
|
-
permissioned: boolean;
|
|
32
|
-
vaultProtocol: VaultProtocolParams | null;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export type VaultProtocolParams = {
|
|
36
|
-
protocol: PublicKey;
|
|
37
|
-
protocolFee: BN;
|
|
38
|
-
protocolProfitShare: number;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export type UpdateVaultParams = {
|
|
42
|
-
redeemPeriod: BN | null;
|
|
43
|
-
maxTokens: BN | null;
|
|
44
|
-
minDepositAmount: BN | null;
|
|
45
|
-
managementFee: BN | null;
|
|
46
|
-
profitShare: number | null;
|
|
47
|
-
hurdleRate: number | null;
|
|
48
|
-
permissioned: boolean | null;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type UpdateVaultProtocolParams = {
|
|
52
|
-
protocolFee: BN | null;
|
|
53
|
-
protocolProfitShare: number | null;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
22
|
// Vault program accounts
|
|
57
23
|
|
|
58
24
|
export type Vault = {
|
|
@@ -89,8 +55,6 @@ export type Vault = {
|
|
|
89
55
|
bump: number;
|
|
90
56
|
permissioned: boolean;
|
|
91
57
|
lastManagerWithdrawRequest: WithdrawRequest;
|
|
92
|
-
/// If this is the default Pubkey (also equal to the SystemProgram) then it does not exist.
|
|
93
|
-
vaultProtocol: PublicKey;
|
|
94
58
|
};
|
|
95
59
|
|
|
96
60
|
export type VaultDepositor = {
|
|
@@ -109,21 +73,7 @@ export type VaultDepositor = {
|
|
|
109
73
|
cumulativeProfitShareAmount: BN;
|
|
110
74
|
vaultSharesBase: number;
|
|
111
75
|
profitShareFeePaid: BN;
|
|
112
|
-
|
|
113
|
-
padding: BN[];
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export type VaultProtocol = {
|
|
117
|
-
protocol: PublicKey;
|
|
118
|
-
protocolProfitAndFeeShares: BN;
|
|
119
|
-
protocolFee: BN;
|
|
120
|
-
protocolTotalWithdraws: BN;
|
|
121
|
-
protocolTotalFee: BN;
|
|
122
|
-
protocolTotalProfitShare: BN;
|
|
123
|
-
lastProtocolWithdrawRequest: WithdrawRequest;
|
|
124
|
-
protocolProfitShare: number;
|
|
125
|
-
bump: number;
|
|
126
|
-
version: number;
|
|
76
|
+
padding: number[];
|
|
127
77
|
};
|
|
128
78
|
|
|
129
79
|
export type VaultsProgramAccountBaseEvents = {
|
|
@@ -197,34 +147,6 @@ export type VaultDepositorRecord = {
|
|
|
197
147
|
managementFeeShares: BN;
|
|
198
148
|
};
|
|
199
149
|
|
|
200
|
-
export type VaultDepositorV1Record = {
|
|
201
|
-
ts: BN;
|
|
202
|
-
|
|
203
|
-
vault: PublicKey;
|
|
204
|
-
depositorAuthority: PublicKey;
|
|
205
|
-
action: VaultDepositorAction;
|
|
206
|
-
amount: BN;
|
|
207
|
-
|
|
208
|
-
spotMarketIndex: number;
|
|
209
|
-
vaultSharesBefore: BN;
|
|
210
|
-
vaultSharesAfter: BN;
|
|
211
|
-
vaultEquityBefore: BN;
|
|
212
|
-
|
|
213
|
-
userVaultSharesBefore: BN;
|
|
214
|
-
totalVaultSharesBefore: BN;
|
|
215
|
-
|
|
216
|
-
userVaultSharesAfter: BN;
|
|
217
|
-
totalVaultSharesAfter: BN;
|
|
218
|
-
|
|
219
|
-
protocolProfitShare: BN;
|
|
220
|
-
protocolFee: BN;
|
|
221
|
-
protocolFeeShares: BN;
|
|
222
|
-
|
|
223
|
-
managerProfitShare: BN;
|
|
224
|
-
managementFee: BN;
|
|
225
|
-
managementFeeShares: BN;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
150
|
export type VaultsEventMap = {
|
|
229
151
|
VaultDepositorRecord: Event<VaultDepositorRecord>;
|
|
230
152
|
};
|