@exponent-labs/klend-idl 0.9.24 → 0.9.26

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 (394) hide show
  1. package/build/accounts/GlobalConfig.d.ts +27 -0
  2. package/build/accounts/GlobalConfig.js +112 -0
  3. package/build/accounts/GlobalConfig.js.map +1 -0
  4. package/build/accounts/LendingMarket.d.ts +93 -9
  5. package/build/accounts/LendingMarket.js +202 -20
  6. package/build/accounts/LendingMarket.js.map +1 -1
  7. package/build/accounts/Obligation.d.ts +33 -9
  8. package/build/accounts/Obligation.js +69 -20
  9. package/build/accounts/Obligation.js.map +1 -1
  10. package/build/accounts/ReferrerState.js +7 -2
  11. package/build/accounts/ReferrerState.js.map +1 -1
  12. package/build/accounts/ReferrerTokenState.js +3 -1
  13. package/build/accounts/ReferrerTokenState.js.map +1 -1
  14. package/build/accounts/Reserve.d.ts +3 -0
  15. package/build/accounts/Reserve.js +8 -2
  16. package/build/accounts/Reserve.js.map +1 -1
  17. package/build/accounts/ShortUrl.js +7 -2
  18. package/build/accounts/ShortUrl.js.map +1 -1
  19. package/build/accounts/UserMetadata.js +3 -1
  20. package/build/accounts/UserMetadata.js.map +1 -1
  21. package/build/accounts/UserState.js +3 -1
  22. package/build/accounts/UserState.js.map +1 -1
  23. package/build/accounts/WithdrawTicket.d.ts +49 -0
  24. package/build/accounts/WithdrawTicket.js +158 -0
  25. package/build/accounts/WithdrawTicket.js.map +1 -0
  26. package/build/accounts/index.d.ts +4 -0
  27. package/build/accounts/index.js +5 -1
  28. package/build/accounts/index.js.map +1 -1
  29. package/build/errors/custom.d.ts +605 -13
  30. package/build/errors/custom.js +1063 -26
  31. package/build/errors/custom.js.map +1 -1
  32. package/build/index.d.ts +2 -3
  33. package/build/index.js +3 -7
  34. package/build/index.js.map +1 -1
  35. package/build/instructions/abortObligationOwnershipTransfer.d.ts +7 -0
  36. package/build/instructions/abortObligationOwnershipTransfer.js +21 -0
  37. package/build/instructions/abortObligationOwnershipTransfer.js.map +1 -0
  38. package/build/instructions/acceptObligationOwnership.d.ts +7 -0
  39. package/build/instructions/acceptObligationOwnership.js +21 -0
  40. package/build/instructions/acceptObligationOwnership.js.map +1 -0
  41. package/build/instructions/approveObligationOwnershipTransfer.d.ts +9 -0
  42. package/build/instructions/approveObligationOwnershipTransfer.js +23 -0
  43. package/build/instructions/approveObligationOwnershipTransfer.js.map +1 -0
  44. package/build/instructions/borrowObligationLiquidity.d.ts +1 -1
  45. package/build/instructions/borrowObligationLiquidity.js +9 -2
  46. package/build/instructions/borrowObligationLiquidity.js.map +1 -1
  47. package/build/instructions/borrowObligationLiquidityV2.js +26 -6
  48. package/build/instructions/borrowObligationLiquidityV2.js.map +1 -1
  49. package/build/instructions/calculateCtokenExchangeRate.d.ts +5 -0
  50. package/build/instructions/calculateCtokenExchangeRate.js +15 -0
  51. package/build/instructions/calculateCtokenExchangeRate.js.map +1 -0
  52. package/build/instructions/cancelWithdrawTicket.d.ts +19 -0
  53. package/build/instructions/cancelWithdrawTicket.js +87 -0
  54. package/build/instructions/cancelWithdrawTicket.js.map +1 -0
  55. package/build/instructions/cloneReserveConfig.d.ts +14 -0
  56. package/build/instructions/cloneReserveConfig.js +70 -0
  57. package/build/instructions/cloneReserveConfig.js.map +1 -0
  58. package/build/instructions/deleteReferrerStateAndShortUrl.js.map +1 -1
  59. package/build/instructions/depositAndWithdraw.d.ts +51 -0
  60. package/build/instructions/depositAndWithdraw.js +202 -0
  61. package/build/instructions/depositAndWithdraw.js.map +1 -0
  62. package/build/instructions/depositObligationCollateral.js.map +1 -1
  63. package/build/instructions/depositObligationCollateralV2.d.ts +25 -0
  64. package/build/instructions/depositObligationCollateralV2.js +109 -0
  65. package/build/instructions/depositObligationCollateralV2.js.map +1 -0
  66. package/build/instructions/depositReserveLiquidity.js +1 -1
  67. package/build/instructions/depositReserveLiquidity.js.map +1 -1
  68. package/build/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +1 -1
  69. package/build/instructions/depositReserveLiquidityAndObligationCollateral.js +9 -6
  70. package/build/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -1
  71. package/build/instructions/depositReserveLiquidityAndObligationCollateralV2.js +26 -6
  72. package/build/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +1 -1
  73. package/build/instructions/enqueueToWithdraw.d.ts +26 -0
  74. package/build/instructions/enqueueToWithdraw.js +113 -0
  75. package/build/instructions/enqueueToWithdraw.js.map +1 -0
  76. package/build/instructions/fillBorrowOrder.d.ts +25 -0
  77. package/build/instructions/fillBorrowOrder.js +82 -0
  78. package/build/instructions/fillBorrowOrder.js.map +1 -0
  79. package/build/instructions/fillBorrowOrderV2.d.ts +29 -0
  80. package/build/instructions/fillBorrowOrderV2.js +122 -0
  81. package/build/instructions/fillBorrowOrderV2.js.map +1 -0
  82. package/build/instructions/flashBorrowReserveLiquidity.d.ts +2 -2
  83. package/build/instructions/flashBorrowReserveLiquidity.js +9 -2
  84. package/build/instructions/flashBorrowReserveLiquidity.js.map +1 -1
  85. package/build/instructions/flashRepayReserveLiquidity.d.ts +2 -2
  86. package/build/instructions/flashRepayReserveLiquidity.js +13 -3
  87. package/build/instructions/flashRepayReserveLiquidity.js.map +1 -1
  88. package/build/instructions/idlMissingTypes.d.ts +3 -2
  89. package/build/instructions/idlMissingTypes.js +7 -3
  90. package/build/instructions/idlMissingTypes.js.map +1 -1
  91. package/build/instructions/index.d.ts +61 -3
  92. package/build/instructions/index.js +62 -3
  93. package/build/instructions/index.js.map +1 -1
  94. package/build/instructions/initFarmsForReserve.d.ts +1 -0
  95. package/build/instructions/initFarmsForReserve.js +6 -1
  96. package/build/instructions/initFarmsForReserve.js.map +1 -1
  97. package/build/instructions/initGlobalConfig.d.ts +10 -0
  98. package/build/instructions/initGlobalConfig.js +24 -0
  99. package/build/instructions/initGlobalConfig.js.map +1 -0
  100. package/build/instructions/initLendingMarket.d.ts +1 -0
  101. package/build/instructions/initLendingMarket.js +8 -1
  102. package/build/instructions/initLendingMarket.js.map +1 -1
  103. package/build/instructions/initObligation.js.map +1 -1
  104. package/build/instructions/initObligationFarmsForReserve.js +1 -1
  105. package/build/instructions/initObligationFarmsForReserve.js.map +1 -1
  106. package/build/instructions/initReferrerStateAndShortUrl.js.map +1 -1
  107. package/build/instructions/initReferrerTokenState.d.ts +2 -5
  108. package/build/instructions/initReferrerTokenState.js +3 -42
  109. package/build/instructions/initReferrerTokenState.js.map +1 -1
  110. package/build/instructions/initReserve.d.ts +3 -1
  111. package/build/instructions/initReserve.js +11 -1
  112. package/build/instructions/initReserve.js.map +1 -1
  113. package/build/instructions/initUserMetadata.d.ts +1 -1
  114. package/build/instructions/initUserMetadata.js +8 -5
  115. package/build/instructions/initUserMetadata.js.map +1 -1
  116. package/build/instructions/initiateObligationOwnershipTransfer.d.ts +11 -0
  117. package/build/instructions/initiateObligationOwnershipTransfer.js +61 -0
  118. package/build/instructions/initiateObligationOwnershipTransfer.js.map +1 -0
  119. package/build/instructions/liquidateObligationAndRedeemReserveCollateral.js +2 -2
  120. package/build/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -1
  121. package/build/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +42 -0
  122. package/build/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +172 -0
  123. package/build/instructions/liquidateObligationAndRedeemReserveCollateralV2.js.map +1 -0
  124. package/build/instructions/markObligationForDeleveraging.d.ts +12 -0
  125. package/build/instructions/markObligationForDeleveraging.js +62 -0
  126. package/build/instructions/markObligationForDeleveraging.js.map +1 -0
  127. package/build/instructions/recoverInvalidTicketCollateral.d.ts +20 -0
  128. package/build/instructions/recoverInvalidTicketCollateral.js +89 -0
  129. package/build/instructions/recoverInvalidTicketCollateral.js.map +1 -0
  130. package/build/instructions/redeemFees.js +1 -1
  131. package/build/instructions/redeemFees.js.map +1 -1
  132. package/build/instructions/redeemReserveCollateral.js +1 -1
  133. package/build/instructions/redeemReserveCollateral.js.map +1 -1
  134. package/build/instructions/refreshObligation.js.map +1 -1
  135. package/build/instructions/refreshObligationFarmsForReserve.d.ts +8 -6
  136. package/build/instructions/refreshObligationFarmsForReserve.js +23 -7
  137. package/build/instructions/refreshObligationFarmsForReserve.js.map +1 -1
  138. package/build/instructions/refreshReserve.d.ts +4 -4
  139. package/build/instructions/refreshReserve.js +11 -12
  140. package/build/instructions/refreshReserve.js.map +1 -1
  141. package/build/instructions/refreshReservesBatch.js.map +1 -1
  142. package/build/instructions/repayAndWithdrawAndRedeem.d.ts +46 -0
  143. package/build/instructions/repayAndWithdrawAndRedeem.js +177 -0
  144. package/build/instructions/repayAndWithdrawAndRedeem.js.map +1 -0
  145. package/build/instructions/repayObligationLiquidity.js +1 -1
  146. package/build/instructions/repayObligationLiquidity.js.map +1 -1
  147. package/build/instructions/repayObligationLiquidityV2.js +31 -7
  148. package/build/instructions/repayObligationLiquidityV2.js.map +1 -1
  149. package/build/instructions/requestElevationGroup.js.map +1 -1
  150. package/build/instructions/rolloverFixedTermBorrow.d.ts +25 -0
  151. package/build/instructions/rolloverFixedTermBorrow.js +76 -0
  152. package/build/instructions/rolloverFixedTermBorrow.js.map +1 -0
  153. package/build/instructions/seedDepositOnInitReserve.d.ts +11 -0
  154. package/build/instructions/seedDepositOnInitReserve.js +37 -0
  155. package/build/instructions/seedDepositOnInitReserve.js.map +1 -0
  156. package/build/instructions/setBorrowOrder.d.ts +20 -0
  157. package/build/instructions/setBorrowOrder.js +76 -0
  158. package/build/instructions/setBorrowOrder.js.map +1 -0
  159. package/build/instructions/setBorrowOrderV2.d.ts +21 -0
  160. package/build/instructions/setBorrowOrderV2.js +78 -0
  161. package/build/instructions/setBorrowOrderV2.js.map +1 -0
  162. package/build/instructions/setObligationOrder.d.ts +13 -0
  163. package/build/instructions/setObligationOrder.js +62 -0
  164. package/build/instructions/setObligationOrder.js.map +1 -0
  165. package/build/instructions/socializeLoss.d.ts +1 -1
  166. package/build/instructions/socializeLoss.js +1 -1
  167. package/build/instructions/socializeLoss.js.map +1 -1
  168. package/build/instructions/socializeLossV2.d.ts +22 -0
  169. package/build/instructions/socializeLossV2.js +94 -0
  170. package/build/instructions/socializeLossV2.js.map +1 -0
  171. package/build/instructions/topupReserveRewards.d.ts +16 -0
  172. package/build/instructions/topupReserveRewards.js +73 -0
  173. package/build/instructions/topupReserveRewards.js.map +1 -0
  174. package/build/instructions/updateGlobalConfig.d.ts +13 -0
  175. package/build/instructions/updateGlobalConfig.js +66 -0
  176. package/build/instructions/updateGlobalConfig.js.map +1 -0
  177. package/build/instructions/updateGlobalConfigAdmin.d.ts +7 -0
  178. package/build/instructions/updateGlobalConfigAdmin.js +21 -0
  179. package/build/instructions/updateGlobalConfigAdmin.js.map +1 -0
  180. package/build/instructions/updateLendingMarket.d.ts +2 -1
  181. package/build/instructions/updateLendingMarket.js +10 -2
  182. package/build/instructions/updateLendingMarket.js.map +1 -1
  183. package/build/instructions/updateLendingMarketOwner.d.ts +1 -0
  184. package/build/instructions/updateLendingMarketOwner.js +5 -0
  185. package/build/instructions/updateLendingMarketOwner.js.map +1 -1
  186. package/build/instructions/updateObligationConfig.d.ts +15 -0
  187. package/build/instructions/updateObligationConfig.js +71 -0
  188. package/build/instructions/updateObligationConfig.js.map +1 -0
  189. package/build/instructions/updateReserveConfig.d.ts +6 -4
  190. package/build/instructions/updateReserveConfig.js +15 -4
  191. package/build/instructions/updateReserveConfig.js.map +1 -1
  192. package/build/instructions/withdrawObligationCollateral.js +1 -1
  193. package/build/instructions/withdrawObligationCollateral.js.map +1 -1
  194. package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +1 -1
  195. package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +9 -6
  196. package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -1
  197. package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +21 -5
  198. package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +1 -1
  199. package/build/instructions/withdrawObligationCollateralV2.d.ts +25 -0
  200. package/build/instructions/withdrawObligationCollateralV2.js +109 -0
  201. package/build/instructions/withdrawObligationCollateralV2.js.map +1 -0
  202. package/build/instructions/withdrawProtocolFee.d.ts +3 -2
  203. package/build/instructions/withdrawProtocolFee.js +6 -5
  204. package/build/instructions/withdrawProtocolFee.js.map +1 -1
  205. package/build/instructions/withdrawQueuedLiquidity.d.ts +23 -0
  206. package/build/instructions/withdrawQueuedLiquidity.js +80 -0
  207. package/build/instructions/withdrawQueuedLiquidity.js.map +1 -0
  208. package/build/instructions/withdrawReferrerFees.js +1 -1
  209. package/build/instructions/withdrawReferrerFees.js.map +1 -1
  210. package/build/kamino_lending.d.ts +5753 -2295
  211. package/build/kamino_lending.js +5 -3936
  212. package/build/kamino_lending.js.map +1 -1
  213. package/build/kamino_lending.json +1856 -645
  214. package/build/types/BigFractionBytes.d.ts +2 -1
  215. package/build/types/BigFractionBytes.js +4 -1
  216. package/build/types/BigFractionBytes.js.map +1 -1
  217. package/build/types/BorrowOrder.d.ts +83 -0
  218. package/build/types/BorrowOrder.js +164 -0
  219. package/build/types/BorrowOrder.js.map +1 -0
  220. package/build/types/BorrowOrderConfigArgs.d.ts +42 -0
  221. package/build/types/BorrowOrderConfigArgs.js +107 -0
  222. package/build/types/BorrowOrderConfigArgs.js.map +1 -0
  223. package/build/types/BorrowRateCurve.js.map +1 -1
  224. package/build/types/CurvePoint.d.ts +2 -1
  225. package/build/types/CurvePoint.js.map +1 -1
  226. package/build/types/ElevationGroup.d.ts +2 -1
  227. package/build/types/ElevationGroup.js.map +1 -1
  228. package/build/types/ExchangeRateWithDecimals.d.ts +27 -0
  229. package/build/types/ExchangeRateWithDecimals.js +82 -0
  230. package/build/types/ExchangeRateWithDecimals.js.map +1 -0
  231. package/build/types/FeeCalculation.js +4 -1
  232. package/build/types/FeeCalculation.js.map +1 -1
  233. package/build/types/FixedTermBorrowRolloverConfig.d.ts +47 -0
  234. package/build/types/FixedTermBorrowRolloverConfig.js +114 -0
  235. package/build/types/FixedTermBorrowRolloverConfig.js.map +1 -0
  236. package/build/types/InitObligationArgs.d.ts +2 -1
  237. package/build/types/InitObligationArgs.js.map +1 -1
  238. package/build/types/LastUpdate.d.ts +12 -6
  239. package/build/types/LastUpdate.js +19 -7
  240. package/build/types/LastUpdate.js.map +1 -1
  241. package/build/types/ObligationLiquidity.d.ts +29 -5
  242. package/build/types/ObligationLiquidity.js +25 -8
  243. package/build/types/ObligationLiquidity.js.map +1 -1
  244. package/build/types/ObligationOrder.d.ts +57 -0
  245. package/build/types/ObligationOrder.js +127 -0
  246. package/build/types/ObligationOrder.js.map +1 -0
  247. package/build/types/ProgressCallbackType.d.ts +31 -0
  248. package/build/types/ProgressCallbackType.js +108 -0
  249. package/build/types/ProgressCallbackType.js.map +1 -0
  250. package/build/types/ReserveConfig.d.ts +87 -32
  251. package/build/types/ReserveConfig.js +122 -44
  252. package/build/types/ReserveConfig.js.map +1 -1
  253. package/build/types/ReserveConfigCustomizationArgs.d.ts +42 -0
  254. package/build/types/ReserveConfigCustomizationArgs.js +106 -0
  255. package/build/types/ReserveConfigCustomizationArgs.js.map +1 -0
  256. package/build/types/ReserveFees.d.ts +5 -5
  257. package/build/types/ReserveFees.js +7 -7
  258. package/build/types/ReserveFees.js.map +1 -1
  259. package/build/types/ReserveLiquidity.d.ts +20 -15
  260. package/build/types/ReserveLiquidity.js +29 -22
  261. package/build/types/ReserveLiquidity.js.map +1 -1
  262. package/build/types/UpdateConfigMode.d.ts +232 -63
  263. package/build/types/UpdateConfigMode.js +413 -100
  264. package/build/types/UpdateConfigMode.js.map +1 -1
  265. package/build/types/UpdateGlobalConfigMode.d.ts +31 -0
  266. package/build/types/UpdateGlobalConfigMode.js +108 -0
  267. package/build/types/UpdateGlobalConfigMode.js.map +1 -0
  268. package/build/types/UpdateLendingMarketConfigValue.d.ts +20 -0
  269. package/build/types/UpdateLendingMarketConfigValue.js +33 -1
  270. package/build/types/UpdateLendingMarketConfigValue.js.map +1 -1
  271. package/build/types/UpdateLendingMarketMode.d.ts +400 -23
  272. package/build/types/UpdateLendingMarketMode.js +732 -36
  273. package/build/types/UpdateLendingMarketMode.js.map +1 -1
  274. package/build/types/UpdateObligationConfigMode.d.ts +83 -0
  275. package/build/types/UpdateObligationConfigMode.js +204 -0
  276. package/build/types/UpdateObligationConfigMode.js.map +1 -0
  277. package/build/types/WithdrawQueue.d.ts +32 -0
  278. package/build/types/WithdrawQueue.js +93 -0
  279. package/build/types/WithdrawQueue.js.map +1 -0
  280. package/build/types/index.d.ts +32 -10
  281. package/build/types/index.js +21 -3
  282. package/build/types/index.js.map +1 -1
  283. package/package.json +3 -2
  284. package/scripts/generate-idl-module.mjs +18 -0
  285. package/scripts/patch-optional-accounts.mjs +98 -0
  286. package/scripts/verify-idl-provenance.mjs +16 -0
  287. package/src/accounts/GlobalConfig.ts +113 -0
  288. package/src/accounts/LendingMarket.ts +300 -29
  289. package/src/accounts/Obligation.ts +111 -26
  290. package/src/accounts/ReferrerState.ts +11 -4
  291. package/src/accounts/ReferrerTokenState.ts +6 -3
  292. package/src/accounts/Reserve.ts +10 -2
  293. package/src/accounts/ShortUrl.ts +15 -4
  294. package/src/accounts/UserMetadata.ts +6 -3
  295. package/src/accounts/UserState.ts +24 -8
  296. package/src/accounts/WithdrawTicket.ts +173 -0
  297. package/src/accounts/index.ts +4 -0
  298. package/src/errors/custom.ts +1177 -24
  299. package/src/index.ts +2 -4
  300. package/src/instructions/abortObligationOwnershipTransfer.ts +30 -0
  301. package/src/instructions/acceptObligationOwnership.ts +30 -0
  302. package/src/instructions/approveObligationOwnershipTransfer.ts +34 -0
  303. package/src/instructions/borrowObligationLiquidity.ts +18 -5
  304. package/src/instructions/borrowObligationLiquidityV2.ts +30 -9
  305. package/src/instructions/calculateCtokenExchangeRate.ts +22 -0
  306. package/src/instructions/cancelWithdrawTicket.ts +77 -0
  307. package/src/instructions/cloneReserveConfig.ts +56 -0
  308. package/src/instructions/deleteReferrerStateAndShortUrl.ts +4 -1
  309. package/src/instructions/depositAndWithdraw.ts +229 -0
  310. package/src/instructions/depositObligationCollateral.ts +3 -2
  311. package/src/instructions/depositObligationCollateralV2.ts +110 -0
  312. package/src/instructions/depositReserveLiquidity.ts +4 -3
  313. package/src/instructions/depositReserveLiquidityAndObligationCollateral.ts +18 -9
  314. package/src/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +31 -14
  315. package/src/instructions/enqueueToWithdraw.ts +113 -0
  316. package/src/instructions/fillBorrowOrder.ts +114 -0
  317. package/src/instructions/fillBorrowOrderV2.ts +128 -0
  318. package/src/instructions/flashBorrowReserveLiquidity.ts +19 -6
  319. package/src/instructions/flashRepayReserveLiquidity.ts +23 -7
  320. package/src/instructions/idlMissingTypes.ts +17 -9
  321. package/src/instructions/index.ts +118 -6
  322. package/src/instructions/initFarmsForReserve.ts +11 -3
  323. package/src/instructions/initGlobalConfig.ts +36 -0
  324. package/src/instructions/initLendingMarket.ts +13 -3
  325. package/src/instructions/initObligation.ts +3 -2
  326. package/src/instructions/initObligationFarmsForReserve.ts +5 -3
  327. package/src/instructions/initReferrerStateAndShortUrl.ts +4 -2
  328. package/src/instructions/initReferrerTokenState.ts +6 -16
  329. package/src/instructions/initReserve.ts +21 -3
  330. package/src/instructions/initUserMetadata.ts +18 -8
  331. package/src/instructions/initiateObligationOwnershipTransfer.ts +44 -0
  332. package/src/instructions/liquidateObligationAndRedeemReserveCollateral.ts +7 -5
  333. package/src/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +191 -0
  334. package/src/instructions/markObligationForDeleveraging.ts +46 -0
  335. package/src/instructions/recoverInvalidTicketCollateral.ts +80 -0
  336. package/src/instructions/redeemFees.ts +8 -2
  337. package/src/instructions/redeemReserveCollateral.ts +4 -3
  338. package/src/instructions/refreshObligation.ts +7 -1
  339. package/src/instructions/refreshObligationFarmsForReserve.ts +35 -15
  340. package/src/instructions/refreshReserve.ts +27 -17
  341. package/src/instructions/refreshReservesBatch.ts +7 -2
  342. package/src/instructions/repayAndWithdrawAndRedeem.ts +199 -0
  343. package/src/instructions/repayObligationLiquidity.ts +4 -3
  344. package/src/instructions/repayObligationLiquidityV2.ts +35 -10
  345. package/src/instructions/requestElevationGroup.ts +4 -2
  346. package/src/instructions/rolloverFixedTermBorrow.ts +108 -0
  347. package/src/instructions/seedDepositOnInitReserve.ts +50 -0
  348. package/src/instructions/setBorrowOrder.ts +66 -0
  349. package/src/instructions/setBorrowOrderV2.ts +69 -0
  350. package/src/instructions/setObligationOrder.ts +45 -0
  351. package/src/instructions/socializeLoss.ts +5 -4
  352. package/src/instructions/socializeLossV2.ts +92 -0
  353. package/src/instructions/topupReserveRewards.ts +60 -0
  354. package/src/instructions/updateGlobalConfig.ts +53 -0
  355. package/src/instructions/updateGlobalConfigAdmin.ts +30 -0
  356. package/src/instructions/updateLendingMarket.ts +15 -5
  357. package/src/instructions/updateLendingMarketOwner.ts +10 -1
  358. package/src/instructions/updateObligationConfig.ts +65 -0
  359. package/src/instructions/updateReserveConfig.ts +27 -10
  360. package/src/instructions/withdrawObligationCollateral.ts +4 -3
  361. package/src/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +18 -9
  362. package/src/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +26 -13
  363. package/src/instructions/withdrawObligationCollateralV2.ts +110 -0
  364. package/src/instructions/withdrawProtocolFee.ts +12 -9
  365. package/src/instructions/withdrawQueuedLiquidity.ts +110 -0
  366. package/src/instructions/withdrawReferrerFees.ts +8 -2
  367. package/src/kamino_lending.json +1856 -645
  368. package/src/kamino_lending.ts +5558 -6034
  369. package/src/types/BigFractionBytes.ts +9 -1
  370. package/src/types/BorrowOrder.ts +168 -0
  371. package/src/types/BorrowOrderConfigArgs.ts +96 -0
  372. package/src/types/BorrowRateCurve.ts +10 -3
  373. package/src/types/CurvePoint.ts +7 -1
  374. package/src/types/ElevationGroup.ts +2 -1
  375. package/src/types/ExchangeRateWithDecimals.ts +64 -0
  376. package/src/types/FeeCalculation.ts +9 -2
  377. package/src/types/FixedTermBorrowRolloverConfig.ts +110 -0
  378. package/src/types/InitObligationArgs.ts +3 -0
  379. package/src/types/LastUpdate.ts +26 -10
  380. package/src/types/ObligationLiquidity.ts +43 -10
  381. package/src/types/ObligationOrder.ts +121 -0
  382. package/src/types/ProgressCallbackType.ts +90 -0
  383. package/src/types/ReserveConfig.ts +169 -62
  384. package/src/types/ReserveConfigCustomizationArgs.ts +96 -0
  385. package/src/types/ReserveFees.ts +9 -9
  386. package/src/types/ReserveLiquidity.ts +38 -28
  387. package/src/types/UpdateConfigMode.ts +507 -117
  388. package/src/types/UpdateGlobalConfigMode.ts +90 -0
  389. package/src/types/UpdateLendingMarketConfigValue.ts +43 -0
  390. package/src/types/UpdateLendingMarketMode.ts +912 -41
  391. package/src/types/UpdateObligationConfigMode.ts +210 -0
  392. package/src/types/WithdrawQueue.ts +85 -0
  393. package/src/types/index.ts +175 -34
  394. package/src/types/AssetTier.ts +0 -116
@@ -118,25 +118,25 @@ export class UpdateProtocolTakeRate {
118
118
  }
119
119
  }
120
120
 
121
- export interface UpdateFeesBorrowFeeJSON {
122
- kind: "UpdateFeesBorrowFee"
121
+ export interface UpdateFeesOriginationFeeJSON {
122
+ kind: "UpdateFeesOriginationFee"
123
123
  }
124
124
 
125
- export class UpdateFeesBorrowFee {
125
+ export class UpdateFeesOriginationFee {
126
126
  static readonly discriminator = 5
127
- static readonly kind = "UpdateFeesBorrowFee"
127
+ static readonly kind = "UpdateFeesOriginationFee"
128
128
  readonly discriminator = 5
129
- readonly kind = "UpdateFeesBorrowFee"
129
+ readonly kind = "UpdateFeesOriginationFee"
130
130
 
131
- toJSON(): UpdateFeesBorrowFeeJSON {
131
+ toJSON(): UpdateFeesOriginationFeeJSON {
132
132
  return {
133
- kind: "UpdateFeesBorrowFee",
133
+ kind: "UpdateFeesOriginationFee",
134
134
  }
135
135
  }
136
136
 
137
137
  toEncodable() {
138
138
  return {
139
- UpdateFeesBorrowFee: {},
139
+ UpdateFeesOriginationFee: {},
140
140
  }
141
141
  }
142
142
  }
@@ -164,25 +164,25 @@ export class UpdateFeesFlashLoanFee {
164
164
  }
165
165
  }
166
166
 
167
- export interface UpdateFeesReferralFeeBpsJSON {
168
- kind: "UpdateFeesReferralFeeBps"
167
+ export interface DeprecatedUpdateFeesReferralFeeBpsJSON {
168
+ kind: "DeprecatedUpdateFeesReferralFeeBps"
169
169
  }
170
170
 
171
- export class UpdateFeesReferralFeeBps {
171
+ export class DeprecatedUpdateFeesReferralFeeBps {
172
172
  static readonly discriminator = 7
173
- static readonly kind = "UpdateFeesReferralFeeBps"
173
+ static readonly kind = "DeprecatedUpdateFeesReferralFeeBps"
174
174
  readonly discriminator = 7
175
- readonly kind = "UpdateFeesReferralFeeBps"
175
+ readonly kind = "DeprecatedUpdateFeesReferralFeeBps"
176
176
 
177
- toJSON(): UpdateFeesReferralFeeBpsJSON {
177
+ toJSON(): DeprecatedUpdateFeesReferralFeeBpsJSON {
178
178
  return {
179
- kind: "UpdateFeesReferralFeeBps",
179
+ kind: "DeprecatedUpdateFeesReferralFeeBps",
180
180
  }
181
181
  }
182
182
 
183
183
  toEncodable() {
184
184
  return {
185
- UpdateFeesReferralFeeBps: {},
185
+ DeprecatedUpdateFeesReferralFeeBps: {},
186
186
  }
187
187
  }
188
188
  }
@@ -555,25 +555,25 @@ export class UpdateBorrowRateCurve {
555
555
  }
556
556
  }
557
557
 
558
- export interface UpdateEntireReserveConfigJSON {
559
- kind: "UpdateEntireReserveConfig"
558
+ export interface DeprecatedUpdateEntireReserveConfigJSON {
559
+ kind: "DeprecatedUpdateEntireReserveConfig"
560
560
  }
561
561
 
562
- export class UpdateEntireReserveConfig {
562
+ export class DeprecatedUpdateEntireReserveConfig {
563
563
  static readonly discriminator = 24
564
- static readonly kind = "UpdateEntireReserveConfig"
564
+ static readonly kind = "DeprecatedUpdateEntireReserveConfig"
565
565
  readonly discriminator = 24
566
- readonly kind = "UpdateEntireReserveConfig"
566
+ readonly kind = "DeprecatedUpdateEntireReserveConfig"
567
567
 
568
- toJSON(): UpdateEntireReserveConfigJSON {
568
+ toJSON(): DeprecatedUpdateEntireReserveConfigJSON {
569
569
  return {
570
- kind: "UpdateEntireReserveConfig",
570
+ kind: "DeprecatedUpdateEntireReserveConfig",
571
571
  }
572
572
  }
573
573
 
574
574
  toEncodable() {
575
575
  return {
576
- UpdateEntireReserveConfig: {},
576
+ DeprecatedUpdateEntireReserveConfig: {},
577
577
  }
578
578
  }
579
579
  }
@@ -624,48 +624,48 @@ export class UpdateDepositWithdrawalCap {
624
624
  }
625
625
  }
626
626
 
627
- export interface UpdateDebtWithdrawalCapCurrentTotalJSON {
628
- kind: "UpdateDebtWithdrawalCapCurrentTotal"
627
+ export interface DeprecatedUpdateDebtWithdrawalCapCurrentTotalJSON {
628
+ kind: "DeprecatedUpdateDebtWithdrawalCapCurrentTotal"
629
629
  }
630
630
 
631
- export class UpdateDebtWithdrawalCapCurrentTotal {
631
+ export class DeprecatedUpdateDebtWithdrawalCapCurrentTotal {
632
632
  static readonly discriminator = 27
633
- static readonly kind = "UpdateDebtWithdrawalCapCurrentTotal"
633
+ static readonly kind = "DeprecatedUpdateDebtWithdrawalCapCurrentTotal"
634
634
  readonly discriminator = 27
635
- readonly kind = "UpdateDebtWithdrawalCapCurrentTotal"
635
+ readonly kind = "DeprecatedUpdateDebtWithdrawalCapCurrentTotal"
636
636
 
637
- toJSON(): UpdateDebtWithdrawalCapCurrentTotalJSON {
637
+ toJSON(): DeprecatedUpdateDebtWithdrawalCapCurrentTotalJSON {
638
638
  return {
639
- kind: "UpdateDebtWithdrawalCapCurrentTotal",
639
+ kind: "DeprecatedUpdateDebtWithdrawalCapCurrentTotal",
640
640
  }
641
641
  }
642
642
 
643
643
  toEncodable() {
644
644
  return {
645
- UpdateDebtWithdrawalCapCurrentTotal: {},
645
+ DeprecatedUpdateDebtWithdrawalCapCurrentTotal: {},
646
646
  }
647
647
  }
648
648
  }
649
649
 
650
- export interface UpdateDepositWithdrawalCapCurrentTotalJSON {
651
- kind: "UpdateDepositWithdrawalCapCurrentTotal"
650
+ export interface DeprecatedUpdateDepositWithdrawalCapCurrentTotalJSON {
651
+ kind: "DeprecatedUpdateDepositWithdrawalCapCurrentTotal"
652
652
  }
653
653
 
654
- export class UpdateDepositWithdrawalCapCurrentTotal {
654
+ export class DeprecatedUpdateDepositWithdrawalCapCurrentTotal {
655
655
  static readonly discriminator = 28
656
- static readonly kind = "UpdateDepositWithdrawalCapCurrentTotal"
656
+ static readonly kind = "DeprecatedUpdateDepositWithdrawalCapCurrentTotal"
657
657
  readonly discriminator = 28
658
- readonly kind = "UpdateDepositWithdrawalCapCurrentTotal"
658
+ readonly kind = "DeprecatedUpdateDepositWithdrawalCapCurrentTotal"
659
659
 
660
- toJSON(): UpdateDepositWithdrawalCapCurrentTotalJSON {
660
+ toJSON(): DeprecatedUpdateDepositWithdrawalCapCurrentTotalJSON {
661
661
  return {
662
- kind: "UpdateDepositWithdrawalCapCurrentTotal",
662
+ kind: "DeprecatedUpdateDepositWithdrawalCapCurrentTotal",
663
663
  }
664
664
  }
665
665
 
666
666
  toEncodable() {
667
667
  return {
668
- UpdateDepositWithdrawalCapCurrentTotal: {},
668
+ DeprecatedUpdateDepositWithdrawalCapCurrentTotal: {},
669
669
  }
670
670
  }
671
671
  }
@@ -716,25 +716,25 @@ export class UpdateMinLiquidationBonusBps {
716
716
  }
717
717
  }
718
718
 
719
- export interface DeleveragingMarginCallPeriodJSON {
720
- kind: "DeleveragingMarginCallPeriod"
719
+ export interface UpdateDeleveragingMarginCallPeriodJSON {
720
+ kind: "UpdateDeleveragingMarginCallPeriod"
721
721
  }
722
722
 
723
- export class DeleveragingMarginCallPeriod {
723
+ export class UpdateDeleveragingMarginCallPeriod {
724
724
  static readonly discriminator = 31
725
- static readonly kind = "DeleveragingMarginCallPeriod"
725
+ static readonly kind = "UpdateDeleveragingMarginCallPeriod"
726
726
  readonly discriminator = 31
727
- readonly kind = "DeleveragingMarginCallPeriod"
727
+ readonly kind = "UpdateDeleveragingMarginCallPeriod"
728
728
 
729
- toJSON(): DeleveragingMarginCallPeriodJSON {
729
+ toJSON(): UpdateDeleveragingMarginCallPeriodJSON {
730
730
  return {
731
- kind: "DeleveragingMarginCallPeriod",
731
+ kind: "UpdateDeleveragingMarginCallPeriod",
732
732
  }
733
733
  }
734
734
 
735
735
  toEncodable() {
736
736
  return {
737
- DeleveragingMarginCallPeriod: {},
737
+ UpdateDeleveragingMarginCallPeriod: {},
738
738
  }
739
739
  }
740
740
  }
@@ -762,25 +762,25 @@ export class UpdateBorrowFactor {
762
762
  }
763
763
  }
764
764
 
765
- export interface UpdateAssetTierJSON {
766
- kind: "UpdateAssetTier"
765
+ export interface DeprecatedUpdateAssetTierJSON {
766
+ kind: "DeprecatedUpdateAssetTier"
767
767
  }
768
768
 
769
- export class UpdateAssetTier {
769
+ export class DeprecatedUpdateAssetTier {
770
770
  static readonly discriminator = 33
771
- static readonly kind = "UpdateAssetTier"
771
+ static readonly kind = "DeprecatedUpdateAssetTier"
772
772
  readonly discriminator = 33
773
- readonly kind = "UpdateAssetTier"
773
+ readonly kind = "DeprecatedUpdateAssetTier"
774
774
 
775
- toJSON(): UpdateAssetTierJSON {
775
+ toJSON(): DeprecatedUpdateAssetTierJSON {
776
776
  return {
777
- kind: "UpdateAssetTier",
777
+ kind: "DeprecatedUpdateAssetTier",
778
778
  }
779
779
  }
780
780
 
781
781
  toEncodable() {
782
782
  return {
783
- UpdateAssetTier: {},
783
+ DeprecatedUpdateAssetTier: {},
784
784
  }
785
785
  }
786
786
  }
@@ -808,25 +808,25 @@ export class UpdateElevationGroup {
808
808
  }
809
809
  }
810
810
 
811
- export interface DeleveragingThresholdSlotsPerBpsJSON {
812
- kind: "DeleveragingThresholdSlotsPerBps"
811
+ export interface UpdateDeleveragingThresholdDecreaseBpsPerDayJSON {
812
+ kind: "UpdateDeleveragingThresholdDecreaseBpsPerDay"
813
813
  }
814
814
 
815
- export class DeleveragingThresholdSlotsPerBps {
815
+ export class UpdateDeleveragingThresholdDecreaseBpsPerDay {
816
816
  static readonly discriminator = 35
817
- static readonly kind = "DeleveragingThresholdSlotsPerBps"
817
+ static readonly kind = "UpdateDeleveragingThresholdDecreaseBpsPerDay"
818
818
  readonly discriminator = 35
819
- readonly kind = "DeleveragingThresholdSlotsPerBps"
819
+ readonly kind = "UpdateDeleveragingThresholdDecreaseBpsPerDay"
820
820
 
821
- toJSON(): DeleveragingThresholdSlotsPerBpsJSON {
821
+ toJSON(): UpdateDeleveragingThresholdDecreaseBpsPerDayJSON {
822
822
  return {
823
- kind: "DeleveragingThresholdSlotsPerBps",
823
+ kind: "UpdateDeleveragingThresholdDecreaseBpsPerDay",
824
824
  }
825
825
  }
826
826
 
827
827
  toEncodable() {
828
828
  return {
829
- DeleveragingThresholdSlotsPerBps: {},
829
+ UpdateDeleveragingThresholdDecreaseBpsPerDay: {},
830
830
  }
831
831
  }
832
832
  }
@@ -969,25 +969,25 @@ export class UpdateDisableUsageAsCollateralOutsideEmode {
969
969
  }
970
970
  }
971
971
 
972
- export interface UpdateBlockBorrowingAboveUtilizationJSON {
973
- kind: "UpdateBlockBorrowingAboveUtilization"
972
+ export interface UpdateBlockBorrowingAboveUtilizationPctJSON {
973
+ kind: "UpdateBlockBorrowingAboveUtilizationPct"
974
974
  }
975
975
 
976
- export class UpdateBlockBorrowingAboveUtilization {
976
+ export class UpdateBlockBorrowingAboveUtilizationPct {
977
977
  static readonly discriminator = 42
978
- static readonly kind = "UpdateBlockBorrowingAboveUtilization"
978
+ static readonly kind = "UpdateBlockBorrowingAboveUtilizationPct"
979
979
  readonly discriminator = 42
980
- readonly kind = "UpdateBlockBorrowingAboveUtilization"
980
+ readonly kind = "UpdateBlockBorrowingAboveUtilizationPct"
981
981
 
982
- toJSON(): UpdateBlockBorrowingAboveUtilizationJSON {
982
+ toJSON(): UpdateBlockBorrowingAboveUtilizationPctJSON {
983
983
  return {
984
- kind: "UpdateBlockBorrowingAboveUtilization",
984
+ kind: "UpdateBlockBorrowingAboveUtilizationPct",
985
985
  }
986
986
  }
987
987
 
988
988
  toEncodable() {
989
989
  return {
990
- UpdateBlockBorrowingAboveUtilization: {},
990
+ UpdateBlockBorrowingAboveUtilizationPct: {},
991
991
  }
992
992
  }
993
993
  }
@@ -1084,6 +1084,305 @@ export class UpdateHostFixedInterestRateBps {
1084
1084
  }
1085
1085
  }
1086
1086
 
1087
+ export interface UpdateAutodeleverageEnabledJSON {
1088
+ kind: "UpdateAutodeleverageEnabled"
1089
+ }
1090
+
1091
+ export class UpdateAutodeleverageEnabled {
1092
+ static readonly discriminator = 47
1093
+ static readonly kind = "UpdateAutodeleverageEnabled"
1094
+ readonly discriminator = 47
1095
+ readonly kind = "UpdateAutodeleverageEnabled"
1096
+
1097
+ toJSON(): UpdateAutodeleverageEnabledJSON {
1098
+ return {
1099
+ kind: "UpdateAutodeleverageEnabled",
1100
+ }
1101
+ }
1102
+
1103
+ toEncodable() {
1104
+ return {
1105
+ UpdateAutodeleverageEnabled: {},
1106
+ }
1107
+ }
1108
+ }
1109
+
1110
+ export interface UpdateDeleveragingBonusIncreaseBpsPerDayJSON {
1111
+ kind: "UpdateDeleveragingBonusIncreaseBpsPerDay"
1112
+ }
1113
+
1114
+ export class UpdateDeleveragingBonusIncreaseBpsPerDay {
1115
+ static readonly discriminator = 48
1116
+ static readonly kind = "UpdateDeleveragingBonusIncreaseBpsPerDay"
1117
+ readonly discriminator = 48
1118
+ readonly kind = "UpdateDeleveragingBonusIncreaseBpsPerDay"
1119
+
1120
+ toJSON(): UpdateDeleveragingBonusIncreaseBpsPerDayJSON {
1121
+ return {
1122
+ kind: "UpdateDeleveragingBonusIncreaseBpsPerDay",
1123
+ }
1124
+ }
1125
+
1126
+ toEncodable() {
1127
+ return {
1128
+ UpdateDeleveragingBonusIncreaseBpsPerDay: {},
1129
+ }
1130
+ }
1131
+ }
1132
+
1133
+ export interface UpdateProtocolOrderExecutionFeeJSON {
1134
+ kind: "UpdateProtocolOrderExecutionFee"
1135
+ }
1136
+
1137
+ export class UpdateProtocolOrderExecutionFee {
1138
+ static readonly discriminator = 49
1139
+ static readonly kind = "UpdateProtocolOrderExecutionFee"
1140
+ readonly discriminator = 49
1141
+ readonly kind = "UpdateProtocolOrderExecutionFee"
1142
+
1143
+ toJSON(): UpdateProtocolOrderExecutionFeeJSON {
1144
+ return {
1145
+ kind: "UpdateProtocolOrderExecutionFee",
1146
+ }
1147
+ }
1148
+
1149
+ toEncodable() {
1150
+ return {
1151
+ UpdateProtocolOrderExecutionFee: {},
1152
+ }
1153
+ }
1154
+ }
1155
+
1156
+ export interface UpdateProposerAuthorityLockJSON {
1157
+ kind: "UpdateProposerAuthorityLock"
1158
+ }
1159
+
1160
+ export class UpdateProposerAuthorityLock {
1161
+ static readonly discriminator = 50
1162
+ static readonly kind = "UpdateProposerAuthorityLock"
1163
+ readonly discriminator = 50
1164
+ readonly kind = "UpdateProposerAuthorityLock"
1165
+
1166
+ toJSON(): UpdateProposerAuthorityLockJSON {
1167
+ return {
1168
+ kind: "UpdateProposerAuthorityLock",
1169
+ }
1170
+ }
1171
+
1172
+ toEncodable() {
1173
+ return {
1174
+ UpdateProposerAuthorityLock: {},
1175
+ }
1176
+ }
1177
+ }
1178
+
1179
+ export interface UpdateMinDeleveragingBonusBpsJSON {
1180
+ kind: "UpdateMinDeleveragingBonusBps"
1181
+ }
1182
+
1183
+ export class UpdateMinDeleveragingBonusBps {
1184
+ static readonly discriminator = 51
1185
+ static readonly kind = "UpdateMinDeleveragingBonusBps"
1186
+ readonly discriminator = 51
1187
+ readonly kind = "UpdateMinDeleveragingBonusBps"
1188
+
1189
+ toJSON(): UpdateMinDeleveragingBonusBpsJSON {
1190
+ return {
1191
+ kind: "UpdateMinDeleveragingBonusBps",
1192
+ }
1193
+ }
1194
+
1195
+ toEncodable() {
1196
+ return {
1197
+ UpdateMinDeleveragingBonusBps: {},
1198
+ }
1199
+ }
1200
+ }
1201
+
1202
+ export interface UpdateBlockCTokenUsageJSON {
1203
+ kind: "UpdateBlockCTokenUsage"
1204
+ }
1205
+
1206
+ export class UpdateBlockCTokenUsage {
1207
+ static readonly discriminator = 52
1208
+ static readonly kind = "UpdateBlockCTokenUsage"
1209
+ readonly discriminator = 52
1210
+ readonly kind = "UpdateBlockCTokenUsage"
1211
+
1212
+ toJSON(): UpdateBlockCTokenUsageJSON {
1213
+ return {
1214
+ kind: "UpdateBlockCTokenUsage",
1215
+ }
1216
+ }
1217
+
1218
+ toEncodable() {
1219
+ return {
1220
+ UpdateBlockCTokenUsage: {},
1221
+ }
1222
+ }
1223
+ }
1224
+
1225
+ export interface UpdateDebtMaturityTimestampJSON {
1226
+ kind: "UpdateDebtMaturityTimestamp"
1227
+ }
1228
+
1229
+ export class UpdateDebtMaturityTimestamp {
1230
+ static readonly discriminator = 53
1231
+ static readonly kind = "UpdateDebtMaturityTimestamp"
1232
+ readonly discriminator = 53
1233
+ readonly kind = "UpdateDebtMaturityTimestamp"
1234
+
1235
+ toJSON(): UpdateDebtMaturityTimestampJSON {
1236
+ return {
1237
+ kind: "UpdateDebtMaturityTimestamp",
1238
+ }
1239
+ }
1240
+
1241
+ toEncodable() {
1242
+ return {
1243
+ UpdateDebtMaturityTimestamp: {},
1244
+ }
1245
+ }
1246
+ }
1247
+
1248
+ export interface UpdateDebtTermSecondsJSON {
1249
+ kind: "UpdateDebtTermSeconds"
1250
+ }
1251
+
1252
+ export class UpdateDebtTermSeconds {
1253
+ static readonly discriminator = 54
1254
+ static readonly kind = "UpdateDebtTermSeconds"
1255
+ readonly discriminator = 54
1256
+ readonly kind = "UpdateDebtTermSeconds"
1257
+
1258
+ toJSON(): UpdateDebtTermSecondsJSON {
1259
+ return {
1260
+ kind: "UpdateDebtTermSeconds",
1261
+ }
1262
+ }
1263
+
1264
+ toEncodable() {
1265
+ return {
1266
+ UpdateDebtTermSeconds: {},
1267
+ }
1268
+ }
1269
+ }
1270
+
1271
+ export interface UpdateEarlyRepayRemainingInterestPctJSON {
1272
+ kind: "UpdateEarlyRepayRemainingInterestPct"
1273
+ }
1274
+
1275
+ export class UpdateEarlyRepayRemainingInterestPct {
1276
+ static readonly discriminator = 55
1277
+ static readonly kind = "UpdateEarlyRepayRemainingInterestPct"
1278
+ readonly discriminator = 55
1279
+ readonly kind = "UpdateEarlyRepayRemainingInterestPct"
1280
+
1281
+ toJSON(): UpdateEarlyRepayRemainingInterestPctJSON {
1282
+ return {
1283
+ kind: "UpdateEarlyRepayRemainingInterestPct",
1284
+ }
1285
+ }
1286
+
1287
+ toEncodable() {
1288
+ return {
1289
+ UpdateEarlyRepayRemainingInterestPct: {},
1290
+ }
1291
+ }
1292
+ }
1293
+
1294
+ export interface UpdateReserveEmergencyModeJSON {
1295
+ kind: "UpdateReserveEmergencyMode"
1296
+ }
1297
+
1298
+ export class UpdateReserveEmergencyMode {
1299
+ static readonly discriminator = 56
1300
+ static readonly kind = "UpdateReserveEmergencyMode"
1301
+ readonly discriminator = 56
1302
+ readonly kind = "UpdateReserveEmergencyMode"
1303
+
1304
+ toJSON(): UpdateReserveEmergencyModeJSON {
1305
+ return {
1306
+ kind: "UpdateReserveEmergencyMode",
1307
+ }
1308
+ }
1309
+
1310
+ toEncodable() {
1311
+ return {
1312
+ UpdateReserveEmergencyMode: {},
1313
+ }
1314
+ }
1315
+ }
1316
+
1317
+ export interface UpdateRewardsAmountPerAccrualUnitJSON {
1318
+ kind: "UpdateRewardsAmountPerAccrualUnit"
1319
+ }
1320
+
1321
+ export class UpdateRewardsAmountPerAccrualUnit {
1322
+ static readonly discriminator = 57
1323
+ static readonly kind = "UpdateRewardsAmountPerAccrualUnit"
1324
+ readonly discriminator = 57
1325
+ readonly kind = "UpdateRewardsAmountPerAccrualUnit"
1326
+
1327
+ toJSON(): UpdateRewardsAmountPerAccrualUnitJSON {
1328
+ return {
1329
+ kind: "UpdateRewardsAmountPerAccrualUnit",
1330
+ }
1331
+ }
1332
+
1333
+ toEncodable() {
1334
+ return {
1335
+ UpdateRewardsAmountPerAccrualUnit: {},
1336
+ }
1337
+ }
1338
+ }
1339
+
1340
+ export interface UpdateReservePermissionedOpsJSON {
1341
+ kind: "UpdateReservePermissionedOps"
1342
+ }
1343
+
1344
+ export class UpdateReservePermissionedOps {
1345
+ static readonly discriminator = 58
1346
+ static readonly kind = "UpdateReservePermissionedOps"
1347
+ readonly discriminator = 58
1348
+ readonly kind = "UpdateReservePermissionedOps"
1349
+
1350
+ toJSON(): UpdateReservePermissionedOpsJSON {
1351
+ return {
1352
+ kind: "UpdateReservePermissionedOps",
1353
+ }
1354
+ }
1355
+
1356
+ toEncodable() {
1357
+ return {
1358
+ UpdateReservePermissionedOps: {},
1359
+ }
1360
+ }
1361
+ }
1362
+
1363
+ export interface UpdateInterestRateBasisJSON {
1364
+ kind: "UpdateInterestRateBasis"
1365
+ }
1366
+
1367
+ export class UpdateInterestRateBasis {
1368
+ static readonly discriminator = 59
1369
+ static readonly kind = "UpdateInterestRateBasis"
1370
+ readonly discriminator = 59
1371
+ readonly kind = "UpdateInterestRateBasis"
1372
+
1373
+ toJSON(): UpdateInterestRateBasisJSON {
1374
+ return {
1375
+ kind: "UpdateInterestRateBasis",
1376
+ }
1377
+ }
1378
+
1379
+ toEncodable() {
1380
+ return {
1381
+ UpdateInterestRateBasis: {},
1382
+ }
1383
+ }
1384
+ }
1385
+
1087
1386
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1088
1387
  export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1089
1388
  if (typeof obj !== "object") {
@@ -1105,14 +1404,14 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1105
1404
  if ("UpdateProtocolTakeRate" in obj) {
1106
1405
  return new UpdateProtocolTakeRate()
1107
1406
  }
1108
- if ("UpdateFeesBorrowFee" in obj) {
1109
- return new UpdateFeesBorrowFee()
1407
+ if ("UpdateFeesOriginationFee" in obj) {
1408
+ return new UpdateFeesOriginationFee()
1110
1409
  }
1111
1410
  if ("UpdateFeesFlashLoanFee" in obj) {
1112
1411
  return new UpdateFeesFlashLoanFee()
1113
1412
  }
1114
- if ("UpdateFeesReferralFeeBps" in obj) {
1115
- return new UpdateFeesReferralFeeBps()
1413
+ if ("DeprecatedUpdateFeesReferralFeeBps" in obj) {
1414
+ return new DeprecatedUpdateFeesReferralFeeBps()
1116
1415
  }
1117
1416
  if ("UpdateDepositLimit" in obj) {
1118
1417
  return new UpdateDepositLimit()
@@ -1162,8 +1461,8 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1162
1461
  if ("UpdateBorrowRateCurve" in obj) {
1163
1462
  return new UpdateBorrowRateCurve()
1164
1463
  }
1165
- if ("UpdateEntireReserveConfig" in obj) {
1166
- return new UpdateEntireReserveConfig()
1464
+ if ("DeprecatedUpdateEntireReserveConfig" in obj) {
1465
+ return new DeprecatedUpdateEntireReserveConfig()
1167
1466
  }
1168
1467
  if ("UpdateDebtWithdrawalCap" in obj) {
1169
1468
  return new UpdateDebtWithdrawalCap()
@@ -1171,11 +1470,11 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1171
1470
  if ("UpdateDepositWithdrawalCap" in obj) {
1172
1471
  return new UpdateDepositWithdrawalCap()
1173
1472
  }
1174
- if ("UpdateDebtWithdrawalCapCurrentTotal" in obj) {
1175
- return new UpdateDebtWithdrawalCapCurrentTotal()
1473
+ if ("DeprecatedUpdateDebtWithdrawalCapCurrentTotal" in obj) {
1474
+ return new DeprecatedUpdateDebtWithdrawalCapCurrentTotal()
1176
1475
  }
1177
- if ("UpdateDepositWithdrawalCapCurrentTotal" in obj) {
1178
- return new UpdateDepositWithdrawalCapCurrentTotal()
1476
+ if ("DeprecatedUpdateDepositWithdrawalCapCurrentTotal" in obj) {
1477
+ return new DeprecatedUpdateDepositWithdrawalCapCurrentTotal()
1179
1478
  }
1180
1479
  if ("UpdateBadDebtLiquidationBonusBps" in obj) {
1181
1480
  return new UpdateBadDebtLiquidationBonusBps()
@@ -1183,20 +1482,20 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1183
1482
  if ("UpdateMinLiquidationBonusBps" in obj) {
1184
1483
  return new UpdateMinLiquidationBonusBps()
1185
1484
  }
1186
- if ("DeleveragingMarginCallPeriod" in obj) {
1187
- return new DeleveragingMarginCallPeriod()
1485
+ if ("UpdateDeleveragingMarginCallPeriod" in obj) {
1486
+ return new UpdateDeleveragingMarginCallPeriod()
1188
1487
  }
1189
1488
  if ("UpdateBorrowFactor" in obj) {
1190
1489
  return new UpdateBorrowFactor()
1191
1490
  }
1192
- if ("UpdateAssetTier" in obj) {
1193
- return new UpdateAssetTier()
1491
+ if ("DeprecatedUpdateAssetTier" in obj) {
1492
+ return new DeprecatedUpdateAssetTier()
1194
1493
  }
1195
1494
  if ("UpdateElevationGroup" in obj) {
1196
1495
  return new UpdateElevationGroup()
1197
1496
  }
1198
- if ("DeleveragingThresholdSlotsPerBps" in obj) {
1199
- return new DeleveragingThresholdSlotsPerBps()
1497
+ if ("UpdateDeleveragingThresholdDecreaseBpsPerDay" in obj) {
1498
+ return new UpdateDeleveragingThresholdDecreaseBpsPerDay()
1200
1499
  }
1201
1500
  if ("DeprecatedUpdateMultiplierSideBoost" in obj) {
1202
1501
  return new DeprecatedUpdateMultiplierSideBoost()
@@ -1216,8 +1515,8 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1216
1515
  if ("UpdateDisableUsageAsCollateralOutsideEmode" in obj) {
1217
1516
  return new UpdateDisableUsageAsCollateralOutsideEmode()
1218
1517
  }
1219
- if ("UpdateBlockBorrowingAboveUtilization" in obj) {
1220
- return new UpdateBlockBorrowingAboveUtilization()
1518
+ if ("UpdateBlockBorrowingAboveUtilizationPct" in obj) {
1519
+ return new UpdateBlockBorrowingAboveUtilizationPct()
1221
1520
  }
1222
1521
  if ("UpdateBlockPriceUsage" in obj) {
1223
1522
  return new UpdateBlockPriceUsage()
@@ -1231,6 +1530,45 @@ export function fromDecoded(obj: any): types.UpdateConfigModeKind {
1231
1530
  if ("UpdateHostFixedInterestRateBps" in obj) {
1232
1531
  return new UpdateHostFixedInterestRateBps()
1233
1532
  }
1533
+ if ("UpdateAutodeleverageEnabled" in obj) {
1534
+ return new UpdateAutodeleverageEnabled()
1535
+ }
1536
+ if ("UpdateDeleveragingBonusIncreaseBpsPerDay" in obj) {
1537
+ return new UpdateDeleveragingBonusIncreaseBpsPerDay()
1538
+ }
1539
+ if ("UpdateProtocolOrderExecutionFee" in obj) {
1540
+ return new UpdateProtocolOrderExecutionFee()
1541
+ }
1542
+ if ("UpdateProposerAuthorityLock" in obj) {
1543
+ return new UpdateProposerAuthorityLock()
1544
+ }
1545
+ if ("UpdateMinDeleveragingBonusBps" in obj) {
1546
+ return new UpdateMinDeleveragingBonusBps()
1547
+ }
1548
+ if ("UpdateBlockCTokenUsage" in obj) {
1549
+ return new UpdateBlockCTokenUsage()
1550
+ }
1551
+ if ("UpdateDebtMaturityTimestamp" in obj) {
1552
+ return new UpdateDebtMaturityTimestamp()
1553
+ }
1554
+ if ("UpdateDebtTermSeconds" in obj) {
1555
+ return new UpdateDebtTermSeconds()
1556
+ }
1557
+ if ("UpdateEarlyRepayRemainingInterestPct" in obj) {
1558
+ return new UpdateEarlyRepayRemainingInterestPct()
1559
+ }
1560
+ if ("UpdateReserveEmergencyMode" in obj) {
1561
+ return new UpdateReserveEmergencyMode()
1562
+ }
1563
+ if ("UpdateRewardsAmountPerAccrualUnit" in obj) {
1564
+ return new UpdateRewardsAmountPerAccrualUnit()
1565
+ }
1566
+ if ("UpdateReservePermissionedOps" in obj) {
1567
+ return new UpdateReservePermissionedOps()
1568
+ }
1569
+ if ("UpdateInterestRateBasis" in obj) {
1570
+ return new UpdateInterestRateBasis()
1571
+ }
1234
1572
 
1235
1573
  throw new Error("Invalid enum object")
1236
1574
  }
@@ -1254,14 +1592,14 @@ export function fromJSON(
1254
1592
  case "UpdateProtocolTakeRate": {
1255
1593
  return new UpdateProtocolTakeRate()
1256
1594
  }
1257
- case "UpdateFeesBorrowFee": {
1258
- return new UpdateFeesBorrowFee()
1595
+ case "UpdateFeesOriginationFee": {
1596
+ return new UpdateFeesOriginationFee()
1259
1597
  }
1260
1598
  case "UpdateFeesFlashLoanFee": {
1261
1599
  return new UpdateFeesFlashLoanFee()
1262
1600
  }
1263
- case "UpdateFeesReferralFeeBps": {
1264
- return new UpdateFeesReferralFeeBps()
1601
+ case "DeprecatedUpdateFeesReferralFeeBps": {
1602
+ return new DeprecatedUpdateFeesReferralFeeBps()
1265
1603
  }
1266
1604
  case "UpdateDepositLimit": {
1267
1605
  return new UpdateDepositLimit()
@@ -1311,8 +1649,8 @@ export function fromJSON(
1311
1649
  case "UpdateBorrowRateCurve": {
1312
1650
  return new UpdateBorrowRateCurve()
1313
1651
  }
1314
- case "UpdateEntireReserveConfig": {
1315
- return new UpdateEntireReserveConfig()
1652
+ case "DeprecatedUpdateEntireReserveConfig": {
1653
+ return new DeprecatedUpdateEntireReserveConfig()
1316
1654
  }
1317
1655
  case "UpdateDebtWithdrawalCap": {
1318
1656
  return new UpdateDebtWithdrawalCap()
@@ -1320,11 +1658,11 @@ export function fromJSON(
1320
1658
  case "UpdateDepositWithdrawalCap": {
1321
1659
  return new UpdateDepositWithdrawalCap()
1322
1660
  }
1323
- case "UpdateDebtWithdrawalCapCurrentTotal": {
1324
- return new UpdateDebtWithdrawalCapCurrentTotal()
1661
+ case "DeprecatedUpdateDebtWithdrawalCapCurrentTotal": {
1662
+ return new DeprecatedUpdateDebtWithdrawalCapCurrentTotal()
1325
1663
  }
1326
- case "UpdateDepositWithdrawalCapCurrentTotal": {
1327
- return new UpdateDepositWithdrawalCapCurrentTotal()
1664
+ case "DeprecatedUpdateDepositWithdrawalCapCurrentTotal": {
1665
+ return new DeprecatedUpdateDepositWithdrawalCapCurrentTotal()
1328
1666
  }
1329
1667
  case "UpdateBadDebtLiquidationBonusBps": {
1330
1668
  return new UpdateBadDebtLiquidationBonusBps()
@@ -1332,20 +1670,20 @@ export function fromJSON(
1332
1670
  case "UpdateMinLiquidationBonusBps": {
1333
1671
  return new UpdateMinLiquidationBonusBps()
1334
1672
  }
1335
- case "DeleveragingMarginCallPeriod": {
1336
- return new DeleveragingMarginCallPeriod()
1673
+ case "UpdateDeleveragingMarginCallPeriod": {
1674
+ return new UpdateDeleveragingMarginCallPeriod()
1337
1675
  }
1338
1676
  case "UpdateBorrowFactor": {
1339
1677
  return new UpdateBorrowFactor()
1340
1678
  }
1341
- case "UpdateAssetTier": {
1342
- return new UpdateAssetTier()
1679
+ case "DeprecatedUpdateAssetTier": {
1680
+ return new DeprecatedUpdateAssetTier()
1343
1681
  }
1344
1682
  case "UpdateElevationGroup": {
1345
1683
  return new UpdateElevationGroup()
1346
1684
  }
1347
- case "DeleveragingThresholdSlotsPerBps": {
1348
- return new DeleveragingThresholdSlotsPerBps()
1685
+ case "UpdateDeleveragingThresholdDecreaseBpsPerDay": {
1686
+ return new UpdateDeleveragingThresholdDecreaseBpsPerDay()
1349
1687
  }
1350
1688
  case "DeprecatedUpdateMultiplierSideBoost": {
1351
1689
  return new DeprecatedUpdateMultiplierSideBoost()
@@ -1365,8 +1703,8 @@ export function fromJSON(
1365
1703
  case "UpdateDisableUsageAsCollateralOutsideEmode": {
1366
1704
  return new UpdateDisableUsageAsCollateralOutsideEmode()
1367
1705
  }
1368
- case "UpdateBlockBorrowingAboveUtilization": {
1369
- return new UpdateBlockBorrowingAboveUtilization()
1706
+ case "UpdateBlockBorrowingAboveUtilizationPct": {
1707
+ return new UpdateBlockBorrowingAboveUtilizationPct()
1370
1708
  }
1371
1709
  case "UpdateBlockPriceUsage": {
1372
1710
  return new UpdateBlockPriceUsage()
@@ -1380,6 +1718,45 @@ export function fromJSON(
1380
1718
  case "UpdateHostFixedInterestRateBps": {
1381
1719
  return new UpdateHostFixedInterestRateBps()
1382
1720
  }
1721
+ case "UpdateAutodeleverageEnabled": {
1722
+ return new UpdateAutodeleverageEnabled()
1723
+ }
1724
+ case "UpdateDeleveragingBonusIncreaseBpsPerDay": {
1725
+ return new UpdateDeleveragingBonusIncreaseBpsPerDay()
1726
+ }
1727
+ case "UpdateProtocolOrderExecutionFee": {
1728
+ return new UpdateProtocolOrderExecutionFee()
1729
+ }
1730
+ case "UpdateProposerAuthorityLock": {
1731
+ return new UpdateProposerAuthorityLock()
1732
+ }
1733
+ case "UpdateMinDeleveragingBonusBps": {
1734
+ return new UpdateMinDeleveragingBonusBps()
1735
+ }
1736
+ case "UpdateBlockCTokenUsage": {
1737
+ return new UpdateBlockCTokenUsage()
1738
+ }
1739
+ case "UpdateDebtMaturityTimestamp": {
1740
+ return new UpdateDebtMaturityTimestamp()
1741
+ }
1742
+ case "UpdateDebtTermSeconds": {
1743
+ return new UpdateDebtTermSeconds()
1744
+ }
1745
+ case "UpdateEarlyRepayRemainingInterestPct": {
1746
+ return new UpdateEarlyRepayRemainingInterestPct()
1747
+ }
1748
+ case "UpdateReserveEmergencyMode": {
1749
+ return new UpdateReserveEmergencyMode()
1750
+ }
1751
+ case "UpdateRewardsAmountPerAccrualUnit": {
1752
+ return new UpdateRewardsAmountPerAccrualUnit()
1753
+ }
1754
+ case "UpdateReservePermissionedOps": {
1755
+ return new UpdateReservePermissionedOps()
1756
+ }
1757
+ case "UpdateInterestRateBasis": {
1758
+ return new UpdateInterestRateBasis()
1759
+ }
1383
1760
  }
1384
1761
  }
1385
1762
 
@@ -1390,9 +1767,9 @@ export function layout(property?: string) {
1390
1767
  borsh.struct([], "UpdateLiquidationThresholdPct"),
1391
1768
  borsh.struct([], "UpdateProtocolLiquidationFee"),
1392
1769
  borsh.struct([], "UpdateProtocolTakeRate"),
1393
- borsh.struct([], "UpdateFeesBorrowFee"),
1770
+ borsh.struct([], "UpdateFeesOriginationFee"),
1394
1771
  borsh.struct([], "UpdateFeesFlashLoanFee"),
1395
- borsh.struct([], "UpdateFeesReferralFeeBps"),
1772
+ borsh.struct([], "DeprecatedUpdateFeesReferralFeeBps"),
1396
1773
  borsh.struct([], "UpdateDepositLimit"),
1397
1774
  borsh.struct([], "UpdateBorrowLimit"),
1398
1775
  borsh.struct([], "UpdateTokenInfoLowerHeuristic"),
@@ -1409,29 +1786,42 @@ export function layout(property?: string) {
1409
1786
  borsh.struct([], "UpdateSwitchboardFeed"),
1410
1787
  borsh.struct([], "UpdateSwitchboardTwapFeed"),
1411
1788
  borsh.struct([], "UpdateBorrowRateCurve"),
1412
- borsh.struct([], "UpdateEntireReserveConfig"),
1789
+ borsh.struct([], "DeprecatedUpdateEntireReserveConfig"),
1413
1790
  borsh.struct([], "UpdateDebtWithdrawalCap"),
1414
1791
  borsh.struct([], "UpdateDepositWithdrawalCap"),
1415
- borsh.struct([], "UpdateDebtWithdrawalCapCurrentTotal"),
1416
- borsh.struct([], "UpdateDepositWithdrawalCapCurrentTotal"),
1792
+ borsh.struct([], "DeprecatedUpdateDebtWithdrawalCapCurrentTotal"),
1793
+ borsh.struct([], "DeprecatedUpdateDepositWithdrawalCapCurrentTotal"),
1417
1794
  borsh.struct([], "UpdateBadDebtLiquidationBonusBps"),
1418
1795
  borsh.struct([], "UpdateMinLiquidationBonusBps"),
1419
- borsh.struct([], "DeleveragingMarginCallPeriod"),
1796
+ borsh.struct([], "UpdateDeleveragingMarginCallPeriod"),
1420
1797
  borsh.struct([], "UpdateBorrowFactor"),
1421
- borsh.struct([], "UpdateAssetTier"),
1798
+ borsh.struct([], "DeprecatedUpdateAssetTier"),
1422
1799
  borsh.struct([], "UpdateElevationGroup"),
1423
- borsh.struct([], "DeleveragingThresholdSlotsPerBps"),
1800
+ borsh.struct([], "UpdateDeleveragingThresholdDecreaseBpsPerDay"),
1424
1801
  borsh.struct([], "DeprecatedUpdateMultiplierSideBoost"),
1425
1802
  borsh.struct([], "DeprecatedUpdateMultiplierTagBoost"),
1426
1803
  borsh.struct([], "UpdateReserveStatus"),
1427
1804
  borsh.struct([], "UpdateFarmCollateral"),
1428
1805
  borsh.struct([], "UpdateFarmDebt"),
1429
1806
  borsh.struct([], "UpdateDisableUsageAsCollateralOutsideEmode"),
1430
- borsh.struct([], "UpdateBlockBorrowingAboveUtilization"),
1807
+ borsh.struct([], "UpdateBlockBorrowingAboveUtilizationPct"),
1431
1808
  borsh.struct([], "UpdateBlockPriceUsage"),
1432
1809
  borsh.struct([], "UpdateBorrowLimitOutsideElevationGroup"),
1433
1810
  borsh.struct([], "UpdateBorrowLimitsInElevationGroupAgainstThisReserve"),
1434
1811
  borsh.struct([], "UpdateHostFixedInterestRateBps"),
1812
+ borsh.struct([], "UpdateAutodeleverageEnabled"),
1813
+ borsh.struct([], "UpdateDeleveragingBonusIncreaseBpsPerDay"),
1814
+ borsh.struct([], "UpdateProtocolOrderExecutionFee"),
1815
+ borsh.struct([], "UpdateProposerAuthorityLock"),
1816
+ borsh.struct([], "UpdateMinDeleveragingBonusBps"),
1817
+ borsh.struct([], "UpdateBlockCTokenUsage"),
1818
+ borsh.struct([], "UpdateDebtMaturityTimestamp"),
1819
+ borsh.struct([], "UpdateDebtTermSeconds"),
1820
+ borsh.struct([], "UpdateEarlyRepayRemainingInterestPct"),
1821
+ borsh.struct([], "UpdateReserveEmergencyMode"),
1822
+ borsh.struct([], "UpdateRewardsAmountPerAccrualUnit"),
1823
+ borsh.struct([], "UpdateReservePermissionedOps"),
1824
+ borsh.struct([], "UpdateInterestRateBasis"),
1435
1825
  ])
1436
1826
  if (property !== undefined) {
1437
1827
  return ret.replicate(property)