@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
@@ -58,7 +58,7 @@ export type CustomError =
58
58
  | InvalidScopePriceAccount
59
59
  | ObligationCollateralLtvZero
60
60
  | InvalidObligationSeedsValue
61
- | InvalidObligationId
61
+ | DeprecatedInvalidObligationId
62
62
  | InvalidBorrowRateCurvePoint
63
63
  | InvalidUtilizationRate
64
64
  | CannotSocializeObligationWithCollateral
@@ -83,7 +83,7 @@ export type CustomError =
83
83
  | ShortUrlNotAsciiAlphanumeric
84
84
  | ReserveObsolete
85
85
  | ElevationGroupAlreadyActivated
86
- | ObligationInDeprecatedReserve
86
+ | ObligationInObsoleteReserve
87
87
  | ReferrerStateOwnerMismatch
88
88
  | UserMetadataOwnerAlreadySet
89
89
  | CollateralNonLiquidatable
@@ -92,14 +92,14 @@ export type CustomError =
92
92
  | DepositLimitExceeded
93
93
  | BorrowingDisabledOutsideElevationGroup
94
94
  | NetValueRemainingTooSmall
95
- | WorseLTVBlocked
95
+ | WorseLtvBlocked
96
96
  | LiabilitiesBiggerThanAssets
97
97
  | ReserveTokenBalanceMismatch
98
98
  | ReserveVaultBalanceMismatch
99
99
  | ReserveAccountingMismatch
100
100
  | BorrowingAboveUtilizationRateDisabled
101
101
  | LiquidationBorrowFactorPriority
102
- | LiquidationLowestLTVPriority
102
+ | LiquidationLowestLiquidationLtvPriority
103
103
  | ElevationGroupBorrowLimitExceeded
104
104
  | ElevationGroupWithoutDebtReserve
105
105
  | ElevationGroupMaxCollateralReserveZero
@@ -111,6 +111,80 @@ export type CustomError =
111
111
  | InvalidTokenAccount
112
112
  | DepositDisabledOutsideElevationGroup
113
113
  | CannotCalculateReferralAmountDueToSlotsMismatch
114
+ | ObligationOwnersMustMatch
115
+ | ObligationsMustMatch
116
+ | LendingMarketsMustMatch
117
+ | ObligationCurrentlyMarkedForDeleveraging
118
+ | MaximumWithdrawValueZero
119
+ | ZeroMaxLtvAssetsInDeposits
120
+ | LowestLtvAssetsPriority
121
+ | WorseLtvThanUnhealthyLtv
122
+ | FarmAccountsMissing
123
+ | RepayTooSmallForFullLiquidation
124
+ | InsufficientRepayAmount
125
+ | OrderIndexOutOfBounds
126
+ | InvalidOrderConfiguration
127
+ | OrderConfigurationNotSupportedByObligation
128
+ | OperationNotPermittedWithCurrentObligationOrders
129
+ | OperationNotPermittedMarketImmutable
130
+ | OrderCreationDisabled
131
+ | NoUpgradeAuthority
132
+ | InitialAdminDepositExecuted
133
+ | ReserveHasNotReceivedInitialDeposit
134
+ | CTokenUsageBlocked
135
+ | CannotUseSameReserve
136
+ | TransactionIncludesRestrictedPrograms
137
+ | BorrowOrderDebtLiquidityMintMismatch
138
+ | BorrowOrderMaxBorrowRateExceeded
139
+ | BorrowOrderMinDebtTermInsufficient
140
+ | BorrowOrderFillTimeLimitExceeded
141
+ | ReserveDebtMaturityReached
142
+ | NonUpdatableOrderConfiguration
143
+ | BorrowOrderExecutionDisabled
144
+ | DebtReachedReserveDebtTerm
145
+ | ExpectationNotMet
146
+ | BorrowOrderFillValueTooSmall
147
+ | WithdrawTicketIssuanceDisabled
148
+ | WithdrawTicketRedemptionDisabled
149
+ | WithdrawTicketStillValid
150
+ | WithdrawTicketRequiresFullRedemption
151
+ | UserTokenBalanceMismatch
152
+ | WithdrawQueuedLiquidityValueTooSmall
153
+ | InvalidTokenAccountState
154
+ | WithdrawTicketInvalid
155
+ | BorrowOrderValueTooSmall
156
+ | WithdrawTicketValueTooSmall
157
+ | InvalidWithdrawTicketProgressCallbackConfig
158
+ | WithdrawTicketProgressCallbackAccountsMissing
159
+ | BorrowRolloverConfigurationDisabled
160
+ | InvalidObligationConfigUpdateSubject
161
+ | BorrowRolloverLiquidityMintMismatch
162
+ | ObligationBorrowRolloverNotApplicable
163
+ | ObligationBorrowOutsideRolloverWindow
164
+ | ObligationBorrowRolloverNotEnabledByOwner
165
+ | ObligationBorrowRolloverTargetReserveMismatch
166
+ | BorrowRolloverExecutionDisabled
167
+ | ObligationAccountingMismatch
168
+ | PartialRolloverValueTooSmall
169
+ | ObligationBorrowRolloverConfigMismatch
170
+ | ObligationBorrowRolloverMustProlongDebtTerm
171
+ | RolloverNotSupportedInElevationGroup
172
+ | WithdrawTicketCancellationDisabled
173
+ | WithdrawTicketFullyCancelled
174
+ | CloneSourceReserveDisabled
175
+ | CloneTargetReserveAlreadyInUse
176
+ | ClonedReserveLiquidityMintMismatch
177
+ | ReserveEmergencyMode
178
+ | ObligationOwnershipTransferInProgress
179
+ | ObligationOwnershipTransferNotInInitiatedState
180
+ | ObligationPendingOwnerNotSet
181
+ | ObligationInvalidPendingOwner
182
+ | ObligationOwnershipTransferNotApproved
183
+ | ObligationHasActiveBorrowOrders
184
+ | OnlyComputeBudgetCompanionIxsAllowed
185
+ | MissingPermissioner
186
+ | ReserveRewardsDisabled
187
+ | TransactionIncludesNonceInstruction
114
188
 
115
189
  export class InvalidMarketAuthority extends Error {
116
190
  static readonly code = 6000
@@ -171,10 +245,10 @@ export class InvalidSigner extends Error {
171
245
  static readonly code = 6005
172
246
  readonly code = 6005
173
247
  readonly name = "InvalidSigner"
174
- readonly msg = "Input account must be a signer"
248
+ readonly msg = "Signer is not allowed to perform this action"
175
249
 
176
250
  constructor(readonly logs?: string[]) {
177
- super("6005: Input account must be a signer")
251
+ super("6005: Signer is not allowed to perform this action")
178
252
  }
179
253
  }
180
254
 
@@ -770,14 +844,14 @@ export class InvalidObligationSeedsValue extends Error {
770
844
  }
771
845
  }
772
846
 
773
- export class InvalidObligationId extends Error {
847
+ export class DeprecatedInvalidObligationId extends Error {
774
848
  static readonly code = 6059
775
849
  readonly code = 6059
776
- readonly name = "InvalidObligationId"
777
- readonly msg = "Obligation id must be 0"
850
+ readonly name = "DeprecatedInvalidObligationId"
851
+ readonly msg = "[DEPRECATED] Obligation id must be 0"
778
852
 
779
853
  constructor(readonly logs?: string[]) {
780
- super("6059: Obligation id must be 0")
854
+ super("6059: [DEPRECATED] Obligation id must be 0")
781
855
  }
782
856
  }
783
857
 
@@ -1069,14 +1143,14 @@ export class ElevationGroupAlreadyActivated extends Error {
1069
1143
  }
1070
1144
  }
1071
1145
 
1072
- export class ObligationInDeprecatedReserve extends Error {
1146
+ export class ObligationInObsoleteReserve extends Error {
1073
1147
  static readonly code = 6084
1074
1148
  readonly code = 6084
1075
- readonly name = "ObligationInDeprecatedReserve"
1076
- readonly msg = "Obligation has a deposit in a deprecated reserve"
1149
+ readonly name = "ObligationInObsoleteReserve"
1150
+ readonly msg = "Obligation has a deposit or borrow in an obsolete reserve"
1077
1151
 
1078
1152
  constructor(readonly logs?: string[]) {
1079
- super("6084: Obligation has a deposit in a deprecated reserve")
1153
+ super("6084: Obligation has a deposit or borrow in an obsolete reserve")
1080
1154
  }
1081
1155
  }
1082
1156
 
@@ -1171,10 +1245,10 @@ export class NetValueRemainingTooSmall extends Error {
1171
1245
  }
1172
1246
  }
1173
1247
 
1174
- export class WorseLTVBlocked extends Error {
1248
+ export class WorseLtvBlocked extends Error {
1175
1249
  static readonly code = 6093
1176
1250
  readonly code = 6093
1177
- readonly name = "WorseLTVBlocked"
1251
+ readonly name = "WorseLtvBlocked"
1178
1252
  readonly msg = "Cannot get the obligation in a worse position"
1179
1253
 
1180
1254
  constructor(readonly logs?: string[]) {
@@ -1254,16 +1328,16 @@ export class LiquidationBorrowFactorPriority extends Error {
1254
1328
  }
1255
1329
  }
1256
1330
 
1257
- export class LiquidationLowestLTVPriority extends Error {
1331
+ export class LiquidationLowestLiquidationLtvPriority extends Error {
1258
1332
  static readonly code = 6100
1259
1333
  readonly code = 6100
1260
- readonly name = "LiquidationLowestLTVPriority"
1334
+ readonly name = "LiquidationLowestLiquidationLtvPriority"
1261
1335
  readonly msg =
1262
- "Liquidation must prioritize the collateral with the lowest LTV"
1336
+ "Liquidation must prioritize the collateral with the lowest liquidation LTV"
1263
1337
 
1264
1338
  constructor(readonly logs?: string[]) {
1265
1339
  super(
1266
- "6100: Liquidation must prioritize the collateral with the lowest LTV"
1340
+ "6100: Liquidation must prioritize the collateral with the lowest liquidation LTV"
1267
1341
  )
1268
1342
  }
1269
1343
  }
@@ -1401,6 +1475,937 @@ export class CannotCalculateReferralAmountDueToSlotsMismatch extends Error {
1401
1475
  }
1402
1476
  }
1403
1477
 
1478
+ export class ObligationOwnersMustMatch extends Error {
1479
+ static readonly code = 6112
1480
+ readonly code = 6112
1481
+ readonly name = "ObligationOwnersMustMatch"
1482
+ readonly msg = "Obligation owners must match"
1483
+
1484
+ constructor(readonly logs?: string[]) {
1485
+ super("6112: Obligation owners must match")
1486
+ }
1487
+ }
1488
+
1489
+ export class ObligationsMustMatch extends Error {
1490
+ static readonly code = 6113
1491
+ readonly code = 6113
1492
+ readonly name = "ObligationsMustMatch"
1493
+ readonly msg = "Obligations must match"
1494
+
1495
+ constructor(readonly logs?: string[]) {
1496
+ super("6113: Obligations must match")
1497
+ }
1498
+ }
1499
+
1500
+ export class LendingMarketsMustMatch extends Error {
1501
+ static readonly code = 6114
1502
+ readonly code = 6114
1503
+ readonly name = "LendingMarketsMustMatch"
1504
+ readonly msg = "Lending markets must match"
1505
+
1506
+ constructor(readonly logs?: string[]) {
1507
+ super("6114: Lending markets must match")
1508
+ }
1509
+ }
1510
+
1511
+ export class ObligationCurrentlyMarkedForDeleveraging extends Error {
1512
+ static readonly code = 6115
1513
+ readonly code = 6115
1514
+ readonly name = "ObligationCurrentlyMarkedForDeleveraging"
1515
+ readonly msg = "Obligation is already marked for deleveraging"
1516
+
1517
+ constructor(readonly logs?: string[]) {
1518
+ super("6115: Obligation is already marked for deleveraging")
1519
+ }
1520
+ }
1521
+
1522
+ export class MaximumWithdrawValueZero extends Error {
1523
+ static readonly code = 6116
1524
+ readonly code = 6116
1525
+ readonly name = "MaximumWithdrawValueZero"
1526
+ readonly msg =
1527
+ "Maximum withdrawable value of this collateral is zero, LTV needs improved"
1528
+
1529
+ constructor(readonly logs?: string[]) {
1530
+ super(
1531
+ "6116: Maximum withdrawable value of this collateral is zero, LTV needs improved"
1532
+ )
1533
+ }
1534
+ }
1535
+
1536
+ export class ZeroMaxLtvAssetsInDeposits extends Error {
1537
+ static readonly code = 6117
1538
+ readonly code = 6117
1539
+ readonly name = "ZeroMaxLtvAssetsInDeposits"
1540
+ readonly msg =
1541
+ "No max LTV 0 assets allowed in deposits for repay and withdraw"
1542
+
1543
+ constructor(readonly logs?: string[]) {
1544
+ super(
1545
+ "6117: No max LTV 0 assets allowed in deposits for repay and withdraw"
1546
+ )
1547
+ }
1548
+ }
1549
+
1550
+ export class LowestLtvAssetsPriority extends Error {
1551
+ static readonly code = 6118
1552
+ readonly code = 6118
1553
+ readonly name = "LowestLtvAssetsPriority"
1554
+ readonly msg =
1555
+ "Withdrawing must prioritize the collateral with the lowest reserve max-LTV"
1556
+
1557
+ constructor(readonly logs?: string[]) {
1558
+ super(
1559
+ "6118: Withdrawing must prioritize the collateral with the lowest reserve max-LTV"
1560
+ )
1561
+ }
1562
+ }
1563
+
1564
+ export class WorseLtvThanUnhealthyLtv extends Error {
1565
+ static readonly code = 6119
1566
+ readonly code = 6119
1567
+ readonly name = "WorseLtvThanUnhealthyLtv"
1568
+ readonly msg = "Cannot get the obligation liquidatable"
1569
+
1570
+ constructor(readonly logs?: string[]) {
1571
+ super("6119: Cannot get the obligation liquidatable")
1572
+ }
1573
+ }
1574
+
1575
+ export class FarmAccountsMissing extends Error {
1576
+ static readonly code = 6120
1577
+ readonly code = 6120
1578
+ readonly name = "FarmAccountsMissing"
1579
+ readonly msg = "Farm accounts to refresh are missing"
1580
+
1581
+ constructor(readonly logs?: string[]) {
1582
+ super("6120: Farm accounts to refresh are missing")
1583
+ }
1584
+ }
1585
+
1586
+ export class RepayTooSmallForFullLiquidation extends Error {
1587
+ static readonly code = 6121
1588
+ readonly code = 6121
1589
+ readonly name = "RepayTooSmallForFullLiquidation"
1590
+ readonly msg =
1591
+ "Repay amount is too small to satisfy the mandatory full liquidation"
1592
+
1593
+ constructor(readonly logs?: string[]) {
1594
+ super(
1595
+ "6121: Repay amount is too small to satisfy the mandatory full liquidation"
1596
+ )
1597
+ }
1598
+ }
1599
+
1600
+ export class InsufficientRepayAmount extends Error {
1601
+ static readonly code = 6122
1602
+ readonly code = 6122
1603
+ readonly name = "InsufficientRepayAmount"
1604
+ readonly msg =
1605
+ "Liquidator provided repay amount lower than required by liquidation rules"
1606
+
1607
+ constructor(readonly logs?: string[]) {
1608
+ super(
1609
+ "6122: Liquidator provided repay amount lower than required by liquidation rules"
1610
+ )
1611
+ }
1612
+ }
1613
+
1614
+ export class OrderIndexOutOfBounds extends Error {
1615
+ static readonly code = 6123
1616
+ readonly code = 6123
1617
+ readonly name = "OrderIndexOutOfBounds"
1618
+ readonly msg = "Order of the given index cannot exist"
1619
+
1620
+ constructor(readonly logs?: string[]) {
1621
+ super("6123: Order of the given index cannot exist")
1622
+ }
1623
+ }
1624
+
1625
+ export class InvalidOrderConfiguration extends Error {
1626
+ static readonly code = 6124
1627
+ readonly code = 6124
1628
+ readonly name = "InvalidOrderConfiguration"
1629
+ readonly msg = "Given order configuration has wrong parameters"
1630
+
1631
+ constructor(readonly logs?: string[]) {
1632
+ super("6124: Given order configuration has wrong parameters")
1633
+ }
1634
+ }
1635
+
1636
+ export class OrderConfigurationNotSupportedByObligation extends Error {
1637
+ static readonly code = 6125
1638
+ readonly code = 6125
1639
+ readonly name = "OrderConfigurationNotSupportedByObligation"
1640
+ readonly msg =
1641
+ "Given order configuration cannot be used with the current state of the obligation"
1642
+
1643
+ constructor(readonly logs?: string[]) {
1644
+ super(
1645
+ "6125: Given order configuration cannot be used with the current state of the obligation"
1646
+ )
1647
+ }
1648
+ }
1649
+
1650
+ export class OperationNotPermittedWithCurrentObligationOrders extends Error {
1651
+ static readonly code = 6126
1652
+ readonly code = 6126
1653
+ readonly name = "OperationNotPermittedWithCurrentObligationOrders"
1654
+ readonly msg =
1655
+ "Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count"
1656
+
1657
+ constructor(readonly logs?: string[]) {
1658
+ super(
1659
+ "6126: Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count"
1660
+ )
1661
+ }
1662
+ }
1663
+
1664
+ export class OperationNotPermittedMarketImmutable extends Error {
1665
+ static readonly code = 6127
1666
+ readonly code = 6127
1667
+ readonly name = "OperationNotPermittedMarketImmutable"
1668
+ readonly msg = "Cannot update lending market because it is set as immutable"
1669
+
1670
+ constructor(readonly logs?: string[]) {
1671
+ super("6127: Cannot update lending market because it is set as immutable")
1672
+ }
1673
+ }
1674
+
1675
+ export class OrderCreationDisabled extends Error {
1676
+ static readonly code = 6128
1677
+ readonly code = 6128
1678
+ readonly name = "OrderCreationDisabled"
1679
+ readonly msg = "Creation of new orders is disabled"
1680
+
1681
+ constructor(readonly logs?: string[]) {
1682
+ super("6128: Creation of new orders is disabled")
1683
+ }
1684
+ }
1685
+
1686
+ export class NoUpgradeAuthority extends Error {
1687
+ static readonly code = 6129
1688
+ readonly code = 6129
1689
+ readonly name = "NoUpgradeAuthority"
1690
+ readonly msg =
1691
+ "Cannot initialize global config because there is no upgrade authority to the program"
1692
+
1693
+ constructor(readonly logs?: string[]) {
1694
+ super(
1695
+ "6129: Cannot initialize global config because there is no upgrade authority to the program"
1696
+ )
1697
+ }
1698
+ }
1699
+
1700
+ export class InitialAdminDepositExecuted extends Error {
1701
+ static readonly code = 6130
1702
+ readonly code = 6130
1703
+ readonly name = "InitialAdminDepositExecuted"
1704
+ readonly msg = "Initial admin deposit in reserve already executed"
1705
+
1706
+ constructor(readonly logs?: string[]) {
1707
+ super("6130: Initial admin deposit in reserve already executed")
1708
+ }
1709
+ }
1710
+
1711
+ export class ReserveHasNotReceivedInitialDeposit extends Error {
1712
+ static readonly code = 6131
1713
+ readonly code = 6131
1714
+ readonly name = "ReserveHasNotReceivedInitialDeposit"
1715
+ readonly msg =
1716
+ "Reserve has not received the initial deposit, cannot update config"
1717
+
1718
+ constructor(readonly logs?: string[]) {
1719
+ super(
1720
+ "6131: Reserve has not received the initial deposit, cannot update config"
1721
+ )
1722
+ }
1723
+ }
1724
+
1725
+ export class CTokenUsageBlocked extends Error {
1726
+ static readonly code = 6132
1727
+ readonly code = 6132
1728
+ readonly name = "CTokenUsageBlocked"
1729
+ readonly msg = "CToken minting/redeeming is blocked for this reserve"
1730
+
1731
+ constructor(readonly logs?: string[]) {
1732
+ super("6132: CToken minting/redeeming is blocked for this reserve")
1733
+ }
1734
+ }
1735
+
1736
+ export class CannotUseSameReserve extends Error {
1737
+ static readonly code = 6133
1738
+ readonly code = 6133
1739
+ readonly name = "CannotUseSameReserve"
1740
+ readonly msg = "Cannot call ix with same reserve"
1741
+
1742
+ constructor(readonly logs?: string[]) {
1743
+ super("6133: Cannot call ix with same reserve")
1744
+ }
1745
+ }
1746
+
1747
+ export class TransactionIncludesRestrictedPrograms extends Error {
1748
+ static readonly code = 6134
1749
+ readonly code = 6134
1750
+ readonly name = "TransactionIncludesRestrictedPrograms"
1751
+ readonly msg = "Transaction includes restricted programs"
1752
+
1753
+ constructor(readonly logs?: string[]) {
1754
+ super("6134: Transaction includes restricted programs")
1755
+ }
1756
+ }
1757
+
1758
+ export class BorrowOrderDebtLiquidityMintMismatch extends Error {
1759
+ static readonly code = 6135
1760
+ readonly code = 6135
1761
+ readonly name = "BorrowOrderDebtLiquidityMintMismatch"
1762
+ readonly msg = "There is no borrow order requesting debt in the given asset"
1763
+
1764
+ constructor(readonly logs?: string[]) {
1765
+ super("6135: There is no borrow order requesting debt in the given asset")
1766
+ }
1767
+ }
1768
+
1769
+ export class BorrowOrderMaxBorrowRateExceeded extends Error {
1770
+ static readonly code = 6136
1771
+ readonly code = 6136
1772
+ readonly name = "BorrowOrderMaxBorrowRateExceeded"
1773
+ readonly msg =
1774
+ "Reserve used for fill exceeds the maximum borrow rate specified by the order"
1775
+
1776
+ constructor(readonly logs?: string[]) {
1777
+ super(
1778
+ "6136: Reserve used for fill exceeds the maximum borrow rate specified by the order"
1779
+ )
1780
+ }
1781
+ }
1782
+
1783
+ export class BorrowOrderMinDebtTermInsufficient extends Error {
1784
+ static readonly code = 6137
1785
+ readonly code = 6137
1786
+ readonly name = "BorrowOrderMinDebtTermInsufficient"
1787
+ readonly msg =
1788
+ "Reserve used for fill defines a debt term shorter than specified by the order"
1789
+
1790
+ constructor(readonly logs?: string[]) {
1791
+ super(
1792
+ "6137: Reserve used for fill defines a debt term shorter than specified by the order"
1793
+ )
1794
+ }
1795
+ }
1796
+
1797
+ export class BorrowOrderFillTimeLimitExceeded extends Error {
1798
+ static readonly code = 6138
1799
+ readonly code = 6138
1800
+ readonly name = "BorrowOrderFillTimeLimitExceeded"
1801
+ readonly msg = "Borrow order can no longer be filled"
1802
+
1803
+ constructor(readonly logs?: string[]) {
1804
+ super("6138: Borrow order can no longer be filled")
1805
+ }
1806
+ }
1807
+
1808
+ export class ReserveDebtMaturityReached extends Error {
1809
+ static readonly code = 6139
1810
+ readonly code = 6139
1811
+ readonly name = "ReserveDebtMaturityReached"
1812
+ readonly msg =
1813
+ "Cannot borrow from a reserve that reached its debt maturity timestamp"
1814
+
1815
+ constructor(readonly logs?: string[]) {
1816
+ super(
1817
+ "6139: Cannot borrow from a reserve that reached its debt maturity timestamp"
1818
+ )
1819
+ }
1820
+ }
1821
+
1822
+ export class NonUpdatableOrderConfiguration extends Error {
1823
+ static readonly code = 6140
1824
+ readonly code = 6140
1825
+ readonly name = "NonUpdatableOrderConfiguration"
1826
+ readonly msg =
1827
+ "Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"
1828
+
1829
+ constructor(readonly logs?: string[]) {
1830
+ super(
1831
+ "6140: Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"
1832
+ )
1833
+ }
1834
+ }
1835
+
1836
+ export class BorrowOrderExecutionDisabled extends Error {
1837
+ static readonly code = 6141
1838
+ readonly code = 6141
1839
+ readonly name = "BorrowOrderExecutionDisabled"
1840
+ readonly msg = "Execution of borrow orders is disabled"
1841
+
1842
+ constructor(readonly logs?: string[]) {
1843
+ super("6141: Execution of borrow orders is disabled")
1844
+ }
1845
+ }
1846
+
1847
+ export class DebtReachedReserveDebtTerm extends Error {
1848
+ static readonly code = 6142
1849
+ readonly code = 6142
1850
+ readonly name = "DebtReachedReserveDebtTerm"
1851
+ readonly msg =
1852
+ "Cannot increase the debt that has reached its end of term configured by the reserve"
1853
+
1854
+ constructor(readonly logs?: string[]) {
1855
+ super(
1856
+ "6142: Cannot increase the debt that has reached its end of term configured by the reserve"
1857
+ )
1858
+ }
1859
+ }
1860
+
1861
+ export class ExpectationNotMet extends Error {
1862
+ static readonly code = 6143
1863
+ readonly code = 6143
1864
+ readonly name = "ExpectationNotMet"
1865
+ readonly msg =
1866
+ "The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)"
1867
+
1868
+ constructor(readonly logs?: string[]) {
1869
+ super(
1870
+ "6143: The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)"
1871
+ )
1872
+ }
1873
+ }
1874
+
1875
+ export class BorrowOrderFillValueTooSmall extends Error {
1876
+ static readonly code = 6144
1877
+ readonly code = 6144
1878
+ readonly name = "BorrowOrderFillValueTooSmall"
1879
+ readonly msg =
1880
+ "Available liquidity could not satisfy the minimum required borrow order fill value"
1881
+
1882
+ constructor(readonly logs?: string[]) {
1883
+ super(
1884
+ "6144: Available liquidity could not satisfy the minimum required borrow order fill value"
1885
+ )
1886
+ }
1887
+ }
1888
+
1889
+ export class WithdrawTicketIssuanceDisabled extends Error {
1890
+ static readonly code = 6145
1891
+ readonly code = 6145
1892
+ readonly name = "WithdrawTicketIssuanceDisabled"
1893
+ readonly msg = "Issuing new withdraw tickets is disabled by the market"
1894
+
1895
+ constructor(readonly logs?: string[]) {
1896
+ super("6145: Issuing new withdraw tickets is disabled by the market")
1897
+ }
1898
+ }
1899
+
1900
+ export class WithdrawTicketRedemptionDisabled extends Error {
1901
+ static readonly code = 6146
1902
+ readonly code = 6146
1903
+ readonly name = "WithdrawTicketRedemptionDisabled"
1904
+ readonly msg = "Redeeming withdraw tickets is disabled by the market"
1905
+
1906
+ constructor(readonly logs?: string[]) {
1907
+ super("6146: Redeeming withdraw tickets is disabled by the market")
1908
+ }
1909
+ }
1910
+
1911
+ export class WithdrawTicketStillValid extends Error {
1912
+ static readonly code = 6147
1913
+ readonly code = 6147
1914
+ readonly name = "WithdrawTicketStillValid"
1915
+ readonly msg =
1916
+ "Recovering collateral is only available after the withdraw ticket has been marked invalid"
1917
+
1918
+ constructor(readonly logs?: string[]) {
1919
+ super(
1920
+ "6147: Recovering collateral is only available after the withdraw ticket has been marked invalid"
1921
+ )
1922
+ }
1923
+ }
1924
+
1925
+ export class WithdrawTicketRequiresFullRedemption extends Error {
1926
+ static readonly code = 6148
1927
+ readonly code = 6148
1928
+ readonly name = "WithdrawTicketRequiresFullRedemption"
1929
+ readonly msg =
1930
+ "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"
1931
+
1932
+ constructor(readonly logs?: string[]) {
1933
+ super(
1934
+ "6148: 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"
1935
+ )
1936
+ }
1937
+ }
1938
+
1939
+ export class UserTokenBalanceMismatch extends Error {
1940
+ static readonly code = 6149
1941
+ readonly code = 6149
1942
+ readonly name = "UserTokenBalanceMismatch"
1943
+ readonly msg =
1944
+ "The user's token account has changed its balance in an unexpected way"
1945
+
1946
+ constructor(readonly logs?: string[]) {
1947
+ super(
1948
+ "6149: The user's token account has changed its balance in an unexpected way"
1949
+ )
1950
+ }
1951
+ }
1952
+
1953
+ export class WithdrawQueuedLiquidityValueTooSmall extends Error {
1954
+ static readonly code = 6150
1955
+ readonly code = 6150
1956
+ readonly name = "WithdrawQueuedLiquidityValueTooSmall"
1957
+ readonly msg =
1958
+ "Available liquidity could not satisfy the minimum required ticketed withdrawal value"
1959
+
1960
+ constructor(readonly logs?: string[]) {
1961
+ super(
1962
+ "6150: Available liquidity could not satisfy the minimum required ticketed withdrawal value"
1963
+ )
1964
+ }
1965
+ }
1966
+
1967
+ export class InvalidTokenAccountState extends Error {
1968
+ static readonly code = 6151
1969
+ readonly code = 6151
1970
+ readonly name = "InvalidTokenAccountState"
1971
+ readonly msg =
1972
+ "Token account is in a state preventing the handler's operation (e.g. frozen or delegate)"
1973
+
1974
+ constructor(readonly logs?: string[]) {
1975
+ super(
1976
+ "6151: Token account is in a state preventing the handler's operation (e.g. frozen or delegate)"
1977
+ )
1978
+ }
1979
+ }
1980
+
1981
+ export class WithdrawTicketInvalid extends Error {
1982
+ static readonly code = 6152
1983
+ readonly code = 6152
1984
+ readonly name = "WithdrawTicketInvalid"
1985
+ readonly msg = "Cannot use ticket that was already marked invalid"
1986
+
1987
+ constructor(readonly logs?: string[]) {
1988
+ super("6152: Cannot use ticket that was already marked invalid")
1989
+ }
1990
+ }
1991
+
1992
+ export class BorrowOrderValueTooSmall extends Error {
1993
+ static readonly code = 6153
1994
+ readonly code = 6153
1995
+ readonly name = "BorrowOrderValueTooSmall"
1996
+ readonly msg =
1997
+ "Borrow order's value would be below the market-configured minimum"
1998
+
1999
+ constructor(readonly logs?: string[]) {
2000
+ super(
2001
+ "6153: Borrow order's value would be below the market-configured minimum"
2002
+ )
2003
+ }
2004
+ }
2005
+
2006
+ export class WithdrawTicketValueTooSmall extends Error {
2007
+ static readonly code = 6154
2008
+ readonly code = 6154
2009
+ readonly name = "WithdrawTicketValueTooSmall"
2010
+ readonly msg =
2011
+ "Withdraw ticket's value would be below the market-configured minimum"
2012
+
2013
+ constructor(readonly logs?: string[]) {
2014
+ super(
2015
+ "6154: Withdraw ticket's value would be below the market-configured minimum"
2016
+ )
2017
+ }
2018
+ }
2019
+
2020
+ export class InvalidWithdrawTicketProgressCallbackConfig extends Error {
2021
+ static readonly code = 6155
2022
+ readonly code = 6155
2023
+ readonly name = "InvalidWithdrawTicketProgressCallbackConfig"
2024
+ readonly msg =
2025
+ "Invalid configuration or required custom accounts for the requested withdraw ticket callback type"
2026
+
2027
+ constructor(readonly logs?: string[]) {
2028
+ super(
2029
+ "6155: Invalid configuration or required custom accounts for the requested withdraw ticket callback type"
2030
+ )
2031
+ }
2032
+ }
2033
+
2034
+ export class WithdrawTicketProgressCallbackAccountsMissing extends Error {
2035
+ static readonly code = 6156
2036
+ readonly code = 6156
2037
+ readonly name = "WithdrawTicketProgressCallbackAccountsMissing"
2038
+ readonly msg =
2039
+ "One or more accounts required by the ticket's configured progress callback are missing"
2040
+
2041
+ constructor(readonly logs?: string[]) {
2042
+ super(
2043
+ "6156: One or more accounts required by the ticket's configured progress callback are missing"
2044
+ )
2045
+ }
2046
+ }
2047
+
2048
+ export class BorrowRolloverConfigurationDisabled extends Error {
2049
+ static readonly code = 6157
2050
+ readonly code = 6157
2051
+ readonly name = "BorrowRolloverConfigurationDisabled"
2052
+ readonly msg =
2053
+ "Configuring auto-rollover on loans is disabled by market owner"
2054
+
2055
+ constructor(readonly logs?: string[]) {
2056
+ super(
2057
+ "6157: Configuring auto-rollover on loans is disabled by market owner"
2058
+ )
2059
+ }
2060
+ }
2061
+
2062
+ export class InvalidObligationConfigUpdateSubject extends Error {
2063
+ static readonly code = 6158
2064
+ readonly code = 6158
2065
+ readonly name = "InvalidObligationConfigUpdateSubject"
2066
+ readonly msg =
2067
+ "Invalid specification of the Obligation's part to be configured"
2068
+
2069
+ constructor(readonly logs?: string[]) {
2070
+ super(
2071
+ "6158: Invalid specification of the Obligation's part to be configured"
2072
+ )
2073
+ }
2074
+ }
2075
+
2076
+ export class BorrowRolloverLiquidityMintMismatch extends Error {
2077
+ static readonly code = 6159
2078
+ readonly code = 6159
2079
+ readonly name = "BorrowRolloverLiquidityMintMismatch"
2080
+ readonly msg = "Auto-rollover must use a target reserve of the same token"
2081
+
2082
+ constructor(readonly logs?: string[]) {
2083
+ super("6159: Auto-rollover must use a target reserve of the same token")
2084
+ }
2085
+ }
2086
+
2087
+ export class ObligationBorrowRolloverNotApplicable extends Error {
2088
+ static readonly code = 6160
2089
+ readonly code = 6160
2090
+ readonly name = "ObligationBorrowRolloverNotApplicable"
2091
+ readonly msg =
2092
+ "The given borrow is not fixed-term and does not require rolling over"
2093
+
2094
+ constructor(readonly logs?: string[]) {
2095
+ super(
2096
+ "6160: The given borrow is not fixed-term and does not require rolling over"
2097
+ )
2098
+ }
2099
+ }
2100
+
2101
+ export class ObligationBorrowOutsideRolloverWindow extends Error {
2102
+ static readonly code = 6161
2103
+ readonly code = 6161
2104
+ readonly name = "ObligationBorrowOutsideRolloverWindow"
2105
+ readonly msg =
2106
+ "The given borrow is outside the corresponding market-configured rollover window"
2107
+
2108
+ constructor(readonly logs?: string[]) {
2109
+ super(
2110
+ "6161: The given borrow is outside the corresponding market-configured rollover window"
2111
+ )
2112
+ }
2113
+ }
2114
+
2115
+ export class ObligationBorrowRolloverNotEnabledByOwner extends Error {
2116
+ static readonly code = 6162
2117
+ readonly code = 6162
2118
+ readonly name = "ObligationBorrowRolloverNotEnabledByOwner"
2119
+ readonly msg =
2120
+ "Obligation's owner did not opt-in for auto-rollover of the given borrow"
2121
+
2122
+ constructor(readonly logs?: string[]) {
2123
+ super(
2124
+ "6162: Obligation's owner did not opt-in for auto-rollover of the given borrow"
2125
+ )
2126
+ }
2127
+ }
2128
+
2129
+ export class ObligationBorrowRolloverTargetReserveMismatch extends Error {
2130
+ static readonly code = 6163
2131
+ readonly code = 6163
2132
+ readonly name = "ObligationBorrowRolloverTargetReserveMismatch"
2133
+ readonly msg =
2134
+ "Obligation's owner did not allow to roll over into terms offered by the given reserve"
2135
+
2136
+ constructor(readonly logs?: string[]) {
2137
+ super(
2138
+ "6163: Obligation's owner did not allow to roll over into terms offered by the given reserve"
2139
+ )
2140
+ }
2141
+ }
2142
+
2143
+ export class BorrowRolloverExecutionDisabled extends Error {
2144
+ static readonly code = 6164
2145
+ readonly code = 6164
2146
+ readonly name = "BorrowRolloverExecutionDisabled"
2147
+ readonly msg = "Executing auto-rollover is disabled by market owner"
2148
+
2149
+ constructor(readonly logs?: string[]) {
2150
+ super("6164: Executing auto-rollover is disabled by market owner")
2151
+ }
2152
+ }
2153
+
2154
+ export class ObligationAccountingMismatch extends Error {
2155
+ static readonly code = 6165
2156
+ readonly code = 6165
2157
+ readonly name = "ObligationAccountingMismatch"
2158
+ readonly msg =
2159
+ "Obligation internal state accounting has been unexpectedly modified"
2160
+
2161
+ constructor(readonly logs?: string[]) {
2162
+ super(
2163
+ "6165: Obligation internal state accounting has been unexpectedly modified"
2164
+ )
2165
+ }
2166
+ }
2167
+
2168
+ export class PartialRolloverValueTooSmall extends Error {
2169
+ static readonly code = 6166
2170
+ readonly code = 6166
2171
+ readonly name = "PartialRolloverValueTooSmall"
2172
+ readonly msg =
2173
+ "Partial rollover amount is below the market-configured minimum value"
2174
+
2175
+ constructor(readonly logs?: string[]) {
2176
+ super(
2177
+ "6166: Partial rollover amount is below the market-configured minimum value"
2178
+ )
2179
+ }
2180
+ }
2181
+
2182
+ export class ObligationBorrowRolloverConfigMismatch extends Error {
2183
+ static readonly code = 6167
2184
+ readonly code = 6167
2185
+ readonly name = "ObligationBorrowRolloverConfigMismatch"
2186
+ readonly msg =
2187
+ "Pre-existing rollover configuration of the loan cannot be overwritten by the operation"
2188
+
2189
+ constructor(readonly logs?: string[]) {
2190
+ super(
2191
+ "6167: Pre-existing rollover configuration of the loan cannot be overwritten by the operation"
2192
+ )
2193
+ }
2194
+ }
2195
+
2196
+ export class ObligationBorrowRolloverMustProlongDebtTerm extends Error {
2197
+ static readonly code = 6168
2198
+ readonly code = 6168
2199
+ readonly name = "ObligationBorrowRolloverMustProlongDebtTerm"
2200
+ readonly msg =
2201
+ "Rollover into existing borrow must prolong the remaining debt term"
2202
+
2203
+ constructor(readonly logs?: string[]) {
2204
+ super(
2205
+ "6168: Rollover into existing borrow must prolong the remaining debt term"
2206
+ )
2207
+ }
2208
+ }
2209
+
2210
+ export class RolloverNotSupportedInElevationGroup extends Error {
2211
+ static readonly code = 6169
2212
+ readonly code = 6169
2213
+ readonly name = "RolloverNotSupportedInElevationGroup"
2214
+ readonly msg =
2215
+ "Rollover is not supported for obligations in an elevation group"
2216
+
2217
+ constructor(readonly logs?: string[]) {
2218
+ super(
2219
+ "6169: Rollover is not supported for obligations in an elevation group"
2220
+ )
2221
+ }
2222
+ }
2223
+
2224
+ export class WithdrawTicketCancellationDisabled extends Error {
2225
+ static readonly code = 6170
2226
+ readonly code = 6170
2227
+ readonly name = "WithdrawTicketCancellationDisabled"
2228
+ readonly msg = "Cancelling withdraw tickets is disabled by the market"
2229
+
2230
+ constructor(readonly logs?: string[]) {
2231
+ super("6170: Cancelling withdraw tickets is disabled by the market")
2232
+ }
2233
+ }
2234
+
2235
+ export class WithdrawTicketFullyCancelled extends Error {
2236
+ static readonly code = 6171
2237
+ readonly code = 6171
2238
+ readonly name = "WithdrawTicketFullyCancelled"
2239
+ readonly msg = "Cannot use ticket that was already fully-cancelled"
2240
+
2241
+ constructor(readonly logs?: string[]) {
2242
+ super("6171: Cannot use ticket that was already fully-cancelled")
2243
+ }
2244
+ }
2245
+
2246
+ export class CloneSourceReserveDisabled extends Error {
2247
+ static readonly code = 6172
2248
+ readonly code = 6172
2249
+ readonly name = "CloneSourceReserveDisabled"
2250
+ readonly msg = "Cannot clone config from a reserve that is disabled"
2251
+
2252
+ constructor(readonly logs?: string[]) {
2253
+ super("6172: Cannot clone config from a reserve that is disabled")
2254
+ }
2255
+ }
2256
+
2257
+ export class CloneTargetReserveAlreadyInUse extends Error {
2258
+ static readonly code = 6173
2259
+ readonly code = 6173
2260
+ readonly name = "CloneTargetReserveAlreadyInUse"
2261
+ readonly msg = "Cannot clone config into a reserve that has been in use"
2262
+
2263
+ constructor(readonly logs?: string[]) {
2264
+ super("6173: Cannot clone config into a reserve that has been in use")
2265
+ }
2266
+ }
2267
+
2268
+ export class ClonedReserveLiquidityMintMismatch extends Error {
2269
+ static readonly code = 6174
2270
+ readonly code = 6174
2271
+ readonly name = "ClonedReserveLiquidityMintMismatch"
2272
+ readonly msg = "Cannot clone config between reserves of different mints"
2273
+
2274
+ constructor(readonly logs?: string[]) {
2275
+ super("6174: Cannot clone config between reserves of different mints")
2276
+ }
2277
+ }
2278
+
2279
+ export class ReserveEmergencyMode extends Error {
2280
+ static readonly code = 6175
2281
+ readonly code = 6175
2282
+ readonly name = "ReserveEmergencyMode"
2283
+ readonly msg = "Reserve emergency mode is enabled"
2284
+
2285
+ constructor(readonly logs?: string[]) {
2286
+ super("6175: Reserve emergency mode is enabled")
2287
+ }
2288
+ }
2289
+
2290
+ export class ObligationOwnershipTransferInProgress extends Error {
2291
+ static readonly code = 6176
2292
+ readonly code = 6176
2293
+ readonly name = "ObligationOwnershipTransferInProgress"
2294
+ readonly msg = "Obligation ownership transfer is in progress"
2295
+
2296
+ constructor(readonly logs?: string[]) {
2297
+ super("6176: Obligation ownership transfer is in progress")
2298
+ }
2299
+ }
2300
+
2301
+ export class ObligationOwnershipTransferNotInInitiatedState extends Error {
2302
+ static readonly code = 6177
2303
+ readonly code = 6177
2304
+ readonly name = "ObligationOwnershipTransferNotInInitiatedState"
2305
+ readonly msg = "Obligation ownership transfer is not in initiated state"
2306
+
2307
+ constructor(readonly logs?: string[]) {
2308
+ super("6177: Obligation ownership transfer is not in initiated state")
2309
+ }
2310
+ }
2311
+
2312
+ export class ObligationPendingOwnerNotSet extends Error {
2313
+ static readonly code = 6178
2314
+ readonly code = 6178
2315
+ readonly name = "ObligationPendingOwnerNotSet"
2316
+ readonly msg = "Obligation pending owner not set"
2317
+
2318
+ constructor(readonly logs?: string[]) {
2319
+ super("6178: Obligation pending owner not set")
2320
+ }
2321
+ }
2322
+
2323
+ export class ObligationInvalidPendingOwner extends Error {
2324
+ static readonly code = 6179
2325
+ readonly code = 6179
2326
+ readonly name = "ObligationInvalidPendingOwner"
2327
+ readonly msg = "Invalid pending owner address"
2328
+
2329
+ constructor(readonly logs?: string[]) {
2330
+ super("6179: Invalid pending owner address")
2331
+ }
2332
+ }
2333
+
2334
+ export class ObligationOwnershipTransferNotApproved extends Error {
2335
+ static readonly code = 6180
2336
+ readonly code = 6180
2337
+ readonly name = "ObligationOwnershipTransferNotApproved"
2338
+ readonly msg = "Obligation ownership transfer not approved by admin"
2339
+
2340
+ constructor(readonly logs?: string[]) {
2341
+ super("6180: Obligation ownership transfer not approved by admin")
2342
+ }
2343
+ }
2344
+
2345
+ export class ObligationHasActiveBorrowOrders extends Error {
2346
+ static readonly code = 6181
2347
+ readonly code = 6181
2348
+ readonly name = "ObligationHasActiveBorrowOrders"
2349
+ readonly msg = "Obligation has active borrow orders"
2350
+
2351
+ constructor(readonly logs?: string[]) {
2352
+ super("6181: Obligation has active borrow orders")
2353
+ }
2354
+ }
2355
+
2356
+ export class OnlyComputeBudgetCompanionIxsAllowed extends Error {
2357
+ static readonly code = 6182
2358
+ readonly code = 6182
2359
+ readonly name = "OnlyComputeBudgetCompanionIxsAllowed"
2360
+ readonly msg =
2361
+ "Only ComputeBudget instructions may accompany this instruction"
2362
+
2363
+ constructor(readonly logs?: string[]) {
2364
+ super(
2365
+ "6182: Only ComputeBudget instructions may accompany this instruction"
2366
+ )
2367
+ }
2368
+ }
2369
+
2370
+ export class MissingPermissioner extends Error {
2371
+ static readonly code = 6183
2372
+ readonly code = 6183
2373
+ readonly name = "MissingPermissioner"
2374
+ readonly msg = "Required permissioning account is missing"
2375
+
2376
+ constructor(readonly logs?: string[]) {
2377
+ super("6183: Required permissioning account is missing")
2378
+ }
2379
+ }
2380
+
2381
+ export class ReserveRewardsDisabled extends Error {
2382
+ static readonly code = 6184
2383
+ readonly code = 6184
2384
+ readonly name = "ReserveRewardsDisabled"
2385
+ readonly msg =
2386
+ "Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)"
2387
+
2388
+ constructor(readonly logs?: string[]) {
2389
+ super(
2390
+ "6184: Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)"
2391
+ )
2392
+ }
2393
+ }
2394
+
2395
+ export class TransactionIncludesNonceInstruction extends Error {
2396
+ static readonly code = 6185
2397
+ readonly code = 6185
2398
+ readonly name = "TransactionIncludesNonceInstruction"
2399
+ readonly msg =
2400
+ "Transaction includes a nonce instruction, which is not allowed for admin operations"
2401
+
2402
+ constructor(readonly logs?: string[]) {
2403
+ super(
2404
+ "6185: Transaction includes a nonce instruction, which is not allowed for admin operations"
2405
+ )
2406
+ }
2407
+ }
2408
+
1404
2409
  export function fromCode(code: number, logs?: string[]): CustomError | null {
1405
2410
  switch (code) {
1406
2411
  case 6000:
@@ -1522,7 +2527,7 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
1522
2527
  case 6058:
1523
2528
  return new InvalidObligationSeedsValue(logs)
1524
2529
  case 6059:
1525
- return new InvalidObligationId(logs)
2530
+ return new DeprecatedInvalidObligationId(logs)
1526
2531
  case 6060:
1527
2532
  return new InvalidBorrowRateCurvePoint(logs)
1528
2533
  case 6061:
@@ -1572,7 +2577,7 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
1572
2577
  case 6083:
1573
2578
  return new ElevationGroupAlreadyActivated(logs)
1574
2579
  case 6084:
1575
- return new ObligationInDeprecatedReserve(logs)
2580
+ return new ObligationInObsoleteReserve(logs)
1576
2581
  case 6085:
1577
2582
  return new ReferrerStateOwnerMismatch(logs)
1578
2583
  case 6086:
@@ -1590,7 +2595,7 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
1590
2595
  case 6092:
1591
2596
  return new NetValueRemainingTooSmall(logs)
1592
2597
  case 6093:
1593
- return new WorseLTVBlocked(logs)
2598
+ return new WorseLtvBlocked(logs)
1594
2599
  case 6094:
1595
2600
  return new LiabilitiesBiggerThanAssets(logs)
1596
2601
  case 6095:
@@ -1604,7 +2609,7 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
1604
2609
  case 6099:
1605
2610
  return new LiquidationBorrowFactorPriority(logs)
1606
2611
  case 6100:
1607
- return new LiquidationLowestLTVPriority(logs)
2612
+ return new LiquidationLowestLiquidationLtvPriority(logs)
1608
2613
  case 6101:
1609
2614
  return new ElevationGroupBorrowLimitExceeded(logs)
1610
2615
  case 6102:
@@ -1627,6 +2632,154 @@ export function fromCode(code: number, logs?: string[]): CustomError | null {
1627
2632
  return new DepositDisabledOutsideElevationGroup(logs)
1628
2633
  case 6111:
1629
2634
  return new CannotCalculateReferralAmountDueToSlotsMismatch(logs)
2635
+ case 6112:
2636
+ return new ObligationOwnersMustMatch(logs)
2637
+ case 6113:
2638
+ return new ObligationsMustMatch(logs)
2639
+ case 6114:
2640
+ return new LendingMarketsMustMatch(logs)
2641
+ case 6115:
2642
+ return new ObligationCurrentlyMarkedForDeleveraging(logs)
2643
+ case 6116:
2644
+ return new MaximumWithdrawValueZero(logs)
2645
+ case 6117:
2646
+ return new ZeroMaxLtvAssetsInDeposits(logs)
2647
+ case 6118:
2648
+ return new LowestLtvAssetsPriority(logs)
2649
+ case 6119:
2650
+ return new WorseLtvThanUnhealthyLtv(logs)
2651
+ case 6120:
2652
+ return new FarmAccountsMissing(logs)
2653
+ case 6121:
2654
+ return new RepayTooSmallForFullLiquidation(logs)
2655
+ case 6122:
2656
+ return new InsufficientRepayAmount(logs)
2657
+ case 6123:
2658
+ return new OrderIndexOutOfBounds(logs)
2659
+ case 6124:
2660
+ return new InvalidOrderConfiguration(logs)
2661
+ case 6125:
2662
+ return new OrderConfigurationNotSupportedByObligation(logs)
2663
+ case 6126:
2664
+ return new OperationNotPermittedWithCurrentObligationOrders(logs)
2665
+ case 6127:
2666
+ return new OperationNotPermittedMarketImmutable(logs)
2667
+ case 6128:
2668
+ return new OrderCreationDisabled(logs)
2669
+ case 6129:
2670
+ return new NoUpgradeAuthority(logs)
2671
+ case 6130:
2672
+ return new InitialAdminDepositExecuted(logs)
2673
+ case 6131:
2674
+ return new ReserveHasNotReceivedInitialDeposit(logs)
2675
+ case 6132:
2676
+ return new CTokenUsageBlocked(logs)
2677
+ case 6133:
2678
+ return new CannotUseSameReserve(logs)
2679
+ case 6134:
2680
+ return new TransactionIncludesRestrictedPrograms(logs)
2681
+ case 6135:
2682
+ return new BorrowOrderDebtLiquidityMintMismatch(logs)
2683
+ case 6136:
2684
+ return new BorrowOrderMaxBorrowRateExceeded(logs)
2685
+ case 6137:
2686
+ return new BorrowOrderMinDebtTermInsufficient(logs)
2687
+ case 6138:
2688
+ return new BorrowOrderFillTimeLimitExceeded(logs)
2689
+ case 6139:
2690
+ return new ReserveDebtMaturityReached(logs)
2691
+ case 6140:
2692
+ return new NonUpdatableOrderConfiguration(logs)
2693
+ case 6141:
2694
+ return new BorrowOrderExecutionDisabled(logs)
2695
+ case 6142:
2696
+ return new DebtReachedReserveDebtTerm(logs)
2697
+ case 6143:
2698
+ return new ExpectationNotMet(logs)
2699
+ case 6144:
2700
+ return new BorrowOrderFillValueTooSmall(logs)
2701
+ case 6145:
2702
+ return new WithdrawTicketIssuanceDisabled(logs)
2703
+ case 6146:
2704
+ return new WithdrawTicketRedemptionDisabled(logs)
2705
+ case 6147:
2706
+ return new WithdrawTicketStillValid(logs)
2707
+ case 6148:
2708
+ return new WithdrawTicketRequiresFullRedemption(logs)
2709
+ case 6149:
2710
+ return new UserTokenBalanceMismatch(logs)
2711
+ case 6150:
2712
+ return new WithdrawQueuedLiquidityValueTooSmall(logs)
2713
+ case 6151:
2714
+ return new InvalidTokenAccountState(logs)
2715
+ case 6152:
2716
+ return new WithdrawTicketInvalid(logs)
2717
+ case 6153:
2718
+ return new BorrowOrderValueTooSmall(logs)
2719
+ case 6154:
2720
+ return new WithdrawTicketValueTooSmall(logs)
2721
+ case 6155:
2722
+ return new InvalidWithdrawTicketProgressCallbackConfig(logs)
2723
+ case 6156:
2724
+ return new WithdrawTicketProgressCallbackAccountsMissing(logs)
2725
+ case 6157:
2726
+ return new BorrowRolloverConfigurationDisabled(logs)
2727
+ case 6158:
2728
+ return new InvalidObligationConfigUpdateSubject(logs)
2729
+ case 6159:
2730
+ return new BorrowRolloverLiquidityMintMismatch(logs)
2731
+ case 6160:
2732
+ return new ObligationBorrowRolloverNotApplicable(logs)
2733
+ case 6161:
2734
+ return new ObligationBorrowOutsideRolloverWindow(logs)
2735
+ case 6162:
2736
+ return new ObligationBorrowRolloverNotEnabledByOwner(logs)
2737
+ case 6163:
2738
+ return new ObligationBorrowRolloverTargetReserveMismatch(logs)
2739
+ case 6164:
2740
+ return new BorrowRolloverExecutionDisabled(logs)
2741
+ case 6165:
2742
+ return new ObligationAccountingMismatch(logs)
2743
+ case 6166:
2744
+ return new PartialRolloverValueTooSmall(logs)
2745
+ case 6167:
2746
+ return new ObligationBorrowRolloverConfigMismatch(logs)
2747
+ case 6168:
2748
+ return new ObligationBorrowRolloverMustProlongDebtTerm(logs)
2749
+ case 6169:
2750
+ return new RolloverNotSupportedInElevationGroup(logs)
2751
+ case 6170:
2752
+ return new WithdrawTicketCancellationDisabled(logs)
2753
+ case 6171:
2754
+ return new WithdrawTicketFullyCancelled(logs)
2755
+ case 6172:
2756
+ return new CloneSourceReserveDisabled(logs)
2757
+ case 6173:
2758
+ return new CloneTargetReserveAlreadyInUse(logs)
2759
+ case 6174:
2760
+ return new ClonedReserveLiquidityMintMismatch(logs)
2761
+ case 6175:
2762
+ return new ReserveEmergencyMode(logs)
2763
+ case 6176:
2764
+ return new ObligationOwnershipTransferInProgress(logs)
2765
+ case 6177:
2766
+ return new ObligationOwnershipTransferNotInInitiatedState(logs)
2767
+ case 6178:
2768
+ return new ObligationPendingOwnerNotSet(logs)
2769
+ case 6179:
2770
+ return new ObligationInvalidPendingOwner(logs)
2771
+ case 6180:
2772
+ return new ObligationOwnershipTransferNotApproved(logs)
2773
+ case 6181:
2774
+ return new ObligationHasActiveBorrowOrders(logs)
2775
+ case 6182:
2776
+ return new OnlyComputeBudgetCompanionIxsAllowed(logs)
2777
+ case 6183:
2778
+ return new MissingPermissioner(logs)
2779
+ case 6184:
2780
+ return new ReserveRewardsDisabled(logs)
2781
+ case 6185:
2782
+ return new TransactionIncludesNonceInstruction(logs)
1630
2783
  }
1631
2784
 
1632
2785
  return null