@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
@@ -1,4 +1,4 @@
1
- export type CustomError = InvalidMarketAuthority | InvalidMarketOwner | InvalidAccountOwner | InvalidAmount | InvalidConfig | InvalidSigner | InvalidAccountInput | MathOverflow | InsufficientLiquidity | ReserveStale | WithdrawTooSmall | WithdrawTooLarge | BorrowTooSmall | BorrowTooLarge | RepayTooSmall | LiquidationTooSmall | ObligationHealthy | ObligationStale | ObligationReserveLimit | InvalidObligationOwner | ObligationDepositsEmpty | ObligationBorrowsEmpty | ObligationDepositsZero | ObligationBorrowsZero | InvalidObligationCollateral | InvalidObligationLiquidity | ObligationCollateralEmpty | ObligationLiquidityEmpty | NegativeInterestRate | InvalidOracleConfig | InsufficientProtocolFeesToRedeem | FlashBorrowCpi | NoFlashRepayFound | InvalidFlashRepay | FlashRepayCpi | MultipleFlashBorrows | FlashLoansDisabled | SwitchboardV2Error | CouldNotDeserializeScope | PriceTooOld | PriceTooDivergentFromTwap | InvalidTwapPrice | GlobalEmergencyMode | InvalidFlag | PriceNotValid | PriceIsBiggerThanHeuristic | PriceIsLowerThanHeuristic | PriceIsZero | PriceConfidenceTooWide | IntegerOverflow | NoFarmForReserve | IncorrectInstructionInPosition | NoPriceFound | InvalidTwapConfig | InvalidPythPriceAccount | InvalidSwitchboardAccount | InvalidScopePriceAccount | ObligationCollateralLtvZero | InvalidObligationSeedsValue | InvalidObligationId | InvalidBorrowRateCurvePoint | InvalidUtilizationRate | CannotSocializeObligationWithCollateral | ObligationEmpty | WithdrawalCapReached | LastTimestampGreaterThanCurrent | LiquidationRewardTooSmall | IsolatedAssetTierViolation | InconsistentElevationGroup | InvalidElevationGroup | InvalidElevationGroupConfig | UnhealthyElevationGroupLtv | ElevationGroupNewLoansDisabled | ReserveDeprecated | ReferrerAccountNotInitialized | ReferrerAccountMintMissmatch | ReferrerAccountWrongAddress | ReferrerAccountReferrerMissmatch | ReferrerAccountMissing | InsufficientReferralFeesToRedeem | CpiDisabled | ShortUrlNotAsciiAlphanumeric | ReserveObsolete | ElevationGroupAlreadyActivated | ObligationInDeprecatedReserve | ReferrerStateOwnerMismatch | UserMetadataOwnerAlreadySet | CollateralNonLiquidatable | BorrowingDisabled | BorrowLimitExceeded | DepositLimitExceeded | BorrowingDisabledOutsideElevationGroup | NetValueRemainingTooSmall | WorseLTVBlocked | LiabilitiesBiggerThanAssets | ReserveTokenBalanceMismatch | ReserveVaultBalanceMismatch | ReserveAccountingMismatch | BorrowingAboveUtilizationRateDisabled | LiquidationBorrowFactorPriority | LiquidationLowestLTVPriority | ElevationGroupBorrowLimitExceeded | ElevationGroupWithoutDebtReserve | ElevationGroupMaxCollateralReserveZero | ElevationGroupHasAnotherDebtReserve | ElevationGroupDebtReserveAsCollateral | ObligationCollateralExceedsElevationGroupLimit | ObligationElevationGroupMultipleDebtReserve | UnsupportedTokenExtension | InvalidTokenAccount | DepositDisabledOutsideElevationGroup | CannotCalculateReferralAmountDueToSlotsMismatch;
1
+ export type CustomError = InvalidMarketAuthority | InvalidMarketOwner | InvalidAccountOwner | InvalidAmount | InvalidConfig | InvalidSigner | InvalidAccountInput | MathOverflow | InsufficientLiquidity | ReserveStale | WithdrawTooSmall | WithdrawTooLarge | BorrowTooSmall | BorrowTooLarge | RepayTooSmall | LiquidationTooSmall | ObligationHealthy | ObligationStale | ObligationReserveLimit | InvalidObligationOwner | ObligationDepositsEmpty | ObligationBorrowsEmpty | ObligationDepositsZero | ObligationBorrowsZero | InvalidObligationCollateral | InvalidObligationLiquidity | ObligationCollateralEmpty | ObligationLiquidityEmpty | NegativeInterestRate | InvalidOracleConfig | InsufficientProtocolFeesToRedeem | FlashBorrowCpi | NoFlashRepayFound | InvalidFlashRepay | FlashRepayCpi | MultipleFlashBorrows | FlashLoansDisabled | SwitchboardV2Error | CouldNotDeserializeScope | PriceTooOld | PriceTooDivergentFromTwap | InvalidTwapPrice | GlobalEmergencyMode | InvalidFlag | PriceNotValid | PriceIsBiggerThanHeuristic | PriceIsLowerThanHeuristic | PriceIsZero | PriceConfidenceTooWide | IntegerOverflow | NoFarmForReserve | IncorrectInstructionInPosition | NoPriceFound | InvalidTwapConfig | InvalidPythPriceAccount | InvalidSwitchboardAccount | InvalidScopePriceAccount | ObligationCollateralLtvZero | InvalidObligationSeedsValue | DeprecatedInvalidObligationId | InvalidBorrowRateCurvePoint | InvalidUtilizationRate | CannotSocializeObligationWithCollateral | ObligationEmpty | WithdrawalCapReached | LastTimestampGreaterThanCurrent | LiquidationRewardTooSmall | IsolatedAssetTierViolation | InconsistentElevationGroup | InvalidElevationGroup | InvalidElevationGroupConfig | UnhealthyElevationGroupLtv | ElevationGroupNewLoansDisabled | ReserveDeprecated | ReferrerAccountNotInitialized | ReferrerAccountMintMissmatch | ReferrerAccountWrongAddress | ReferrerAccountReferrerMissmatch | ReferrerAccountMissing | InsufficientReferralFeesToRedeem | CpiDisabled | ShortUrlNotAsciiAlphanumeric | ReserveObsolete | ElevationGroupAlreadyActivated | ObligationInObsoleteReserve | ReferrerStateOwnerMismatch | UserMetadataOwnerAlreadySet | CollateralNonLiquidatable | BorrowingDisabled | BorrowLimitExceeded | DepositLimitExceeded | BorrowingDisabledOutsideElevationGroup | NetValueRemainingTooSmall | WorseLtvBlocked | LiabilitiesBiggerThanAssets | ReserveTokenBalanceMismatch | ReserveVaultBalanceMismatch | ReserveAccountingMismatch | BorrowingAboveUtilizationRateDisabled | LiquidationBorrowFactorPriority | LiquidationLowestLiquidationLtvPriority | ElevationGroupBorrowLimitExceeded | ElevationGroupWithoutDebtReserve | ElevationGroupMaxCollateralReserveZero | ElevationGroupHasAnotherDebtReserve | ElevationGroupDebtReserveAsCollateral | ObligationCollateralExceedsElevationGroupLimit | ObligationElevationGroupMultipleDebtReserve | UnsupportedTokenExtension | InvalidTokenAccount | DepositDisabledOutsideElevationGroup | CannotCalculateReferralAmountDueToSlotsMismatch | ObligationOwnersMustMatch | ObligationsMustMatch | LendingMarketsMustMatch | ObligationCurrentlyMarkedForDeleveraging | MaximumWithdrawValueZero | ZeroMaxLtvAssetsInDeposits | LowestLtvAssetsPriority | WorseLtvThanUnhealthyLtv | FarmAccountsMissing | RepayTooSmallForFullLiquidation | InsufficientRepayAmount | OrderIndexOutOfBounds | InvalidOrderConfiguration | OrderConfigurationNotSupportedByObligation | OperationNotPermittedWithCurrentObligationOrders | OperationNotPermittedMarketImmutable | OrderCreationDisabled | NoUpgradeAuthority | InitialAdminDepositExecuted | ReserveHasNotReceivedInitialDeposit | CTokenUsageBlocked | CannotUseSameReserve | TransactionIncludesRestrictedPrograms | BorrowOrderDebtLiquidityMintMismatch | BorrowOrderMaxBorrowRateExceeded | BorrowOrderMinDebtTermInsufficient | BorrowOrderFillTimeLimitExceeded | ReserveDebtMaturityReached | NonUpdatableOrderConfiguration | BorrowOrderExecutionDisabled | DebtReachedReserveDebtTerm | ExpectationNotMet | BorrowOrderFillValueTooSmall | WithdrawTicketIssuanceDisabled | WithdrawTicketRedemptionDisabled | WithdrawTicketStillValid | WithdrawTicketRequiresFullRedemption | UserTokenBalanceMismatch | WithdrawQueuedLiquidityValueTooSmall | InvalidTokenAccountState | WithdrawTicketInvalid | BorrowOrderValueTooSmall | WithdrawTicketValueTooSmall | InvalidWithdrawTicketProgressCallbackConfig | WithdrawTicketProgressCallbackAccountsMissing | BorrowRolloverConfigurationDisabled | InvalidObligationConfigUpdateSubject | BorrowRolloverLiquidityMintMismatch | ObligationBorrowRolloverNotApplicable | ObligationBorrowOutsideRolloverWindow | ObligationBorrowRolloverNotEnabledByOwner | ObligationBorrowRolloverTargetReserveMismatch | BorrowRolloverExecutionDisabled | ObligationAccountingMismatch | PartialRolloverValueTooSmall | ObligationBorrowRolloverConfigMismatch | ObligationBorrowRolloverMustProlongDebtTerm | RolloverNotSupportedInElevationGroup | WithdrawTicketCancellationDisabled | WithdrawTicketFullyCancelled | CloneSourceReserveDisabled | CloneTargetReserveAlreadyInUse | ClonedReserveLiquidityMintMismatch | ReserveEmergencyMode | ObligationOwnershipTransferInProgress | ObligationOwnershipTransferNotInInitiatedState | ObligationPendingOwnerNotSet | ObligationInvalidPendingOwner | ObligationOwnershipTransferNotApproved | ObligationHasActiveBorrowOrders | OnlyComputeBudgetCompanionIxsAllowed | MissingPermissioner | ReserveRewardsDisabled | TransactionIncludesNonceInstruction;
2
2
  export declare class InvalidMarketAuthority extends Error {
3
3
  readonly logs?: string[];
4
4
  static readonly code = 6000;
@@ -44,7 +44,7 @@ export declare class InvalidSigner extends Error {
44
44
  static readonly code = 6005;
45
45
  readonly code = 6005;
46
46
  readonly name = "InvalidSigner";
47
- readonly msg = "Input account must be a signer";
47
+ readonly msg = "Signer is not allowed to perform this action";
48
48
  constructor(logs?: string[]);
49
49
  }
50
50
  export declare class InvalidAccountInput extends Error {
@@ -471,12 +471,12 @@ export declare class InvalidObligationSeedsValue extends Error {
471
471
  readonly msg = "Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2";
472
472
  constructor(logs?: string[]);
473
473
  }
474
- export declare class InvalidObligationId extends Error {
474
+ export declare class DeprecatedInvalidObligationId extends Error {
475
475
  readonly logs?: string[];
476
476
  static readonly code = 6059;
477
477
  readonly code = 6059;
478
- readonly name = "InvalidObligationId";
479
- readonly msg = "Obligation id must be 0";
478
+ readonly name = "DeprecatedInvalidObligationId";
479
+ readonly msg = "[DEPRECATED] Obligation id must be 0";
480
480
  constructor(logs?: string[]);
481
481
  }
482
482
  export declare class InvalidBorrowRateCurvePoint extends Error {
@@ -671,12 +671,12 @@ export declare class ElevationGroupAlreadyActivated extends Error {
671
671
  readonly msg = "Obligation already part of the same elevation group";
672
672
  constructor(logs?: string[]);
673
673
  }
674
- export declare class ObligationInDeprecatedReserve extends Error {
674
+ export declare class ObligationInObsoleteReserve extends Error {
675
675
  readonly logs?: string[];
676
676
  static readonly code = 6084;
677
677
  readonly code = 6084;
678
- readonly name = "ObligationInDeprecatedReserve";
679
- readonly msg = "Obligation has a deposit in a deprecated reserve";
678
+ readonly name = "ObligationInObsoleteReserve";
679
+ readonly msg = "Obligation has a deposit or borrow in an obsolete reserve";
680
680
  constructor(logs?: string[]);
681
681
  }
682
682
  export declare class ReferrerStateOwnerMismatch extends Error {
@@ -743,11 +743,11 @@ export declare class NetValueRemainingTooSmall extends Error {
743
743
  readonly msg = "Net value remaining too small";
744
744
  constructor(logs?: string[]);
745
745
  }
746
- export declare class WorseLTVBlocked extends Error {
746
+ export declare class WorseLtvBlocked extends Error {
747
747
  readonly logs?: string[];
748
748
  static readonly code = 6093;
749
749
  readonly code = 6093;
750
- readonly name = "WorseLTVBlocked";
750
+ readonly name = "WorseLtvBlocked";
751
751
  readonly msg = "Cannot get the obligation in a worse position";
752
752
  constructor(logs?: string[]);
753
753
  }
@@ -799,12 +799,12 @@ export declare class LiquidationBorrowFactorPriority extends Error {
799
799
  readonly msg = "Liquidation must prioritize the debt with the highest borrow factor";
800
800
  constructor(logs?: string[]);
801
801
  }
802
- export declare class LiquidationLowestLTVPriority extends Error {
802
+ export declare class LiquidationLowestLiquidationLtvPriority extends Error {
803
803
  readonly logs?: string[];
804
804
  static readonly code = 6100;
805
805
  readonly code = 6100;
806
- readonly name = "LiquidationLowestLTVPriority";
807
- readonly msg = "Liquidation must prioritize the collateral with the lowest LTV";
806
+ readonly name = "LiquidationLowestLiquidationLtvPriority";
807
+ readonly msg = "Liquidation must prioritize the collateral with the lowest liquidation LTV";
808
808
  constructor(logs?: string[]);
809
809
  }
810
810
  export declare class ElevationGroupBorrowLimitExceeded extends Error {
@@ -895,4 +895,596 @@ export declare class CannotCalculateReferralAmountDueToSlotsMismatch extends Err
895
895
  readonly msg = "Cannot calculate referral amount due to slots mismatch";
896
896
  constructor(logs?: string[]);
897
897
  }
898
+ export declare class ObligationOwnersMustMatch extends Error {
899
+ readonly logs?: string[];
900
+ static readonly code = 6112;
901
+ readonly code = 6112;
902
+ readonly name = "ObligationOwnersMustMatch";
903
+ readonly msg = "Obligation owners must match";
904
+ constructor(logs?: string[]);
905
+ }
906
+ export declare class ObligationsMustMatch extends Error {
907
+ readonly logs?: string[];
908
+ static readonly code = 6113;
909
+ readonly code = 6113;
910
+ readonly name = "ObligationsMustMatch";
911
+ readonly msg = "Obligations must match";
912
+ constructor(logs?: string[]);
913
+ }
914
+ export declare class LendingMarketsMustMatch extends Error {
915
+ readonly logs?: string[];
916
+ static readonly code = 6114;
917
+ readonly code = 6114;
918
+ readonly name = "LendingMarketsMustMatch";
919
+ readonly msg = "Lending markets must match";
920
+ constructor(logs?: string[]);
921
+ }
922
+ export declare class ObligationCurrentlyMarkedForDeleveraging extends Error {
923
+ readonly logs?: string[];
924
+ static readonly code = 6115;
925
+ readonly code = 6115;
926
+ readonly name = "ObligationCurrentlyMarkedForDeleveraging";
927
+ readonly msg = "Obligation is already marked for deleveraging";
928
+ constructor(logs?: string[]);
929
+ }
930
+ export declare class MaximumWithdrawValueZero extends Error {
931
+ readonly logs?: string[];
932
+ static readonly code = 6116;
933
+ readonly code = 6116;
934
+ readonly name = "MaximumWithdrawValueZero";
935
+ readonly msg = "Maximum withdrawable value of this collateral is zero, LTV needs improved";
936
+ constructor(logs?: string[]);
937
+ }
938
+ export declare class ZeroMaxLtvAssetsInDeposits extends Error {
939
+ readonly logs?: string[];
940
+ static readonly code = 6117;
941
+ readonly code = 6117;
942
+ readonly name = "ZeroMaxLtvAssetsInDeposits";
943
+ readonly msg = "No max LTV 0 assets allowed in deposits for repay and withdraw";
944
+ constructor(logs?: string[]);
945
+ }
946
+ export declare class LowestLtvAssetsPriority extends Error {
947
+ readonly logs?: string[];
948
+ static readonly code = 6118;
949
+ readonly code = 6118;
950
+ readonly name = "LowestLtvAssetsPriority";
951
+ readonly msg = "Withdrawing must prioritize the collateral with the lowest reserve max-LTV";
952
+ constructor(logs?: string[]);
953
+ }
954
+ export declare class WorseLtvThanUnhealthyLtv extends Error {
955
+ readonly logs?: string[];
956
+ static readonly code = 6119;
957
+ readonly code = 6119;
958
+ readonly name = "WorseLtvThanUnhealthyLtv";
959
+ readonly msg = "Cannot get the obligation liquidatable";
960
+ constructor(logs?: string[]);
961
+ }
962
+ export declare class FarmAccountsMissing extends Error {
963
+ readonly logs?: string[];
964
+ static readonly code = 6120;
965
+ readonly code = 6120;
966
+ readonly name = "FarmAccountsMissing";
967
+ readonly msg = "Farm accounts to refresh are missing";
968
+ constructor(logs?: string[]);
969
+ }
970
+ export declare class RepayTooSmallForFullLiquidation extends Error {
971
+ readonly logs?: string[];
972
+ static readonly code = 6121;
973
+ readonly code = 6121;
974
+ readonly name = "RepayTooSmallForFullLiquidation";
975
+ readonly msg = "Repay amount is too small to satisfy the mandatory full liquidation";
976
+ constructor(logs?: string[]);
977
+ }
978
+ export declare class InsufficientRepayAmount extends Error {
979
+ readonly logs?: string[];
980
+ static readonly code = 6122;
981
+ readonly code = 6122;
982
+ readonly name = "InsufficientRepayAmount";
983
+ readonly msg = "Liquidator provided repay amount lower than required by liquidation rules";
984
+ constructor(logs?: string[]);
985
+ }
986
+ export declare class OrderIndexOutOfBounds extends Error {
987
+ readonly logs?: string[];
988
+ static readonly code = 6123;
989
+ readonly code = 6123;
990
+ readonly name = "OrderIndexOutOfBounds";
991
+ readonly msg = "Order of the given index cannot exist";
992
+ constructor(logs?: string[]);
993
+ }
994
+ export declare class InvalidOrderConfiguration extends Error {
995
+ readonly logs?: string[];
996
+ static readonly code = 6124;
997
+ readonly code = 6124;
998
+ readonly name = "InvalidOrderConfiguration";
999
+ readonly msg = "Given order configuration has wrong parameters";
1000
+ constructor(logs?: string[]);
1001
+ }
1002
+ export declare class OrderConfigurationNotSupportedByObligation extends Error {
1003
+ readonly logs?: string[];
1004
+ static readonly code = 6125;
1005
+ readonly code = 6125;
1006
+ readonly name = "OrderConfigurationNotSupportedByObligation";
1007
+ readonly msg = "Given order configuration cannot be used with the current state of the obligation";
1008
+ constructor(logs?: string[]);
1009
+ }
1010
+ export declare class OperationNotPermittedWithCurrentObligationOrders extends Error {
1011
+ readonly logs?: string[];
1012
+ static readonly code = 6126;
1013
+ readonly code = 6126;
1014
+ readonly name = "OperationNotPermittedWithCurrentObligationOrders";
1015
+ readonly msg = "Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count";
1016
+ constructor(logs?: string[]);
1017
+ }
1018
+ export declare class OperationNotPermittedMarketImmutable extends Error {
1019
+ readonly logs?: string[];
1020
+ static readonly code = 6127;
1021
+ readonly code = 6127;
1022
+ readonly name = "OperationNotPermittedMarketImmutable";
1023
+ readonly msg = "Cannot update lending market because it is set as immutable";
1024
+ constructor(logs?: string[]);
1025
+ }
1026
+ export declare class OrderCreationDisabled extends Error {
1027
+ readonly logs?: string[];
1028
+ static readonly code = 6128;
1029
+ readonly code = 6128;
1030
+ readonly name = "OrderCreationDisabled";
1031
+ readonly msg = "Creation of new orders is disabled";
1032
+ constructor(logs?: string[]);
1033
+ }
1034
+ export declare class NoUpgradeAuthority extends Error {
1035
+ readonly logs?: string[];
1036
+ static readonly code = 6129;
1037
+ readonly code = 6129;
1038
+ readonly name = "NoUpgradeAuthority";
1039
+ readonly msg = "Cannot initialize global config because there is no upgrade authority to the program";
1040
+ constructor(logs?: string[]);
1041
+ }
1042
+ export declare class InitialAdminDepositExecuted extends Error {
1043
+ readonly logs?: string[];
1044
+ static readonly code = 6130;
1045
+ readonly code = 6130;
1046
+ readonly name = "InitialAdminDepositExecuted";
1047
+ readonly msg = "Initial admin deposit in reserve already executed";
1048
+ constructor(logs?: string[]);
1049
+ }
1050
+ export declare class ReserveHasNotReceivedInitialDeposit extends Error {
1051
+ readonly logs?: string[];
1052
+ static readonly code = 6131;
1053
+ readonly code = 6131;
1054
+ readonly name = "ReserveHasNotReceivedInitialDeposit";
1055
+ readonly msg = "Reserve has not received the initial deposit, cannot update config";
1056
+ constructor(logs?: string[]);
1057
+ }
1058
+ export declare class CTokenUsageBlocked extends Error {
1059
+ readonly logs?: string[];
1060
+ static readonly code = 6132;
1061
+ readonly code = 6132;
1062
+ readonly name = "CTokenUsageBlocked";
1063
+ readonly msg = "CToken minting/redeeming is blocked for this reserve";
1064
+ constructor(logs?: string[]);
1065
+ }
1066
+ export declare class CannotUseSameReserve extends Error {
1067
+ readonly logs?: string[];
1068
+ static readonly code = 6133;
1069
+ readonly code = 6133;
1070
+ readonly name = "CannotUseSameReserve";
1071
+ readonly msg = "Cannot call ix with same reserve";
1072
+ constructor(logs?: string[]);
1073
+ }
1074
+ export declare class TransactionIncludesRestrictedPrograms extends Error {
1075
+ readonly logs?: string[];
1076
+ static readonly code = 6134;
1077
+ readonly code = 6134;
1078
+ readonly name = "TransactionIncludesRestrictedPrograms";
1079
+ readonly msg = "Transaction includes restricted programs";
1080
+ constructor(logs?: string[]);
1081
+ }
1082
+ export declare class BorrowOrderDebtLiquidityMintMismatch extends Error {
1083
+ readonly logs?: string[];
1084
+ static readonly code = 6135;
1085
+ readonly code = 6135;
1086
+ readonly name = "BorrowOrderDebtLiquidityMintMismatch";
1087
+ readonly msg = "There is no borrow order requesting debt in the given asset";
1088
+ constructor(logs?: string[]);
1089
+ }
1090
+ export declare class BorrowOrderMaxBorrowRateExceeded extends Error {
1091
+ readonly logs?: string[];
1092
+ static readonly code = 6136;
1093
+ readonly code = 6136;
1094
+ readonly name = "BorrowOrderMaxBorrowRateExceeded";
1095
+ readonly msg = "Reserve used for fill exceeds the maximum borrow rate specified by the order";
1096
+ constructor(logs?: string[]);
1097
+ }
1098
+ export declare class BorrowOrderMinDebtTermInsufficient extends Error {
1099
+ readonly logs?: string[];
1100
+ static readonly code = 6137;
1101
+ readonly code = 6137;
1102
+ readonly name = "BorrowOrderMinDebtTermInsufficient";
1103
+ readonly msg = "Reserve used for fill defines a debt term shorter than specified by the order";
1104
+ constructor(logs?: string[]);
1105
+ }
1106
+ export declare class BorrowOrderFillTimeLimitExceeded extends Error {
1107
+ readonly logs?: string[];
1108
+ static readonly code = 6138;
1109
+ readonly code = 6138;
1110
+ readonly name = "BorrowOrderFillTimeLimitExceeded";
1111
+ readonly msg = "Borrow order can no longer be filled";
1112
+ constructor(logs?: string[]);
1113
+ }
1114
+ export declare class ReserveDebtMaturityReached extends Error {
1115
+ readonly logs?: string[];
1116
+ static readonly code = 6139;
1117
+ readonly code = 6139;
1118
+ readonly name = "ReserveDebtMaturityReached";
1119
+ readonly msg = "Cannot borrow from a reserve that reached its debt maturity timestamp";
1120
+ constructor(logs?: string[]);
1121
+ }
1122
+ export declare class NonUpdatableOrderConfiguration extends Error {
1123
+ readonly logs?: string[];
1124
+ static readonly code = 6140;
1125
+ readonly code = 6140;
1126
+ readonly name = "NonUpdatableOrderConfiguration";
1127
+ readonly msg = "Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)";
1128
+ constructor(logs?: string[]);
1129
+ }
1130
+ export declare class BorrowOrderExecutionDisabled extends Error {
1131
+ readonly logs?: string[];
1132
+ static readonly code = 6141;
1133
+ readonly code = 6141;
1134
+ readonly name = "BorrowOrderExecutionDisabled";
1135
+ readonly msg = "Execution of borrow orders is disabled";
1136
+ constructor(logs?: string[]);
1137
+ }
1138
+ export declare class DebtReachedReserveDebtTerm extends Error {
1139
+ readonly logs?: string[];
1140
+ static readonly code = 6142;
1141
+ readonly code = 6142;
1142
+ readonly name = "DebtReachedReserveDebtTerm";
1143
+ readonly msg = "Cannot increase the debt that has reached its end of term configured by the reserve";
1144
+ constructor(logs?: string[]);
1145
+ }
1146
+ export declare class ExpectationNotMet extends Error {
1147
+ readonly logs?: string[];
1148
+ static readonly code = 6143;
1149
+ readonly code = 6143;
1150
+ readonly name = "ExpectationNotMet";
1151
+ readonly msg = "The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)";
1152
+ constructor(logs?: string[]);
1153
+ }
1154
+ export declare class BorrowOrderFillValueTooSmall extends Error {
1155
+ readonly logs?: string[];
1156
+ static readonly code = 6144;
1157
+ readonly code = 6144;
1158
+ readonly name = "BorrowOrderFillValueTooSmall";
1159
+ readonly msg = "Available liquidity could not satisfy the minimum required borrow order fill value";
1160
+ constructor(logs?: string[]);
1161
+ }
1162
+ export declare class WithdrawTicketIssuanceDisabled extends Error {
1163
+ readonly logs?: string[];
1164
+ static readonly code = 6145;
1165
+ readonly code = 6145;
1166
+ readonly name = "WithdrawTicketIssuanceDisabled";
1167
+ readonly msg = "Issuing new withdraw tickets is disabled by the market";
1168
+ constructor(logs?: string[]);
1169
+ }
1170
+ export declare class WithdrawTicketRedemptionDisabled extends Error {
1171
+ readonly logs?: string[];
1172
+ static readonly code = 6146;
1173
+ readonly code = 6146;
1174
+ readonly name = "WithdrawTicketRedemptionDisabled";
1175
+ readonly msg = "Redeeming withdraw tickets is disabled by the market";
1176
+ constructor(logs?: string[]);
1177
+ }
1178
+ export declare class WithdrawTicketStillValid extends Error {
1179
+ readonly logs?: string[];
1180
+ static readonly code = 6147;
1181
+ readonly code = 6147;
1182
+ readonly name = "WithdrawTicketStillValid";
1183
+ readonly msg = "Recovering collateral is only available after the withdraw ticket has been marked invalid";
1184
+ constructor(logs?: string[]);
1185
+ }
1186
+ export declare class WithdrawTicketRequiresFullRedemption extends Error {
1187
+ readonly logs?: string[];
1188
+ static readonly code = 6148;
1189
+ readonly code = 6148;
1190
+ readonly name = "WithdrawTicketRequiresFullRedemption";
1191
+ readonly msg = "The withdraw ticket's current state requires that it is fully redeemed (e.g. due to owner ATA creation), but there is not enough liquidity";
1192
+ constructor(logs?: string[]);
1193
+ }
1194
+ export declare class UserTokenBalanceMismatch extends Error {
1195
+ readonly logs?: string[];
1196
+ static readonly code = 6149;
1197
+ readonly code = 6149;
1198
+ readonly name = "UserTokenBalanceMismatch";
1199
+ readonly msg = "The user's token account has changed its balance in an unexpected way";
1200
+ constructor(logs?: string[]);
1201
+ }
1202
+ export declare class WithdrawQueuedLiquidityValueTooSmall extends Error {
1203
+ readonly logs?: string[];
1204
+ static readonly code = 6150;
1205
+ readonly code = 6150;
1206
+ readonly name = "WithdrawQueuedLiquidityValueTooSmall";
1207
+ readonly msg = "Available liquidity could not satisfy the minimum required ticketed withdrawal value";
1208
+ constructor(logs?: string[]);
1209
+ }
1210
+ export declare class InvalidTokenAccountState extends Error {
1211
+ readonly logs?: string[];
1212
+ static readonly code = 6151;
1213
+ readonly code = 6151;
1214
+ readonly name = "InvalidTokenAccountState";
1215
+ readonly msg = "Token account is in a state preventing the handler's operation (e.g. frozen or delegate)";
1216
+ constructor(logs?: string[]);
1217
+ }
1218
+ export declare class WithdrawTicketInvalid extends Error {
1219
+ readonly logs?: string[];
1220
+ static readonly code = 6152;
1221
+ readonly code = 6152;
1222
+ readonly name = "WithdrawTicketInvalid";
1223
+ readonly msg = "Cannot use ticket that was already marked invalid";
1224
+ constructor(logs?: string[]);
1225
+ }
1226
+ export declare class BorrowOrderValueTooSmall extends Error {
1227
+ readonly logs?: string[];
1228
+ static readonly code = 6153;
1229
+ readonly code = 6153;
1230
+ readonly name = "BorrowOrderValueTooSmall";
1231
+ readonly msg = "Borrow order's value would be below the market-configured minimum";
1232
+ constructor(logs?: string[]);
1233
+ }
1234
+ export declare class WithdrawTicketValueTooSmall extends Error {
1235
+ readonly logs?: string[];
1236
+ static readonly code = 6154;
1237
+ readonly code = 6154;
1238
+ readonly name = "WithdrawTicketValueTooSmall";
1239
+ readonly msg = "Withdraw ticket's value would be below the market-configured minimum";
1240
+ constructor(logs?: string[]);
1241
+ }
1242
+ export declare class InvalidWithdrawTicketProgressCallbackConfig extends Error {
1243
+ readonly logs?: string[];
1244
+ static readonly code = 6155;
1245
+ readonly code = 6155;
1246
+ readonly name = "InvalidWithdrawTicketProgressCallbackConfig";
1247
+ readonly msg = "Invalid configuration or required custom accounts for the requested withdraw ticket callback type";
1248
+ constructor(logs?: string[]);
1249
+ }
1250
+ export declare class WithdrawTicketProgressCallbackAccountsMissing extends Error {
1251
+ readonly logs?: string[];
1252
+ static readonly code = 6156;
1253
+ readonly code = 6156;
1254
+ readonly name = "WithdrawTicketProgressCallbackAccountsMissing";
1255
+ readonly msg = "One or more accounts required by the ticket's configured progress callback are missing";
1256
+ constructor(logs?: string[]);
1257
+ }
1258
+ export declare class BorrowRolloverConfigurationDisabled extends Error {
1259
+ readonly logs?: string[];
1260
+ static readonly code = 6157;
1261
+ readonly code = 6157;
1262
+ readonly name = "BorrowRolloverConfigurationDisabled";
1263
+ readonly msg = "Configuring auto-rollover on loans is disabled by market owner";
1264
+ constructor(logs?: string[]);
1265
+ }
1266
+ export declare class InvalidObligationConfigUpdateSubject extends Error {
1267
+ readonly logs?: string[];
1268
+ static readonly code = 6158;
1269
+ readonly code = 6158;
1270
+ readonly name = "InvalidObligationConfigUpdateSubject";
1271
+ readonly msg = "Invalid specification of the Obligation's part to be configured";
1272
+ constructor(logs?: string[]);
1273
+ }
1274
+ export declare class BorrowRolloverLiquidityMintMismatch extends Error {
1275
+ readonly logs?: string[];
1276
+ static readonly code = 6159;
1277
+ readonly code = 6159;
1278
+ readonly name = "BorrowRolloverLiquidityMintMismatch";
1279
+ readonly msg = "Auto-rollover must use a target reserve of the same token";
1280
+ constructor(logs?: string[]);
1281
+ }
1282
+ export declare class ObligationBorrowRolloverNotApplicable extends Error {
1283
+ readonly logs?: string[];
1284
+ static readonly code = 6160;
1285
+ readonly code = 6160;
1286
+ readonly name = "ObligationBorrowRolloverNotApplicable";
1287
+ readonly msg = "The given borrow is not fixed-term and does not require rolling over";
1288
+ constructor(logs?: string[]);
1289
+ }
1290
+ export declare class ObligationBorrowOutsideRolloverWindow extends Error {
1291
+ readonly logs?: string[];
1292
+ static readonly code = 6161;
1293
+ readonly code = 6161;
1294
+ readonly name = "ObligationBorrowOutsideRolloverWindow";
1295
+ readonly msg = "The given borrow is outside the corresponding market-configured rollover window";
1296
+ constructor(logs?: string[]);
1297
+ }
1298
+ export declare class ObligationBorrowRolloverNotEnabledByOwner extends Error {
1299
+ readonly logs?: string[];
1300
+ static readonly code = 6162;
1301
+ readonly code = 6162;
1302
+ readonly name = "ObligationBorrowRolloverNotEnabledByOwner";
1303
+ readonly msg = "Obligation's owner did not opt-in for auto-rollover of the given borrow";
1304
+ constructor(logs?: string[]);
1305
+ }
1306
+ export declare class ObligationBorrowRolloverTargetReserveMismatch extends Error {
1307
+ readonly logs?: string[];
1308
+ static readonly code = 6163;
1309
+ readonly code = 6163;
1310
+ readonly name = "ObligationBorrowRolloverTargetReserveMismatch";
1311
+ readonly msg = "Obligation's owner did not allow to roll over into terms offered by the given reserve";
1312
+ constructor(logs?: string[]);
1313
+ }
1314
+ export declare class BorrowRolloverExecutionDisabled extends Error {
1315
+ readonly logs?: string[];
1316
+ static readonly code = 6164;
1317
+ readonly code = 6164;
1318
+ readonly name = "BorrowRolloverExecutionDisabled";
1319
+ readonly msg = "Executing auto-rollover is disabled by market owner";
1320
+ constructor(logs?: string[]);
1321
+ }
1322
+ export declare class ObligationAccountingMismatch extends Error {
1323
+ readonly logs?: string[];
1324
+ static readonly code = 6165;
1325
+ readonly code = 6165;
1326
+ readonly name = "ObligationAccountingMismatch";
1327
+ readonly msg = "Obligation internal state accounting has been unexpectedly modified";
1328
+ constructor(logs?: string[]);
1329
+ }
1330
+ export declare class PartialRolloverValueTooSmall extends Error {
1331
+ readonly logs?: string[];
1332
+ static readonly code = 6166;
1333
+ readonly code = 6166;
1334
+ readonly name = "PartialRolloverValueTooSmall";
1335
+ readonly msg = "Partial rollover amount is below the market-configured minimum value";
1336
+ constructor(logs?: string[]);
1337
+ }
1338
+ export declare class ObligationBorrowRolloverConfigMismatch extends Error {
1339
+ readonly logs?: string[];
1340
+ static readonly code = 6167;
1341
+ readonly code = 6167;
1342
+ readonly name = "ObligationBorrowRolloverConfigMismatch";
1343
+ readonly msg = "Pre-existing rollover configuration of the loan cannot be overwritten by the operation";
1344
+ constructor(logs?: string[]);
1345
+ }
1346
+ export declare class ObligationBorrowRolloverMustProlongDebtTerm extends Error {
1347
+ readonly logs?: string[];
1348
+ static readonly code = 6168;
1349
+ readonly code = 6168;
1350
+ readonly name = "ObligationBorrowRolloverMustProlongDebtTerm";
1351
+ readonly msg = "Rollover into existing borrow must prolong the remaining debt term";
1352
+ constructor(logs?: string[]);
1353
+ }
1354
+ export declare class RolloverNotSupportedInElevationGroup extends Error {
1355
+ readonly logs?: string[];
1356
+ static readonly code = 6169;
1357
+ readonly code = 6169;
1358
+ readonly name = "RolloverNotSupportedInElevationGroup";
1359
+ readonly msg = "Rollover is not supported for obligations in an elevation group";
1360
+ constructor(logs?: string[]);
1361
+ }
1362
+ export declare class WithdrawTicketCancellationDisabled extends Error {
1363
+ readonly logs?: string[];
1364
+ static readonly code = 6170;
1365
+ readonly code = 6170;
1366
+ readonly name = "WithdrawTicketCancellationDisabled";
1367
+ readonly msg = "Cancelling withdraw tickets is disabled by the market";
1368
+ constructor(logs?: string[]);
1369
+ }
1370
+ export declare class WithdrawTicketFullyCancelled extends Error {
1371
+ readonly logs?: string[];
1372
+ static readonly code = 6171;
1373
+ readonly code = 6171;
1374
+ readonly name = "WithdrawTicketFullyCancelled";
1375
+ readonly msg = "Cannot use ticket that was already fully-cancelled";
1376
+ constructor(logs?: string[]);
1377
+ }
1378
+ export declare class CloneSourceReserveDisabled extends Error {
1379
+ readonly logs?: string[];
1380
+ static readonly code = 6172;
1381
+ readonly code = 6172;
1382
+ readonly name = "CloneSourceReserveDisabled";
1383
+ readonly msg = "Cannot clone config from a reserve that is disabled";
1384
+ constructor(logs?: string[]);
1385
+ }
1386
+ export declare class CloneTargetReserveAlreadyInUse extends Error {
1387
+ readonly logs?: string[];
1388
+ static readonly code = 6173;
1389
+ readonly code = 6173;
1390
+ readonly name = "CloneTargetReserveAlreadyInUse";
1391
+ readonly msg = "Cannot clone config into a reserve that has been in use";
1392
+ constructor(logs?: string[]);
1393
+ }
1394
+ export declare class ClonedReserveLiquidityMintMismatch extends Error {
1395
+ readonly logs?: string[];
1396
+ static readonly code = 6174;
1397
+ readonly code = 6174;
1398
+ readonly name = "ClonedReserveLiquidityMintMismatch";
1399
+ readonly msg = "Cannot clone config between reserves of different mints";
1400
+ constructor(logs?: string[]);
1401
+ }
1402
+ export declare class ReserveEmergencyMode extends Error {
1403
+ readonly logs?: string[];
1404
+ static readonly code = 6175;
1405
+ readonly code = 6175;
1406
+ readonly name = "ReserveEmergencyMode";
1407
+ readonly msg = "Reserve emergency mode is enabled";
1408
+ constructor(logs?: string[]);
1409
+ }
1410
+ export declare class ObligationOwnershipTransferInProgress extends Error {
1411
+ readonly logs?: string[];
1412
+ static readonly code = 6176;
1413
+ readonly code = 6176;
1414
+ readonly name = "ObligationOwnershipTransferInProgress";
1415
+ readonly msg = "Obligation ownership transfer is in progress";
1416
+ constructor(logs?: string[]);
1417
+ }
1418
+ export declare class ObligationOwnershipTransferNotInInitiatedState extends Error {
1419
+ readonly logs?: string[];
1420
+ static readonly code = 6177;
1421
+ readonly code = 6177;
1422
+ readonly name = "ObligationOwnershipTransferNotInInitiatedState";
1423
+ readonly msg = "Obligation ownership transfer is not in initiated state";
1424
+ constructor(logs?: string[]);
1425
+ }
1426
+ export declare class ObligationPendingOwnerNotSet extends Error {
1427
+ readonly logs?: string[];
1428
+ static readonly code = 6178;
1429
+ readonly code = 6178;
1430
+ readonly name = "ObligationPendingOwnerNotSet";
1431
+ readonly msg = "Obligation pending owner not set";
1432
+ constructor(logs?: string[]);
1433
+ }
1434
+ export declare class ObligationInvalidPendingOwner extends Error {
1435
+ readonly logs?: string[];
1436
+ static readonly code = 6179;
1437
+ readonly code = 6179;
1438
+ readonly name = "ObligationInvalidPendingOwner";
1439
+ readonly msg = "Invalid pending owner address";
1440
+ constructor(logs?: string[]);
1441
+ }
1442
+ export declare class ObligationOwnershipTransferNotApproved extends Error {
1443
+ readonly logs?: string[];
1444
+ static readonly code = 6180;
1445
+ readonly code = 6180;
1446
+ readonly name = "ObligationOwnershipTransferNotApproved";
1447
+ readonly msg = "Obligation ownership transfer not approved by admin";
1448
+ constructor(logs?: string[]);
1449
+ }
1450
+ export declare class ObligationHasActiveBorrowOrders extends Error {
1451
+ readonly logs?: string[];
1452
+ static readonly code = 6181;
1453
+ readonly code = 6181;
1454
+ readonly name = "ObligationHasActiveBorrowOrders";
1455
+ readonly msg = "Obligation has active borrow orders";
1456
+ constructor(logs?: string[]);
1457
+ }
1458
+ export declare class OnlyComputeBudgetCompanionIxsAllowed extends Error {
1459
+ readonly logs?: string[];
1460
+ static readonly code = 6182;
1461
+ readonly code = 6182;
1462
+ readonly name = "OnlyComputeBudgetCompanionIxsAllowed";
1463
+ readonly msg = "Only ComputeBudget instructions may accompany this instruction";
1464
+ constructor(logs?: string[]);
1465
+ }
1466
+ export declare class MissingPermissioner extends Error {
1467
+ readonly logs?: string[];
1468
+ static readonly code = 6183;
1469
+ readonly code = 6183;
1470
+ readonly name = "MissingPermissioner";
1471
+ readonly msg = "Required permissioning account is missing";
1472
+ constructor(logs?: string[]);
1473
+ }
1474
+ export declare class ReserveRewardsDisabled extends Error {
1475
+ readonly logs?: string[];
1476
+ static readonly code = 6184;
1477
+ readonly code = 6184;
1478
+ readonly name = "ReserveRewardsDisabled";
1479
+ readonly msg = "Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)";
1480
+ constructor(logs?: string[]);
1481
+ }
1482
+ export declare class TransactionIncludesNonceInstruction extends Error {
1483
+ readonly logs?: string[];
1484
+ static readonly code = 6185;
1485
+ readonly code = 6185;
1486
+ readonly name = "TransactionIncludesNonceInstruction";
1487
+ readonly msg = "Transaction includes a nonce instruction, which is not allowed for admin operations";
1488
+ constructor(logs?: string[]);
1489
+ }
898
1490
  export declare function fromCode(code: number, logs?: string[]): CustomError | null;