@kamino-finance/klend-sdk 5.10.0 → 5.10.2

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.
Files changed (37) hide show
  1. package/dist/classes/farm_utils.d.ts +22 -0
  2. package/dist/classes/farm_utils.d.ts.map +1 -0
  3. package/dist/classes/farm_utils.js +93 -0
  4. package/dist/classes/farm_utils.js.map +1 -0
  5. package/dist/classes/lut_utils.d.ts +29 -0
  6. package/dist/classes/lut_utils.d.ts.map +1 -0
  7. package/dist/classes/lut_utils.js +62 -0
  8. package/dist/classes/lut_utils.js.map +1 -0
  9. package/dist/classes/manager.d.ts +51 -28
  10. package/dist/classes/manager.d.ts.map +1 -1
  11. package/dist/classes/manager.js +53 -27
  12. package/dist/classes/manager.js.map +1 -1
  13. package/dist/classes/types.d.ts +15 -0
  14. package/dist/classes/types.d.ts.map +1 -1
  15. package/dist/classes/utils.d.ts +6 -0
  16. package/dist/classes/utils.d.ts.map +1 -1
  17. package/dist/classes/utils.js +10 -0
  18. package/dist/classes/utils.js.map +1 -1
  19. package/dist/classes/vault.d.ts +84 -56
  20. package/dist/classes/vault.d.ts.map +1 -1
  21. package/dist/classes/vault.js +229 -134
  22. package/dist/classes/vault.js.map +1 -1
  23. package/dist/client_kamino_manager.d.ts.map +1 -1
  24. package/dist/client_kamino_manager.js +10 -26
  25. package/dist/client_kamino_manager.js.map +1 -1
  26. package/dist/utils/ata.d.ts.map +1 -1
  27. package/dist/utils/ata.js +1 -0
  28. package/dist/utils/ata.js.map +1 -1
  29. package/package.json +6 -6
  30. package/src/classes/farm_utils.ts +155 -0
  31. package/src/classes/lut_utils.ts +63 -0
  32. package/src/classes/manager.ts +75 -31
  33. package/src/classes/types.ts +18 -0
  34. package/src/classes/utils.ts +10 -0
  35. package/src/classes/vault.ts +315 -158
  36. package/src/client_kamino_manager.ts +19 -33
  37. package/src/utils/ata.ts +1 -0
@@ -4,7 +4,8 @@ import { VaultConfigFieldKind } from '../idl_codegen_kamino_vault/types';
4
4
  import { VaultState } from '../idl_codegen_kamino_vault/accounts';
5
5
  import Decimal from 'decimal.js';
6
6
  import { ReserveWithAddress } from './reserve';
7
- import { AcceptVaultOwnershipIxs, InitVaultIxs, SyncVaultLUTIxs, UpdateReserveAllocationIxs, UpdateVaultConfigIxs } from './types';
7
+ import { AcceptVaultOwnershipIxs, DepositIxs, InitVaultIxs, SyncVaultLUTIxs, UpdateReserveAllocationIxs, UpdateVaultConfigIxs, UserSharesForVault, WithdrawIxs } from './types';
8
+ import { FarmState } from '@kamino-finance/farms-sdk/dist';
8
9
  export declare const kaminoVaultId: PublicKey;
9
10
  export declare const kaminoVaultStagingId: PublicKey;
10
11
  /**
@@ -18,10 +19,10 @@ export declare class KaminoVaultClient {
18
19
  constructor(connection: Connection, kaminoVaultprogramId?: PublicKey, kaminoLendProgramId?: PublicKey, recentSlotDurationMs?: number);
19
20
  getConnection(): Connection;
20
21
  getProgramID(): PublicKey;
22
+ hasFarm(): void;
21
23
  /**
22
24
  * This method will create a vault with a given config. The config can be changed later on, but it is recommended to set it up correctly from the start
23
25
  * @param vaultConfig - the config object used to create a vault
24
- * @returns vault - keypair, should be used to sign the transaction which creates the vault account
25
26
  * @returns vault: the keypair of the vault, used to sign the initialization transaction; initVaultIxs: a struct with ixs to initialize the vault and its lookup table + populateLUTIxs, a list to populate the lookup table which has to be executed in a separate transaction
26
27
  */
27
28
  createVaultIxs(vaultConfig: KaminoVaultConfig): Promise<{
@@ -32,7 +33,7 @@ export declare class KaminoVaultClient {
32
33
  * This method updates the vault reserve allocation cofnig for an exiting vault reserve, or adds a new reserve to the vault if it does not exist.
33
34
  * @param vault - vault to be updated
34
35
  * @param reserveAllocationConfig - new reserve allocation config
35
- * @returns - a list of instructions
36
+ * @returns - a struct with an instruction to update the reserve allocation and an optional list of instructions to update the lookup table for the allocation changes
36
37
  */
37
38
  updateReserveAllocationIxs(vault: KaminoVault, reserveAllocationConfig: ReserveAllocationConfig): Promise<UpdateReserveAllocationIxs>;
38
39
  /**
@@ -43,52 +44,71 @@ export declare class KaminoVaultClient {
43
44
  * @returns a struct that contains the instruction to update the field and an optional list of instructions to update the lookup table
44
45
  */
45
46
  updateVaultConfigIxs(vault: KaminoVault, mode: VaultConfigFieldKind, value: string): Promise<UpdateVaultConfigIxs>;
47
+ /** Sets the farm where the shares can be staked. This is store in vault state and a vault can only have one farm, so the new farm will ovveride the old farm
48
+ * @param vault - vault to set the farm for
49
+ * @param farm - the farm where the vault shares can be staked
50
+ * @param [errorOnOverride] - if true, the function will throw an error if the vault already has a farm. If false, it will override the farm
51
+ */
52
+ setVaultFarm(vault: KaminoVault, farm: PublicKey, errorOnOverride?: boolean): Promise<UpdateVaultConfigIxs>;
46
53
  /**
47
54
  * This method updates the vault config for a vault that
48
55
  * @param vault - address of vault to be updated
49
56
  * @param mode - the field to be updated
50
57
  * @param value - the new value for the field to be updated (number or pubkey)
51
- * @returns - a list of instructions
58
+ * @returns - an instruction to update the vault config
52
59
  */
53
- updateUninitialisedVaultConfigIx(admin: PublicKey, vault: PublicKey, mode: VaultConfigFieldKind, value: string): TransactionInstruction;
60
+ private updateUninitialisedVaultConfigIx;
54
61
  /**
55
62
  * This function creates the instruction for the `pendingAdmin` of the vault to accept to become the owner of the vault (step 2/2 of the ownership transfer)
56
63
  * @param vault - vault to change the ownership for
57
- * @returns - an instruction to be used to be executed
64
+ * @returns - an instruction to accept the ownership of the vault and a list of instructions to update the lookup table
58
65
  */
59
66
  acceptVaultOwnershipIxs(vault: KaminoVault): Promise<AcceptVaultOwnershipIxs>;
60
67
  /**
61
68
  * This function creates the instruction for the admin to give up a part of the pending fees (which will be accounted as part of the vault)
62
69
  * @param vault - vault to give up pending fees for
63
70
  * @param maxAmountToGiveUp - the maximum amount of fees to give up, in tokens
64
- * @returns - an instruction to be used to be executed
71
+ * @returns - an instruction to give up the specified pending fees
65
72
  */
66
73
  giveUpPendingFeesIx(vault: KaminoVault, maxAmountToGiveUp: Decimal): Promise<TransactionInstruction>;
67
74
  /**
68
75
  * This method withdraws all the pending fees from the vault to the owner's token ATA
69
76
  * @param vault - vault for which the admin withdraws the pending fees
70
77
  * @param slot - current slot, used to estimate the interest earned in the different reserves with allocation from the vault
71
- * @returns - list of instructions to withdraw all pending fees
78
+ * @param [vaultReservesMap] - a hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
79
+ * @returns - list of instructions to withdraw all pending fees, including the ATA creation instructions if needed
72
80
  */
73
81
  withdrawPendingFeesIxs(vault: KaminoVault, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<TransactionInstruction[]>;
74
82
  /**
75
83
  * This function creates instructions to deposit into a vault. It will also create ATA creation instructions for the vault shares that the user receives in return
76
84
  * @param user - user to deposit
77
- * @param vault - vault to deposit into
85
+ * @param vault - vault to deposit into (if the state is not provided, it will be fetched)
78
86
  * @param tokenAmount - token amount to be deposited, in decimals (will be converted in lamports)
79
- * @param vaultReservesMap - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
80
- * @returns - an array of instructions to be used to be executed
87
+ * @param [vaultReservesMap] - optional parameter; a hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
88
+ * @param [farmState] - the state of the vault farm, if the vault has a farm. Optional. If not provided, it will be fetched
89
+ * @returns - an instance of DepositIxs which contains the instructions to deposit in vault and the instructions to stake the shares in the farm if the vault has a farm
90
+ */
91
+ depositIxs(user: PublicKey, vault: KaminoVault, tokenAmount: Decimal, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>, farmState?: FarmState): Promise<DepositIxs>;
92
+ /**
93
+ * This function creates instructions to stake the shares in the vault farm if the vault has a farm
94
+ * @param user - user to stake
95
+ * @param vault - vault to deposit into its farm (if the state is not provided, it will be fetched)
96
+ * @param [sharesAmount] - token amount to be deposited, in decimals (will be converted in lamports). Optional. If not provided, the user's share balance will be used
97
+ * @param [farmState] - the state of the vault farm, if the vault has a farm. Optional. If not provided, it will be fetched
98
+ * @returns - a list of instructions for the user to stake shares into the vault's farm, including the creation of prerequisite accounts if needed
81
99
  */
82
- depositIxs(user: PublicKey, vault: KaminoVault, tokenAmount: Decimal, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<TransactionInstruction[]>;
100
+ stakeSharesIxs(user: PublicKey, vault: KaminoVault, sharesAmount?: Decimal, farmState?: FarmState): Promise<TransactionInstruction[]>;
83
101
  /**
84
- * This function will return the missing ATA creation instructions, as well as one or multiple withdraw instructions, based on how many reserves it's needed to withdraw from. This might have to be split in multiple transactions
102
+ * This function will return a struct with the instructions to unstake from the farm if necessary and the instructions for the missing ATA creation instructions, as well as one or multiple withdraw instructions, based on how many reserves it's needed to withdraw from. This might have to be split in multiple transactions
85
103
  * @param user - user to withdraw
86
104
  * @param vault - vault to withdraw from
87
105
  * @param shareAmount - share amount to withdraw, in order to withdraw everything, any value > user share amount
88
106
  * @param slot - current slot, used to estimate the interest earned in the different reserves with allocation from the vault
89
- * @returns an array of instructions to be executed
107
+ * @param [vaultReservesMap] - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
108
+ * @param [farmState] - the state of the vault farm, if the vault has a farm. Optional. If not provided, it will be fetched
109
+ * @returns an array of instructions to create missing ATAs if needed and the withdraw instructions
90
110
  */
91
- withdrawIxs(user: PublicKey, vault: KaminoVault, shareAmount: Decimal, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<TransactionInstruction[]>;
111
+ withdrawIxs(user: PublicKey, vault: KaminoVault, shareAmount: Decimal, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>, farmState?: FarmState): Promise<WithdrawIxs>;
92
112
  private withdrawFromAvailableIxns;
93
113
  private wihdrdrawWithReserveIxns;
94
114
  /**
@@ -103,10 +123,13 @@ export declare class KaminoVaultClient {
103
123
  * @param payer wallet pubkey
104
124
  * @param vault - vault to invest from
105
125
  * @param reserve - reserve to invest into or disinvest from
126
+ * @param [vaultReservesMap] - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
106
127
  * @returns - an array of invest instructions for each invest action required for the vault reserves
107
128
  */
108
129
  investSingleReserveIxs(payer: PublicKey, vault: KaminoVault, reserve: ReserveWithAddress, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<TransactionInstruction[]>;
130
+ /** Convert a string to a u8 representation to be stored on chain */
109
131
  encodeVaultName(token: string): Uint8Array;
132
+ /**Convert an u8 array to a string */
110
133
  decodeVaultName(token: number[]): string;
111
134
  private withdrawIxn;
112
135
  private withdrawFromAvailableIxn;
@@ -115,35 +138,34 @@ export declare class KaminoVaultClient {
115
138
  * Sync a vault for lookup table; create and set the LUT for the vault if needed and fill it with all the needed accounts
116
139
  * @param vault the vault to sync and set the LUT for if needed
117
140
  * @param vaultReserves optional; the state of the reserves in the vault allocation
141
+ * @param [vaultReservesMap] - optional parameter; a hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
118
142
  * @returns a struct that contains a list of ix to create the LUT and assign it to the vault if needed + a list of ixs to insert all the accounts in the LUT
119
143
  */
120
- syncVaultLookupTable(vault: KaminoVault, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<SyncVaultLUTIxs>;
121
- getInitLookupTableIx(payer: PublicKey, slot: number): [TransactionInstruction, PublicKey];
122
- getReserveAccountsToInsertInLut(reserveState: Reserve): PublicKey[];
123
- insertIntoLookupTableIxs(payer: PublicKey, lookupTable: PublicKey, keys: PublicKey[], accountsInLUT?: PublicKey[]): Promise<TransactionInstruction[]>;
144
+ syncVaultLookupTableIxs(vault: KaminoVault, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<SyncVaultLUTIxs>;
145
+ private getReserveAccountsToInsertInLut;
124
146
  /**
125
- *
126
- * @param connection
127
- * @param lookupTable
128
- * @returns
147
+ * This method inserts the missing keys from the provided keys into an existent lookup table
148
+ * @param payer - payer wallet pubkey
149
+ * @param lookupTable - lookup table to insert the keys into
150
+ * @param keys - keys to insert into the lookup table
151
+ * @param [accountsInLUT] - the existent accounts in the lookup table. Optional. If provided, the function will not fetch the accounts in the lookup table
152
+ * @returns - an array of instructions to insert the missing keys into the lookup table
129
153
  */
130
- getAccountsInLUT(lookupTable: PublicKey): Promise<PublicKey[]>;
131
- deactivateLookupTableIx(payer: PublicKey, lookupTable: PublicKey): TransactionInstruction;
132
- closeLookupTableIx(payer: PublicKey, lookupTable: PublicKey): TransactionInstruction;
154
+ insertIntoLookupTableIxs(payer: PublicKey, lookupTable: PublicKey, keys: PublicKey[], accountsInLUT?: PublicKey[]): Promise<TransactionInstruction[]>;
133
155
  /**
134
156
  * This method returns the user shares balance for a given vault
135
157
  * @param user - user to calculate the shares balance for
136
158
  * @param vault - vault to calculate shares balance for
137
- * @returns - user share balance in decimal (not lamports)
159
+ * @returns - user share balance in tokens (not lamports)
138
160
  */
139
- getUserSharesBalanceSingleVault(user: PublicKey, vault: KaminoVault): Promise<Decimal>;
161
+ getUserSharesBalanceSingleVault(user: PublicKey, vault: KaminoVault): Promise<UserSharesForVault>;
140
162
  /**
141
163
  * This method returns the user shares balance for all existing vaults
142
164
  * @param user - user to calculate the shares balance for
143
- * @param vaultsOverride - the kamino vaults if already fetched, in order to reduce rpc calls
144
- * @returns - hash map with keyh as vault address and value as user share balance in decimal (not lamports)
165
+ * @param [vaultsOverride] - the kamino vaults if already fetched, in order to reduce rpc calls.Optional
166
+ * @returns - hash map with keys as vault address and value as user share balance in decimal (not lamports)
145
167
  */
146
- getUserSharesBalanceAllVaults(user: PublicKey, vaultsOverride?: Array<KaminoVault>): Promise<PubkeyHashMap<PublicKey, Decimal>>;
168
+ getUserSharesBalanceAllVaults(user: PublicKey, vaultsOverride?: Array<KaminoVault>): Promise<PubkeyHashMap<PublicKey, UserSharesForVault>>;
147
169
  /**
148
170
  * This method returns the management and performance fee percentages
149
171
  * @param vaultState - vault to retrieve the fees percentages from
@@ -154,14 +176,14 @@ export declare class KaminoVaultClient {
154
176
  * This method calculates the token per shar value. This will always change based on interest earned from the vault, but calculating it requires a bunch of rpc requests. Caching this for a short duration would be optimal
155
177
  * @param vault - vault to calculate tokensPerShare for
156
178
  * @param slot - current slot, used to estimate the interest earned in the different reserves with allocation from the vault
157
- * @param vaultReservesMap - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
179
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
158
180
  * @returns - token per share value
159
181
  */
160
182
  getTokensPerShareSingleVault(vault: KaminoVault, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<Decimal>;
161
183
  /**
162
184
  * This method calculates the token per share value. This will always change based on interest earned from the vault, but calculating it requires a bunch of rpc requests. Caching this for a short duration would be optimal
163
- * @param vaultsOverride - a list of vaults to get the tokens per share for; if provided with state it will not fetch the state again
164
- * @param vaultReservesMap - optional parameter; a hashmap from pubkey to reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
185
+ * @param [vaultsOverride] - a list of vaults to get the tokens per share for; if provided with state it will not fetch the state again. Optional
186
+ * @param [vaultReservesMap] - optional parameter; a hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
165
187
  * @param slot - current slot, used to estimate the interest earned in the different reserves with allocation from the vault
166
188
  * @returns - token per share value
167
189
  */
@@ -189,6 +211,7 @@ export declare class KaminoVaultClient {
189
211
  * This will return an unsorted hash map of all reserves that the given vault has allocations for, toghether with the amount that can be withdrawn from each of the reserves
190
212
  * @param vault - the kamino vault to get available liquidity to withdraw for
191
213
  * @param slot - current slot
214
+ *@param [vaultReservesMap] - a hashmap from each reserve pubkey to the reserve state
192
215
  * @returns an HashMap of reserves (key) with the amount available to withdraw for each (value)
193
216
  */
194
217
  private getReserveAllocationAvailableLiquidityToWithdraw;
@@ -211,52 +234,54 @@ export declare class KaminoVaultClient {
211
234
  */
212
235
  loadVaultReserves(vaultState: VaultState): Promise<PubkeyHashMap<PublicKey, KaminoReserve>>;
213
236
  /**
214
- * This will retrieve all the tokens that can be use as collateral by the users who borrow the token in the vault alongside details about the min and max loan to value ratio
237
+ * This will retrieve all the tokens that can be used as collateral by the users who borrow the token in the vault alongside details about the min and max loan to value ratio
215
238
  * @param vaultState - the vault state to load reserves for
216
- *
239
+ * @param slot - current slot
240
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
241
+ * @param [kaminoMarkets] - a list of all the kamino markets. Optional. If provided the function will be significantly faster as it will not have to fetch the markets
217
242
  * @returns a hashmap from each reserve pubkey to the market overview of the collaterals that can be used and the min and max loan to value ratio in that market
218
243
  */
219
- getVaultCollaterals(vaultState: VaultState, slot: number, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>, kaminoMarkets?: KaminoMarket[]): Promise<PubkeyHashMap<PublicKey, MarketOverview>>;
244
+ getVaultCollaterals(vaultState: VaultState, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>, kaminoMarkets?: KaminoMarket[]): Promise<PubkeyHashMap<PublicKey, MarketOverview>>;
220
245
  /**
221
246
  * This will return an VaultHoldings object which contains the amount available (uninvested) in vault, total amount invested in reseves and a breakdown of the amount invested in each reserve
222
247
  * @param vault - the kamino vault to get available liquidity to withdraw for
223
248
  * @param slot - current slot
224
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
225
- * @returns an VaultHoldings object
249
+ * @param vaultReserves - a hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
250
+ * @returns an VaultHoldings object representing the amount available (uninvested) in vault, total amount invested in reseves and a breakdown of the amount invested in each reserve
226
251
  */
227
252
  getVaultHoldings(vault: VaultState, slot: number, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<VaultHoldings>;
228
253
  /**
229
254
  * This will return an VaultHoldingsWithUSDValue object which contains an holdings field representing the amount available (uninvested) in vault, total amount invested in reseves and a breakdown of the amount invested in each reserve and additional fields for the total USD value of the available and invested amounts
230
255
  * @param vault - the kamino vault to get available liquidity to withdraw for
231
256
  * @param slot - current slot
232
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
233
257
  * @param price - the price of the token in the vault (e.g. USDC)
258
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
234
259
  * @returns an VaultHoldingsWithUSDValue object with details about the tokens available and invested in the vault, denominated in tokens and USD
235
260
  */
236
- getVaultHoldingsWithPrice(vault: VaultState, slot: number, price: Decimal, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<VaultHoldingsWithUSDValue>;
261
+ getVaultHoldingsWithPrice(vault: VaultState, slot: number, price: Decimal, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<VaultHoldingsWithUSDValue>;
237
262
  /**
238
263
  * This will return an VaultOverview object that encapsulates all the information about the vault, including the holdings, reserves details, theoretical APY, utilization ratio and total borrowed amount
239
264
  * @param vault - the kamino vault to get available liquidity to withdraw for
240
265
  * @param slot - current slot
241
266
  * @param price - the price of the token in the vault (e.g. USDC)
242
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
243
- * @param kaminoMarkets - optional parameter; a list of all kamino markets. If provided the function will be significantly faster as it will not have to fetch the markets
244
- * @returns an VaultHoldingsWithUSDValue object with details about the tokens available and invested in the vault, denominated in tokens and USD
267
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
268
+ * @param [kaminoMarkets] - a list of all kamino markets. Optional. If provided the function will be significantly faster as it will not have to fetch the markets
269
+ * @returns an VaultOverview object with details about the tokens available and invested in the vault, denominated in tokens and USD
245
270
  */
246
- getVaultOverview(vault: VaultState, slot: number, price: Decimal, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>, kaminoMarkets?: KaminoMarket[]): Promise<VaultOverview>;
271
+ getVaultOverview(vault: VaultState, slot: number, price: Decimal, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>, kaminoMarkets?: KaminoMarket[]): Promise<VaultOverview>;
247
272
  /**
248
273
  * This will return an aggregation of the current state of the vault with all the invested amounts and the utilization ratio of the vault
249
274
  * @param vault - the kamino vault to get available liquidity to withdraw for
250
275
  * @param slot - current slot
251
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
276
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
252
277
  * @returns an VaultReserveTotalBorrowedAndInvested object with the total invested amount, total borrowed amount and the utilization ratio of the vault
253
278
  */
254
- getTotalBorrowedAndInvested(vault: VaultState, slot: number, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<VaultReserveTotalBorrowedAndInvested>;
279
+ getTotalBorrowedAndInvested(vault: VaultState, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<VaultReserveTotalBorrowedAndInvested>;
255
280
  /**
256
281
  * This will return an overview of each reserve that is part of the vault allocation
257
282
  * @param vault - the kamino vault to get available liquidity to withdraw for
258
283
  * @param slot - current slot
259
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
284
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
260
285
  * @returns a hashmap from vault reserve pubkey to ReserveOverview object
261
286
  */
262
287
  getVaultReservesDetails(vault: VaultState, slot: number, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<PubkeyHashMap<PublicKey, ReserveOverview>>;
@@ -264,30 +289,32 @@ export declare class KaminoVaultClient {
264
289
  * This will return the APY of the vault under the assumption that all the available tokens in the vault are all the time invested in the reserves as ratio; for percentage it needs multiplication by 100
265
290
  * @param vault - the kamino vault to get APY for
266
291
  * @param slot - current slot
267
- * @param vaultReserves - optional parameter; a hashmap from each reserve pubkey to the reserve state. If provided the function will be significantly faster as it will not have to fetch the reserves
292
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
268
293
  * @returns APY for the vault
269
294
  */
270
- getVaultTheoreticalAPY(vault: VaultState, slot: number, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<Decimal>;
295
+ getVaultTheoreticalAPY(vault: VaultState, slot: number, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<Decimal>;
271
296
  /**
272
297
  * Retrive the total amount of interest earned by the vault since its inception, including what was charged as fees
273
298
  * @param vaultState the kamino vault state to get total net yield for
274
- * @returns a decimal representing the net number of tokens earned by the vault since its inception
299
+ * @returns a Decimal representing the net number of tokens earned by the vault since its inception
275
300
  */
276
301
  getVaultCumulativeInterest(vaultState: VaultState): Promise<Decimal>;
277
302
  /**
278
303
  * Simulate the current holdings of the vault and the earned interest
279
304
  * @param vaultState the kamino vault state to get simulated holdings and earnings for
280
- * @param vaultReserves optional; the state of the reserves in the vault allocation
305
+ * @param [vaultReservesMap] - hashmap from each reserve pubkey to the reserve state. Optional. If provided the function will be significantly faster as it will not have to fetch the reserves
306
+ * @param [currentSlot] - the current slot. Optional. If not provided it will fetch the current slot
281
307
  * @returns a struct of simulated vault holdings and earned interest
282
308
  */
283
- calculateSimulatedHoldingsWithInterest(vaultState: VaultState, vaultReserves?: PubkeyHashMap<PublicKey, KaminoReserve>): Promise<SimulatedVaultHoldingsWithEarnedInterest>;
309
+ calculateSimulatedHoldingsWithInterest(vaultState: VaultState, vaultReservesMap?: PubkeyHashMap<PublicKey, KaminoReserve>, currentSlot?: number): Promise<SimulatedVaultHoldingsWithEarnedInterest>;
284
310
  /**
285
311
  * Simulate the current holdings and compute the fees that would be charged
286
312
  * @param vaultState the kamino vault state to get simulated fees for
287
- * @param simulatedCurrentHoldingsWithInterest optional; the simulated holdings and interest earned by the vault
288
- * @returns a struct of simulated management and interest fees
313
+ * @param [simulatedCurrentHoldingsWithInterest] the simulated holdings and interest earned by the vault. Optional
314
+ * @param [currentTimestamp] the current timestamp. Optional. If not provided it will fetch the current unix timestamp
315
+ * @returns a VaultFees struct of simulated management and interest fees
289
316
  */
290
- calculateSimulatedFees(vaultState: VaultState, simulatedCurrentHoldingsWithInterest?: SimulatedVaultHoldingsWithEarnedInterest): Promise<VaultFees>;
317
+ calculateSimulatedFees(vaultState: VaultState, simulatedCurrentHoldingsWithInterest?: SimulatedVaultHoldingsWithEarnedInterest, currentTimestamp?: number): Promise<VaultFees>;
291
318
  }
292
319
  export declare class KaminoVault {
293
320
  readonly address: PublicKey;
@@ -296,6 +323,7 @@ export declare class KaminoVault {
296
323
  constructor(vaultAddress: PublicKey, state?: VaultState, programId?: PublicKey);
297
324
  getState(connection: Connection): Promise<VaultState>;
298
325
  reloadState(connection: Connection): Promise<VaultState>;
326
+ hasFarm(connection: Connection): Promise<boolean>;
299
327
  }
300
328
  /**
301
329
  * Used to initialize a Kamino Vault
@@ -1 +1 @@
1
- {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/classes/vault.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAEV,OAAO,EACP,SAAS,EAIT,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,YAAY,EACZ,aAAa,EAEb,aAAa,EAC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