@kamino-finance/klend-sdk 5.0.4 → 5.0.6

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 (239) hide show
  1. package/dist/classes/fraction.d.ts.map +1 -1
  2. package/dist/classes/fraction.js.map +1 -1
  3. package/dist/classes/manager.d.ts +38 -4
  4. package/dist/classes/manager.d.ts.map +1 -1
  5. package/dist/classes/manager.js +112 -5
  6. package/dist/classes/manager.js.map +1 -1
  7. package/dist/classes/market.d.ts +4 -0
  8. package/dist/classes/market.d.ts.map +1 -1
  9. package/dist/classes/market.js +17 -25
  10. package/dist/classes/market.js.map +1 -1
  11. package/dist/classes/obligation.d.ts +3 -4
  12. package/dist/classes/obligation.d.ts.map +1 -1
  13. package/dist/classes/obligation.js +96 -27
  14. package/dist/classes/obligation.js.map +1 -1
  15. package/dist/classes/reserve.d.ts +2 -1
  16. package/dist/classes/reserve.d.ts.map +1 -1
  17. package/dist/classes/reserve.js +32 -29
  18. package/dist/classes/reserve.js.map +1 -1
  19. package/dist/classes/utils.d.ts +3 -0
  20. package/dist/classes/utils.d.ts.map +1 -1
  21. package/dist/classes/utils.js +30 -0
  22. package/dist/classes/utils.js.map +1 -1
  23. package/dist/classes/vault.d.ts +12 -8
  24. package/dist/classes/vault.d.ts.map +1 -1
  25. package/dist/classes/vault.js +94 -66
  26. package/dist/classes/vault.js.map +1 -1
  27. package/dist/client_kamino_manager.d.ts.map +1 -1
  28. package/dist/client_kamino_manager.js +15 -1
  29. package/dist/client_kamino_manager.js.map +1 -1
  30. package/dist/idl.json +27 -2
  31. package/dist/idl_codegen/accounts/LendingMarket.d.ts +6 -0
  32. package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
  33. package/dist/idl_codegen/accounts/LendingMarket.js +8 -1
  34. package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
  35. package/dist/idl_codegen/accounts/Obligation.d.ts +3 -12
  36. package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -1
  37. package/dist/idl_codegen/accounts/Obligation.js +1 -4
  38. package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
  39. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +20 -0
  40. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +1 -1
  41. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +33 -1
  42. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -1
  43. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +13 -0
  44. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
  45. package/dist/idl_codegen/types/UpdateLendingMarketMode.js +25 -1
  46. package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
  47. package/dist/idl_codegen/types/index.d.ts +4 -4
  48. package/dist/idl_codegen/types/index.d.ts.map +1 -1
  49. package/dist/idl_codegen/types/index.js.map +1 -1
  50. package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +3 -3
  51. package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -1
  52. package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +22 -18
  53. package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -1
  54. package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +45 -15
  55. package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -1
  56. package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +101 -39
  57. package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
  58. package/dist/idl_codegen_kamino_vault/accounts/index.d.ts +4 -4
  59. package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -1
  60. package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -1
  61. package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -1
  62. package/dist/idl_codegen_kamino_vault/errors/anchor.js +162 -162
  63. package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -1
  64. package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +144 -32
  65. package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -1
  66. package/dist/idl_codegen_kamino_vault/errors/custom.js +305 -109
  67. package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -1
  68. package/dist/idl_codegen_kamino_vault/errors/index.d.ts +3 -3
  69. package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -1
  70. package/dist/idl_codegen_kamino_vault/errors/index.js +7 -2
  71. package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -1
  72. package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +4 -2
  73. package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -1
  74. package/dist/idl_codegen_kamino_vault/instructions/deposit.js +3 -1
  75. package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -1
  76. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +13 -0
  77. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +1 -0
  78. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +47 -0
  79. package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +1 -0
  80. package/dist/idl_codegen_kamino_vault/instructions/index.d.ts +18 -10
  81. package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -1
  82. package/dist/idl_codegen_kamino_vault/instructions/index.js +9 -1
  83. package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -1
  84. package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +2 -1
  85. package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -1
  86. package/dist/idl_codegen_kamino_vault/instructions/initVault.js +1 -0
  87. package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -1
  88. package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +6 -2
  89. package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -1
  90. package/dist/idl_codegen_kamino_vault/instructions/invest.js +9 -1
  91. package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -1
  92. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +7 -0
  93. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +1 -0
  94. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +16 -0
  95. package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +1 -0
  96. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +2 -2
  97. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -1
  98. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +1 -1
  99. package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -1
  100. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +14 -0
  101. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +1 -0
  102. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +52 -0
  103. package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +1 -0
  104. package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +4 -2
  105. package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -1
  106. package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +8 -2
  107. package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -1
  108. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +23 -0
  109. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +1 -0
  110. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +51 -0
  111. package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +1 -0
  112. package/dist/idl_codegen_kamino_vault/programId.d.ts +1 -1
  113. package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -1
  114. package/dist/idl_codegen_kamino_vault/programId.js +1 -1
  115. package/dist/idl_codegen_kamino_vault/programId.js.map +1 -1
  116. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +2 -2
  117. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -1
  118. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js +4 -1
  119. package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -1
  120. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +1 -1
  121. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -1
  122. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js +1 -1
  123. package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -1
  124. package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +1 -1
  125. package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -1
  126. package/dist/idl_codegen_kamino_vault/types/CurvePoint.js +1 -1
  127. package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -1
  128. package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +2 -2
  129. package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -1
  130. package/dist/idl_codegen_kamino_vault/types/LastUpdate.js +6 -1
  131. package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -1
  132. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +2 -2
  133. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -1
  134. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js +1 -1
  135. package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -1
  136. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +2 -2
  137. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -1
  138. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +1 -1
  139. package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -1
  140. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +3 -3
  141. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -1
  142. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +5 -5
  143. package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -1
  144. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +27 -24
  145. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -1
  146. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js +59 -53
  147. package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -1
  148. package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +2 -2
  149. package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -1
  150. package/dist/idl_codegen_kamino_vault/types/ReserveFees.js +5 -1
  151. package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -1
  152. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +11 -3
  153. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -1
  154. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +25 -17
  155. package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -1
  156. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +2 -2
  157. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -1
  158. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +3 -3
  159. package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -1
  160. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +2 -2
  161. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -1
  162. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +1 -1
  163. package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -1
  164. package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +3 -3
  165. package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -1
  166. package/dist/idl_codegen_kamino_vault/types/TokenInfo.js +11 -11
  167. package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -1
  168. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +18 -8
  169. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -1
  170. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +27 -13
  171. package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -1
  172. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +110 -0
  173. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -0
  174. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +242 -0
  175. package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -0
  176. package/dist/idl_codegen_kamino_vault/types/index.d.ts +34 -30
  177. package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -1
  178. package/dist/idl_codegen_kamino_vault/types/index.js +26 -1
  179. package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -1
  180. package/dist/utils/ObligationType.d.ts.map +1 -1
  181. package/dist/utils/ObligationType.js.map +1 -1
  182. package/dist/utils/managerTypes.d.ts.map +1 -1
  183. package/dist/utils/managerTypes.js.map +1 -1
  184. package/dist/utils/pubkey.d.ts.map +1 -1
  185. package/dist/utils/pubkey.js.map +1 -1
  186. package/dist/utils/rpc.d.ts.map +1 -1
  187. package/dist/utils/rpc.js +2 -1
  188. package/dist/utils/rpc.js.map +1 -1
  189. package/package.json +2 -1
  190. package/src/classes/fraction.ts +5 -0
  191. package/src/classes/manager.ts +136 -5
  192. package/src/classes/market.ts +19 -2
  193. package/src/classes/obligation.ts +141 -30
  194. package/src/classes/reserve.ts +70 -41
  195. package/src/classes/utils.ts +30 -0
  196. package/src/classes/vault.ts +123 -49
  197. package/src/client_kamino_manager.ts +19 -1
  198. package/src/idl_codegen/accounts/LendingMarket.ts +12 -1
  199. package/src/idl_codegen/accounts/Obligation.ts +3 -12
  200. package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +43 -0
  201. package/src/idl_codegen/types/UpdateLendingMarketMode.ts +30 -0
  202. package/src/idl_codegen/types/index.ts +4 -0
  203. package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +132 -105
  204. package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +217 -124
  205. package/src/idl_codegen_kamino_vault/accounts/index.ts +4 -4
  206. package/src/idl_codegen_kamino_vault/errors/anchor.ts +335 -326
  207. package/src/idl_codegen_kamino_vault/errors/custom.ts +353 -157
  208. package/src/idl_codegen_kamino_vault/errors/index.ts +35 -22
  209. package/src/idl_codegen_kamino_vault/instructions/deposit.ts +33 -25
  210. package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +40 -0
  211. package/src/idl_codegen_kamino_vault/instructions/index.ts +27 -10
  212. package/src/idl_codegen_kamino_vault/instructions/initVault.ts +25 -20
  213. package/src/idl_codegen_kamino_vault/instructions/invest.ts +40 -25
  214. package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +24 -0
  215. package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +24 -24
  216. package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +49 -0
  217. package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +45 -33
  218. package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +75 -0
  219. package/src/idl_codegen_kamino_vault/programId.ts +5 -3
  220. package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +24 -18
  221. package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +21 -16
  222. package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +21 -18
  223. package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +32 -27
  224. package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +25 -22
  225. package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +14 -14
  226. package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +35 -35
  227. package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +232 -191
  228. package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +27 -23
  229. package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +116 -98
  230. package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +25 -25
  231. package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +21 -18
  232. package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +92 -74
  233. package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +67 -49
  234. package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +270 -0
  235. package/src/idl_codegen_kamino_vault/types/index.ts +77 -30
  236. package/src/utils/ObligationType.ts +6 -0
  237. package/src/utils/managerTypes.ts +1 -0
  238. package/src/utils/pubkey.ts +2 -0
  239. package/src/utils/rpc.ts +3 -1
@@ -23,6 +23,8 @@ import {
23
23
  WRAPPED_SOL_MINT,
24
24
  } from '../lib';
25
25
  import {
26
+ // closeVault,
27
+ // CloseVaultAccounts,
26
28
  DepositAccounts,
27
29
  DepositArgs,
28
30
  initVault,
@@ -44,6 +46,8 @@ import { PROGRAM_ID } from '../idl_codegen/programId';
44
46
  import { DEFAULT_RECENT_SLOT_DURATION_MS, ReserveWithAddress } from './reserve';
45
47
  import { Fraction } from './fraction';
46
48
  import { lendingMarketAuthPda } from '../utils/seeds';
49
+ import bs58 from 'bs58';
50
+ import { getProgramAccounts } from '../utils/rpc';
47
51
 
48
52
  export const kaminoVaultId = new PublicKey('kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr');
49
53
 
@@ -124,6 +128,7 @@ export class KaminoVaultClient {
124
128
  systemProgram: SystemProgram.programId,
125
129
  rent: SYSVAR_RENT_PUBKEY,
126
130
  tokenProgram: vaultConfig.tokenMintProgramId,
131
+ sharesTokenProgram: TOKEN_PROGRAM_ID,
127
132
  };
128
133
  const initVaultIx = initVault(initVaultAccounts, this._kaminoVaultProgramId);
129
134
 
@@ -145,7 +150,11 @@ export class KaminoVaultClient {
145
150
  const vaultState: VaultState = await vault.getState(this.getConnection());
146
151
  const reserveState: Reserve = reserveAllocationConfig.getReserveState();
147
152
 
148
- const cTokenVault = getCTokenVaultPda(reserveAllocationConfig.getReserveAddress(), this._kaminoVaultProgramId);
153
+ const cTokenVault = getCTokenVaultPda(
154
+ vault.address,
155
+ reserveAllocationConfig.getReserveAddress(),
156
+ this._kaminoVaultProgramId
157
+ );
149
158
 
150
159
  const updateReserveAllocationAccounts: UpdateReserveAllocationAccounts = {
151
160
  adminAuthority: vaultState.adminAuthority,
@@ -171,6 +180,17 @@ export class KaminoVaultClient {
171
180
  );
172
181
  }
173
182
 
183
+ // async closeVaultIx(vault: KaminoVault): Promise<TransactionInstruction> {
184
+ // const vaultState: VaultState = await vault.getState(this.getConnection());
185
+
186
+ // const closeVaultAccounts: CloseVaultAccounts = {
187
+ // adminAuthority: vaultState.adminAuthority,
188
+ // vaultState: vault.address,
189
+ // };
190
+
191
+ // return closeVault(closeVaultAccounts, this._kaminoVaultProgramId);
192
+ // }
193
+
174
194
  /**
175
195
  * 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
176
196
  * @param user - user to deposit
@@ -225,6 +245,8 @@ export class KaminoVaultClient {
225
245
  userSharesAta: userSharesAta,
226
246
  tokenProgram: TOKEN_PROGRAM_ID,
227
247
  instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
248
+ klendProgram: this._kaminoLendProgramId,
249
+ sharesTokenProgram: TOKEN_PROGRAM_ID,
228
250
  };
229
251
 
230
252
  const depositArgs: DepositArgs = {
@@ -235,10 +257,24 @@ export class KaminoVaultClient {
235
257
 
236
258
  const vaultReserves = this.getVaultReserves(vaultState);
237
259
 
238
- const vaultReservesAccountMetas: AccountMeta[] = vaultReserves.map((reserve) => {
239
- return { pubkey: reserve, isSigner: false, isWritable: false };
260
+ const vaultReservesState = await this.loadVaultReserves(vaultState);
261
+
262
+ let vaultReservesAccountMetas: AccountMeta[] = [];
263
+ let vaultReservesLendingMarkets: AccountMeta[] = [];
264
+ vaultReserves.forEach((reserve) => {
265
+ const reserveState = vaultReservesState.get(reserve);
266
+ if (reserveState === undefined) {
267
+ throw new Error(`Reserve ${reserve.toBase58()} not found`);
268
+ }
269
+ vaultReservesAccountMetas = vaultReservesAccountMetas.concat([
270
+ { pubkey: reserve, isSigner: false, isWritable: true },
271
+ ]);
272
+ vaultReservesLendingMarkets = vaultReservesLendingMarkets.concat([
273
+ { pubkey: reserveState.state.lendingMarket, isSigner: false, isWritable: false },
274
+ ]);
240
275
  });
241
276
  depositIx.keys = depositIx.keys.concat(vaultReservesAccountMetas);
277
+ depositIx.keys = depositIx.keys.concat(vaultReservesLendingMarkets);
242
278
 
243
279
  return [...createAtasIxns, depositIx, ...closeAtasIxns];
244
280
  }
@@ -341,7 +377,7 @@ export class KaminoVaultClient {
341
377
  * @param kaminoVault - vault to invest from
342
378
  * @returns - an array of invest instructions for each invest action required for the vault reserves
343
379
  */
344
- async investAllReservesIxs(vault: KaminoVault): Promise<TransactionInstruction[]> {
380
+ async investAllReservesIxs(payer: PublicKey, vault: KaminoVault): Promise<TransactionInstruction[]> {
345
381
  //TODO: Order invest ixns by - invest that removes first, then invest that adds
346
382
 
347
383
  const vaultState = await vault.getState(this._connection);
@@ -352,7 +388,7 @@ export class KaminoVaultClient {
352
388
  if (reserveState === null) {
353
389
  throw new Error(`Reserve ${reserve.toBase58()} not found`);
354
390
  }
355
- investIxns.push(await this.investSingleReserveIxs(vault, { address: reserve, state: reserveState }));
391
+ investIxns.push(await this.investSingleReserveIxs(payer, vault, { address: reserve, state: reserveState }));
356
392
  }
357
393
 
358
394
  return investIxns;
@@ -364,14 +400,21 @@ export class KaminoVaultClient {
364
400
  * @param reserve - reserve to invest into or disinvest from
365
401
  * @returns - an array of invest instructions for each invest action required for the vault reserves
366
402
  */
367
- async investSingleReserveIxs(vault: KaminoVault, reserve: ReserveWithAddress): Promise<TransactionInstruction> {
403
+ async investSingleReserveIxs(
404
+ payer: PublicKey,
405
+ vault: KaminoVault,
406
+ reserve: ReserveWithAddress
407
+ ): Promise<TransactionInstruction> {
368
408
  const vaultState = await vault.getState(this._connection);
369
409
 
370
- const cTokenVault = getCTokenVaultPda(reserve.address, this._kaminoVaultProgramId);
410
+ const cTokenVault = getCTokenVaultPda(vault.address, reserve.address, this._kaminoVaultProgramId);
371
411
  const lendingMarketAuth = lendingMarketAuthPda(reserve.state.lendingMarket, this._kaminoLendProgramId)[0];
372
412
 
413
+ // todo: create ata if needed here
414
+ const payerTokenAta = getAssociatedTokenAddress(vaultState.tokenMint, payer);
415
+
373
416
  const investAccounts: InvestAccounts = {
374
- adminAuthority: vaultState.adminAuthority,
417
+ payer,
375
418
  vaultState: vault.address,
376
419
  tokenVault: vaultState.tokenVault,
377
420
  baseVaultAuthority: vaultState.baseVaultAuthority,
@@ -385,6 +428,10 @@ export class KaminoVaultClient {
385
428
  klendProgram: this._kaminoLendProgramId,
386
429
  instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
387
430
  tokenProgram: TOKEN_PROGRAM_ID,
431
+ payerTokenAccount: payerTokenAta,
432
+ tokenMint: vaultState.tokenMint,
433
+ reserveCollateralTokenProgram: TOKEN_PROGRAM_ID,
434
+ sharesTokenProgram: TOKEN_PROGRAM_ID,
388
435
  };
389
436
 
390
437
  const investIx = invest(investAccounts, this._kaminoVaultProgramId);
@@ -398,7 +445,7 @@ export class KaminoVaultClient {
398
445
  return investIx;
399
446
  }
400
447
 
401
- private withdrawIxn(
448
+ private async withdrawIxn(
402
449
  user: PublicKey,
403
450
  vault: KaminoVault,
404
451
  vaultState: VaultState,
@@ -407,7 +454,7 @@ export class KaminoVaultClient {
407
454
  userSharesAta: PublicKey,
408
455
  userTokenAta: PublicKey,
409
456
  shareAmountLamports: Decimal
410
- ): TransactionInstruction {
457
+ ): Promise<TransactionInstruction> {
411
458
  const lendingMarketAuth = lendingMarketAuthPda(marketWithAddress.address, this._kaminoLendProgramId)[0];
412
459
 
413
460
  const withdrawAccounts: WithdrawAccounts = {
@@ -422,13 +469,15 @@ export class KaminoVaultClient {
422
469
  tokenProgram: TOKEN_PROGRAM_ID,
423
470
  instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
424
471
  reserve: reserve.address,
425
- ctokenVault: getCTokenVaultPda(reserve.address, this._kaminoVaultProgramId),
472
+ ctokenVault: getCTokenVaultPda(vault.address, reserve.address, this._kaminoVaultProgramId),
426
473
  /** CPI accounts */
427
474
  lendingMarket: marketWithAddress.address,
428
475
  lendingMarketAuthority: lendingMarketAuth,
429
476
  reserveLiquiditySupply: reserve.state.liquidity.supplyVault,
430
477
  reserveCollateralMint: reserve.state.collateral.mintPubkey,
431
478
  klendProgram: this._kaminoLendProgramId,
479
+ reserveCollateralTokenProgram: TOKEN_PROGRAM_ID,
480
+ sharesTokenProgram: TOKEN_PROGRAM_ID,
432
481
  };
433
482
 
434
483
  const withdrawArgs: WithdrawArgs = {
@@ -438,10 +487,26 @@ export class KaminoVaultClient {
438
487
  const withdrawIxn = withdraw(withdrawArgs, withdrawAccounts, this._kaminoVaultProgramId);
439
488
 
440
489
  const vaultReserves = this.getVaultReserves(vaultState);
441
- const vaultReservesAccountMetas: AccountMeta[] = vaultReserves.map((reserve) => {
442
- return { pubkey: reserve, isSigner: false, isWritable: false };
490
+ const vaultReservesState = await this.loadVaultReserves(vaultState);
491
+
492
+ let vaultReservesAccountMetas: AccountMeta[] = [];
493
+ let vaultReservesLendingMarkets: AccountMeta[] = [];
494
+
495
+ vaultReserves.forEach((reserve) => {
496
+ const reserveState = vaultReservesState.get(reserve);
497
+ if (reserveState === undefined) {
498
+ throw new Error(`Reserve ${reserve.toBase58()} not found`);
499
+ }
500
+
501
+ vaultReservesAccountMetas = vaultReservesAccountMetas.concat([
502
+ { pubkey: reserve, isSigner: false, isWritable: true },
503
+ ]);
504
+ vaultReservesLendingMarkets = vaultReservesLendingMarkets.concat([
505
+ { pubkey: reserveState.state.lendingMarket, isSigner: false, isWritable: false },
506
+ ]);
443
507
  });
444
508
  withdrawIxn.keys = withdrawIxn.keys.concat(vaultReservesAccountMetas);
509
+ withdrawIxn.keys = withdrawIxn.keys.concat(vaultReservesLendingMarkets);
445
510
 
446
511
  return withdrawIxn;
447
512
  }
@@ -590,6 +655,44 @@ export class KaminoVaultClient {
590
655
  return vaultTokensPerShare;
591
656
  }
592
657
 
658
+ /**
659
+ * Get all vaults
660
+ * @returns an array of all vaults
661
+ */
662
+ async getAllVaults(): Promise<KaminoVault[]> {
663
+ const filters = [
664
+ {
665
+ dataSize: VaultState.layout.span + 8,
666
+ },
667
+ {
668
+ memcmp: {
669
+ offset: 0,
670
+ bytes: bs58.encode(VaultState.discriminator),
671
+ },
672
+ },
673
+ ];
674
+
675
+ const [kaminoVaults] = await Promise.all([
676
+ getProgramAccounts(this._connection, this._kaminoVaultProgramId, {
677
+ commitment: this._connection.commitment ?? 'processed',
678
+ filters,
679
+ }),
680
+ ]);
681
+
682
+ return kaminoVaults.map((kaminoVault) => {
683
+ if (kaminoVault.account === null) {
684
+ throw new Error(`kaminoVault with pubkey ${kaminoVault.pubkey.toString()} does not exist`);
685
+ }
686
+
687
+ const kaminoVaultAccount = VaultState.decode(kaminoVault.account.data);
688
+ if (!kaminoVaultAccount) {
689
+ throw Error(`kaminoVault with pubkey ${kaminoVault.pubkey.toString()} could not be decoded`);
690
+ }
691
+
692
+ return new KaminoVault(kaminoVault.pubkey, kaminoVaultAccount, this._kaminoVaultProgramId);
693
+ });
694
+ }
695
+
593
696
  /**
594
697
  * 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
595
698
  * @param vault - the kamino vault to get available liquidity to withdraw for
@@ -673,40 +776,6 @@ export class KaminoVaultClient {
673
776
 
674
777
  return kaminoReserves;
675
778
  }
676
-
677
- /**
678
- * Get all vaults
679
- * @returns an array of all vaults
680
- */
681
- async getAllVaults(): Promise<KaminoVault[]> {
682
- const { getProgramAccounts } = await import('../utils/rpc');
683
- const filters = [
684
- {
685
- dataSize: VaultState.layout.span + 8,
686
- },
687
- ];
688
-
689
- const [, kaminoVaults] = await Promise.all([
690
- this._connection.getSlot(),
691
- getProgramAccounts(this._connection, this._kaminoVaultProgramId, {
692
- commitment: this._connection.commitment ?? 'processed',
693
- filters,
694
- }),
695
- ]);
696
-
697
- return kaminoVaults.map((kaminoVault) => {
698
- if (kaminoVault.account === null) {
699
- throw new Error('Invalid account');
700
- }
701
-
702
- const kaminoVaultAccount = VaultState.decode(kaminoVault.account.data);
703
- if (!kaminoVaultAccount) {
704
- throw Error('Could not parse obligation.');
705
- }
706
-
707
- return new KaminoVault(kaminoVault.pubkey, kaminoVaultAccount, this._kaminoVaultProgramId);
708
- });
709
- }
710
779
  } // KaminoVaultClient
711
780
 
712
781
  export class KaminoVault {
@@ -804,9 +873,14 @@ export class ReserveAllocationConfig {
804
873
  }
805
874
  }
806
875
 
807
- export function getCTokenVaultPda(reserveAddress: PublicKey, kaminoVaultProgramId: PublicKey) {
876
+ export function getCTokenVaultPda(vaultAddress: PublicKey, reserveAddress: PublicKey, kaminoVaultProgramId: PublicKey) {
808
877
  return PublicKey.findProgramAddressSync(
809
- [Buffer.from(CTOKEN_VAULT_SEED), reserveAddress.toBytes()],
878
+ [Buffer.from(CTOKEN_VAULT_SEED), vaultAddress.toBytes(), reserveAddress.toBytes()],
810
879
  kaminoVaultProgramId
811
880
  )[0];
812
881
  }
882
+
883
+ export type VaultHolder = {
884
+ holderPubkey: PublicKey;
885
+ amount: Decimal;
886
+ };
@@ -87,7 +87,7 @@ async function main() {
87
87
 
88
88
  commands
89
89
  .command('add-asset-to-market')
90
- .requiredOption('--market <string>', 'Market addres to add asset to')
90
+ .requiredOption('--market <string>', 'Market address to add asset to')
91
91
  .requiredOption('--mint <string>', 'Reserve liquidity token mint')
92
92
  .requiredOption('--mint-program-id <string>', 'Reserve liquidity token mint program id')
93
93
  .requiredOption('--reserve-config-path <string>', 'Path for the reserve config')
@@ -296,6 +296,24 @@ async function main() {
296
296
  mode === 'execute' && console.log('Vault allocation updated:', updateVaultAllocationSig);
297
297
  });
298
298
 
299
+ // commands
300
+ // .command('close-vault')
301
+ // .requiredOption('--vault <string>', 'Vault address')
302
+ // .option(`--staging`, 'If true, will use the staging programs')
303
+ // .action(async ({vault, staging}) => {
304
+ // console.log("silviuuuu vault", vault);
305
+ // const env = initializeClient(false, staging);
306
+ // const vaultAddress = new PublicKey(vault);
307
+
308
+ // const kaminoManager = new KaminoManager(env.connection, env.kLendProgramId, env.kVaultProgramId);
309
+
310
+ // const kaminoVault = new KaminoVault(vaultAddress, undefined, env.kVaultProgramId);
311
+ // const instructions = await kaminoManager.closeVault(kaminoVault);
312
+
313
+ // const closeVaultSig = await processTxn(env.client, env.payer, [instructions], 'execute', 2500, []);
314
+ // console.log('Vault closed:', closeVaultSig);
315
+ // });
316
+
299
317
  commands.command('get-oracle-mappings').action(async () => {
300
318
  const env = initializeClient(false, false);
301
319
  const kaminoManager = new KaminoManager(env.connection, env.kLendProgramId, env.kVaultProgramId);
@@ -51,6 +51,8 @@ export interface LendingMarketFields {
51
51
  /** Min net value accepted to be found in a position after any lending action in an obligation (scaled by quote currency decimals) */
52
52
  minNetValueInObligationSf: BN
53
53
  minValueSkipLiquidationLtvBfChecks: BN
54
+ /** Market name, zero-padded. */
55
+ name: Array<number>
54
56
  padding1: Array<BN>
55
57
  }
56
58
 
@@ -101,6 +103,8 @@ export interface LendingMarketJSON {
101
103
  /** Min net value accepted to be found in a position after any lending action in an obligation (scaled by quote currency decimals) */
102
104
  minNetValueInObligationSf: string
103
105
  minValueSkipLiquidationLtvBfChecks: string
106
+ /** Market name, zero-padded. */
107
+ name: Array<number>
104
108
  padding1: Array<string>
105
109
  }
106
110
 
@@ -151,6 +155,8 @@ export class LendingMarket {
151
155
  /** Min net value accepted to be found in a position after any lending action in an obligation (scaled by quote currency decimals) */
152
156
  readonly minNetValueInObligationSf: BN
153
157
  readonly minValueSkipLiquidationLtvBfChecks: BN
158
+ /** Market name, zero-padded. */
159
+ readonly name: Array<number>
154
160
  readonly padding1: Array<BN>
155
161
 
156
162
  static readonly discriminator = Buffer.from([
@@ -180,7 +186,8 @@ export class LendingMarket {
180
186
  borsh.array(borsh.u64(), 90, "elevationGroupPadding"),
181
187
  borsh.u128("minNetValueInObligationSf"),
182
188
  borsh.u64("minValueSkipLiquidationLtvBfChecks"),
183
- borsh.array(borsh.u64(), 177, "padding1"),
189
+ borsh.array(borsh.u8(), 32, "name"),
190
+ borsh.array(borsh.u64(), 173, "padding1"),
184
191
  ])
185
192
 
186
193
  constructor(fields: LendingMarketFields) {
@@ -212,6 +219,7 @@ export class LendingMarket {
212
219
  this.minNetValueInObligationSf = fields.minNetValueInObligationSf
213
220
  this.minValueSkipLiquidationLtvBfChecks =
214
221
  fields.minValueSkipLiquidationLtvBfChecks
222
+ this.name = fields.name
215
223
  this.padding1 = fields.padding1
216
224
  }
217
225
 
@@ -287,6 +295,7 @@ export class LendingMarket {
287
295
  minNetValueInObligationSf: dec.minNetValueInObligationSf,
288
296
  minValueSkipLiquidationLtvBfChecks:
289
297
  dec.minValueSkipLiquidationLtvBfChecks,
298
+ name: dec.name,
290
299
  padding1: dec.padding1,
291
300
  })
292
301
  }
@@ -320,6 +329,7 @@ export class LendingMarket {
320
329
  minNetValueInObligationSf: this.minNetValueInObligationSf.toString(),
321
330
  minValueSkipLiquidationLtvBfChecks:
322
331
  this.minValueSkipLiquidationLtvBfChecks.toString(),
332
+ name: this.name,
323
333
  padding1: this.padding1.map((item) => item.toString()),
324
334
  }
325
335
  }
@@ -358,6 +368,7 @@ export class LendingMarket {
358
368
  minValueSkipLiquidationLtvBfChecks: new BN(
359
369
  obj.minValueSkipLiquidationLtvBfChecks
360
370
  ),
371
+ name: obj.name,
361
372
  padding1: obj.padding1.map((item) => new BN(item)),
362
373
  })
363
374
  }
@@ -13,10 +13,7 @@ export interface ObligationFields {
13
13
  lendingMarket: PublicKey
14
14
  /** Owner authority which can borrow liquidity */
15
15
  owner: PublicKey
16
- /**
17
- * TODO: Does this break the stack size when copied onto the stack, if too big?
18
- * Deposited collateral for the obligation, unique by deposit reserve address
19
- */
16
+ /** Deposited collateral for the obligation, unique by deposit reserve address */
20
17
  deposits: Array<types.ObligationCollateralFields>
21
18
  /** Worst LTV for the collaterals backing the loan, represented as a percentage */
22
19
  lowestReserveDepositLiquidationLtv: BN
@@ -60,10 +57,7 @@ export interface ObligationJSON {
60
57
  lendingMarket: string
61
58
  /** Owner authority which can borrow liquidity */
62
59
  owner: string
63
- /**
64
- * TODO: Does this break the stack size when copied onto the stack, if too big?
65
- * Deposited collateral for the obligation, unique by deposit reserve address
66
- */
60
+ /** Deposited collateral for the obligation, unique by deposit reserve address */
67
61
  deposits: Array<types.ObligationCollateralJSON>
68
62
  /** Worst LTV for the collaterals backing the loan, represented as a percentage */
69
63
  lowestReserveDepositLiquidationLtv: string
@@ -108,10 +102,7 @@ export class Obligation {
108
102
  readonly lendingMarket: PublicKey
109
103
  /** Owner authority which can borrow liquidity */
110
104
  readonly owner: PublicKey
111
- /**
112
- * TODO: Does this break the stack size when copied onto the stack, if too big?
113
- * Deposited collateral for the obligation, unique by deposit reserve address
114
- */
105
+ /** Deposited collateral for the obligation, unique by deposit reserve address */
115
106
  readonly deposits: Array<types.ObligationCollateral>
116
107
  /** Worst LTV for the collaterals backing the loan, represented as a percentage */
117
108
  readonly lowestReserveDepositLiquidationLtv: BN
@@ -283,6 +283,41 @@ export class ElevationGroup {
283
283
  }
284
284
  }
285
285
 
286
+ export type NameFields = [Array<number>]
287
+ export type NameValue = [Array<number>]
288
+
289
+ export interface NameJSON {
290
+ kind: "Name"
291
+ value: [Array<number>]
292
+ }
293
+
294
+ export class Name {
295
+ static readonly discriminator = 8
296
+ static readonly kind = "Name"
297
+ readonly discriminator = 8
298
+ readonly kind = "Name"
299
+ readonly value: NameValue
300
+
301
+ constructor(value: NameFields) {
302
+ this.value = [value[0]]
303
+ }
304
+
305
+ toJSON(): NameJSON {
306
+ return {
307
+ kind: "Name",
308
+ value: [this.value[0]],
309
+ }
310
+ }
311
+
312
+ toEncodable() {
313
+ return {
314
+ Name: {
315
+ _0: this.value[0],
316
+ },
317
+ }
318
+ }
319
+ }
320
+
286
321
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
287
322
  export function fromDecoded(
288
323
  obj: any
@@ -323,6 +358,10 @@ export function fromDecoded(
323
358
  const val = obj["ElevationGroup"]
324
359
  return new ElevationGroup([types.ElevationGroup.fromDecoded(val["_0"])])
325
360
  }
361
+ if ("Name" in obj) {
362
+ const val = obj["Name"]
363
+ return new Name([val["_0"]])
364
+ }
326
365
 
327
366
  throw new Error("Invalid enum object")
328
367
  }
@@ -355,6 +394,9 @@ export function fromJSON(
355
394
  case "ElevationGroup": {
356
395
  return new ElevationGroup([types.ElevationGroup.fromJSON(obj.value[0])])
357
396
  }
397
+ case "Name": {
398
+ return new Name([obj.value[0]])
399
+ }
358
400
  }
359
401
  }
360
402
 
@@ -368,6 +410,7 @@ export function layout(property?: string) {
368
410
  borsh.struct([borsh.u128("_0")], "U128"),
369
411
  borsh.struct([borsh.publicKey("_0")], "Pubkey"),
370
412
  borsh.struct([types.ElevationGroup.layout("_0")], "ElevationGroup"),
413
+ borsh.struct([borsh.array(borsh.u8(), 32, "_0")], "Name"),
371
414
  ])
372
415
  if (property !== undefined) {
373
416
  return ret.replicate(property)
@@ -417,6 +417,29 @@ export class UpdatePaddingFields {
417
417
  }
418
418
  }
419
419
 
420
+ export interface UpdateNameJSON {
421
+ kind: "UpdateName"
422
+ }
423
+
424
+ export class UpdateName {
425
+ static readonly discriminator = 18
426
+ static readonly kind = "UpdateName"
427
+ readonly discriminator = 18
428
+ readonly kind = "UpdateName"
429
+
430
+ toJSON(): UpdateNameJSON {
431
+ return {
432
+ kind: "UpdateName",
433
+ }
434
+ }
435
+
436
+ toEncodable() {
437
+ return {
438
+ UpdateName: {},
439
+ }
440
+ }
441
+ }
442
+
420
443
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
421
444
  export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
422
445
  if (typeof obj !== "object") {
@@ -477,6 +500,9 @@ export function fromDecoded(obj: any): types.UpdateLendingMarketModeKind {
477
500
  if ("UpdatePaddingFields" in obj) {
478
501
  return new UpdatePaddingFields()
479
502
  }
503
+ if ("UpdateName" in obj) {
504
+ return new UpdateName()
505
+ }
480
506
 
481
507
  throw new Error("Invalid enum object")
482
508
  }
@@ -539,6 +565,9 @@ export function fromJSON(
539
565
  case "UpdatePaddingFields": {
540
566
  return new UpdatePaddingFields()
541
567
  }
568
+ case "UpdateName": {
569
+ return new UpdateName()
570
+ }
542
571
  }
543
572
  }
544
573
 
@@ -562,6 +591,7 @@ export function layout(property?: string) {
562
591
  borsh.struct([], "UpdateMinNetValueObligationPostAction"),
563
592
  borsh.struct([], "UpdateMinValueSkipPriorityLiqCheck"),
564
593
  borsh.struct([], "UpdatePaddingFields"),
594
+ borsh.struct([], "UpdateName"),
565
595
  ])
566
596
  if (property !== undefined) {
567
597
  return ret.replicate(property)
@@ -116,6 +116,7 @@ export type UpdateLendingMarketConfigValueKind =
116
116
  | UpdateLendingMarketConfigValue.U128
117
117
  | UpdateLendingMarketConfigValue.Pubkey
118
118
  | UpdateLendingMarketConfigValue.ElevationGroup
119
+ | UpdateLendingMarketConfigValue.Name
119
120
  export type UpdateLendingMarketConfigValueJSON =
120
121
  | UpdateLendingMarketConfigValue.BoolJSON
121
122
  | UpdateLendingMarketConfigValue.U8JSON
@@ -125,6 +126,7 @@ export type UpdateLendingMarketConfigValueJSON =
125
126
  | UpdateLendingMarketConfigValue.U128JSON
126
127
  | UpdateLendingMarketConfigValue.PubkeyJSON
127
128
  | UpdateLendingMarketConfigValue.ElevationGroupJSON
129
+ | UpdateLendingMarketConfigValue.NameJSON
128
130
 
129
131
  export { UpdateLendingMarketMode }
130
132
 
@@ -147,6 +149,7 @@ export type UpdateLendingMarketModeKind =
147
149
  | UpdateLendingMarketMode.UpdateMinNetValueObligationPostAction
148
150
  | UpdateLendingMarketMode.UpdateMinValueSkipPriorityLiqCheck
149
151
  | UpdateLendingMarketMode.UpdatePaddingFields
152
+ | UpdateLendingMarketMode.UpdateName
150
153
  export type UpdateLendingMarketModeJSON =
151
154
  | UpdateLendingMarketMode.UpdateOwnerJSON
152
155
  | UpdateLendingMarketMode.UpdateEmergencyModeJSON
@@ -166,6 +169,7 @@ export type UpdateLendingMarketModeJSON =
166
169
  | UpdateLendingMarketMode.UpdateMinNetValueObligationPostActionJSON
167
170
  | UpdateLendingMarketMode.UpdateMinValueSkipPriorityLiqCheckJSON
168
171
  | UpdateLendingMarketMode.UpdatePaddingFieldsJSON
172
+ | UpdateLendingMarketMode.UpdateNameJSON
169
173
 
170
174
  export { LastUpdate } from "./LastUpdate"
171
175
  export type { LastUpdateFields, LastUpdateJSON } from "./LastUpdate"