@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,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntegerOverflow = exports.PriceConfidenceTooWide = exports.PriceIsZero = exports.PriceIsLowerThanHeuristic = exports.PriceIsBiggerThanHeuristic = exports.PriceNotValid = exports.InvalidFlag = exports.GlobalEmergencyMode = exports.InvalidTwapPrice = exports.PriceTooDivergentFromTwap = exports.PriceTooOld = exports.CouldNotDeserializeScope = exports.SwitchboardV2Error = exports.FlashLoansDisabled = exports.MultipleFlashBorrows = exports.FlashRepayCpi = exports.InvalidFlashRepay = exports.NoFlashRepayFound = exports.FlashBorrowCpi = exports.InsufficientProtocolFeesToRedeem = exports.InvalidOracleConfig = exports.NegativeInterestRate = exports.ObligationLiquidityEmpty = exports.ObligationCollateralEmpty = exports.InvalidObligationLiquidity = exports.InvalidObligationCollateral = exports.ObligationBorrowsZero = exports.ObligationDepositsZero = exports.ObligationBorrowsEmpty = exports.ObligationDepositsEmpty = exports.InvalidObligationOwner = exports.ObligationReserveLimit = exports.ObligationStale = exports.ObligationHealthy = exports.LiquidationTooSmall = exports.RepayTooSmall = exports.BorrowTooLarge = exports.BorrowTooSmall = exports.WithdrawTooLarge = exports.WithdrawTooSmall = exports.ReserveStale = exports.InsufficientLiquidity = exports.MathOverflow = exports.InvalidAccountInput = exports.InvalidSigner = exports.InvalidConfig = exports.InvalidAmount = exports.InvalidAccountOwner = exports.InvalidMarketOwner = exports.InvalidMarketAuthority = void 0;
4
- exports.LiquidationBorrowFactorPriority = exports.BorrowingAboveUtilizationRateDisabled = exports.ReserveAccountingMismatch = exports.ReserveVaultBalanceMismatch = exports.ReserveTokenBalanceMismatch = exports.LiabilitiesBiggerThanAssets = exports.WorseLTVBlocked = exports.NetValueRemainingTooSmall = exports.BorrowingDisabledOutsideElevationGroup = exports.DepositLimitExceeded = exports.BorrowLimitExceeded = exports.BorrowingDisabled = exports.CollateralNonLiquidatable = exports.UserMetadataOwnerAlreadySet = exports.ReferrerStateOwnerMismatch = exports.ObligationInDeprecatedReserve = exports.ElevationGroupAlreadyActivated = exports.ReserveObsolete = exports.ShortUrlNotAsciiAlphanumeric = exports.CpiDisabled = exports.InsufficientReferralFeesToRedeem = exports.ReferrerAccountMissing = exports.ReferrerAccountReferrerMissmatch = exports.ReferrerAccountWrongAddress = exports.ReferrerAccountMintMissmatch = exports.ReferrerAccountNotInitialized = exports.ReserveDeprecated = exports.ElevationGroupNewLoansDisabled = exports.UnhealthyElevationGroupLtv = exports.InvalidElevationGroupConfig = exports.InvalidElevationGroup = exports.InconsistentElevationGroup = exports.IsolatedAssetTierViolation = exports.LiquidationRewardTooSmall = exports.LastTimestampGreaterThanCurrent = exports.WithdrawalCapReached = exports.ObligationEmpty = exports.CannotSocializeObligationWithCollateral = exports.InvalidUtilizationRate = exports.InvalidBorrowRateCurvePoint = exports.InvalidObligationId = exports.InvalidObligationSeedsValue = exports.ObligationCollateralLtvZero = exports.InvalidScopePriceAccount = exports.InvalidSwitchboardAccount = exports.InvalidPythPriceAccount = exports.InvalidTwapConfig = exports.NoPriceFound = exports.IncorrectInstructionInPosition = exports.NoFarmForReserve = void 0;
5
- exports.CannotCalculateReferralAmountDueToSlotsMismatch = exports.DepositDisabledOutsideElevationGroup = exports.InvalidTokenAccount = exports.UnsupportedTokenExtension = exports.ObligationElevationGroupMultipleDebtReserve = exports.ObligationCollateralExceedsElevationGroupLimit = exports.ElevationGroupDebtReserveAsCollateral = exports.ElevationGroupHasAnotherDebtReserve = exports.ElevationGroupMaxCollateralReserveZero = exports.ElevationGroupWithoutDebtReserve = exports.ElevationGroupBorrowLimitExceeded = exports.LiquidationLowestLTVPriority = void 0;
4
+ exports.LiquidationBorrowFactorPriority = exports.BorrowingAboveUtilizationRateDisabled = exports.ReserveAccountingMismatch = exports.ReserveVaultBalanceMismatch = exports.ReserveTokenBalanceMismatch = exports.LiabilitiesBiggerThanAssets = exports.WorseLtvBlocked = exports.NetValueRemainingTooSmall = exports.BorrowingDisabledOutsideElevationGroup = exports.DepositLimitExceeded = exports.BorrowLimitExceeded = exports.BorrowingDisabled = exports.CollateralNonLiquidatable = exports.UserMetadataOwnerAlreadySet = exports.ReferrerStateOwnerMismatch = exports.ObligationInObsoleteReserve = exports.ElevationGroupAlreadyActivated = exports.ReserveObsolete = exports.ShortUrlNotAsciiAlphanumeric = exports.CpiDisabled = exports.InsufficientReferralFeesToRedeem = exports.ReferrerAccountMissing = exports.ReferrerAccountReferrerMissmatch = exports.ReferrerAccountWrongAddress = exports.ReferrerAccountMintMissmatch = exports.ReferrerAccountNotInitialized = exports.ReserveDeprecated = exports.ElevationGroupNewLoansDisabled = exports.UnhealthyElevationGroupLtv = exports.InvalidElevationGroupConfig = exports.InvalidElevationGroup = exports.InconsistentElevationGroup = exports.IsolatedAssetTierViolation = exports.LiquidationRewardTooSmall = exports.LastTimestampGreaterThanCurrent = exports.WithdrawalCapReached = exports.ObligationEmpty = exports.CannotSocializeObligationWithCollateral = exports.InvalidUtilizationRate = exports.InvalidBorrowRateCurvePoint = exports.DeprecatedInvalidObligationId = exports.InvalidObligationSeedsValue = exports.ObligationCollateralLtvZero = exports.InvalidScopePriceAccount = exports.InvalidSwitchboardAccount = exports.InvalidPythPriceAccount = exports.InvalidTwapConfig = exports.NoPriceFound = exports.IncorrectInstructionInPosition = exports.NoFarmForReserve = void 0;
5
+ exports.UserTokenBalanceMismatch = exports.WithdrawTicketRequiresFullRedemption = exports.WithdrawTicketStillValid = exports.WithdrawTicketRedemptionDisabled = exports.WithdrawTicketIssuanceDisabled = exports.BorrowOrderFillValueTooSmall = exports.ExpectationNotMet = exports.DebtReachedReserveDebtTerm = exports.BorrowOrderExecutionDisabled = exports.NonUpdatableOrderConfiguration = exports.ReserveDebtMaturityReached = exports.BorrowOrderFillTimeLimitExceeded = exports.BorrowOrderMinDebtTermInsufficient = exports.BorrowOrderMaxBorrowRateExceeded = exports.BorrowOrderDebtLiquidityMintMismatch = exports.TransactionIncludesRestrictedPrograms = exports.CannotUseSameReserve = exports.CTokenUsageBlocked = exports.ReserveHasNotReceivedInitialDeposit = exports.InitialAdminDepositExecuted = exports.NoUpgradeAuthority = exports.OrderCreationDisabled = exports.OperationNotPermittedMarketImmutable = exports.OperationNotPermittedWithCurrentObligationOrders = exports.OrderConfigurationNotSupportedByObligation = exports.InvalidOrderConfiguration = exports.OrderIndexOutOfBounds = exports.InsufficientRepayAmount = exports.RepayTooSmallForFullLiquidation = exports.FarmAccountsMissing = exports.WorseLtvThanUnhealthyLtv = exports.LowestLtvAssetsPriority = exports.ZeroMaxLtvAssetsInDeposits = exports.MaximumWithdrawValueZero = exports.ObligationCurrentlyMarkedForDeleveraging = exports.LendingMarketsMustMatch = exports.ObligationsMustMatch = exports.ObligationOwnersMustMatch = exports.CannotCalculateReferralAmountDueToSlotsMismatch = exports.DepositDisabledOutsideElevationGroup = exports.InvalidTokenAccount = exports.UnsupportedTokenExtension = exports.ObligationElevationGroupMultipleDebtReserve = exports.ObligationCollateralExceedsElevationGroupLimit = exports.ElevationGroupDebtReserveAsCollateral = exports.ElevationGroupHasAnotherDebtReserve = exports.ElevationGroupMaxCollateralReserveZero = exports.ElevationGroupWithoutDebtReserve = exports.ElevationGroupBorrowLimitExceeded = exports.LiquidationLowestLiquidationLtvPriority = void 0;
6
+ exports.TransactionIncludesNonceInstruction = exports.ReserveRewardsDisabled = exports.MissingPermissioner = exports.OnlyComputeBudgetCompanionIxsAllowed = exports.ObligationHasActiveBorrowOrders = exports.ObligationOwnershipTransferNotApproved = exports.ObligationInvalidPendingOwner = exports.ObligationPendingOwnerNotSet = exports.ObligationOwnershipTransferNotInInitiatedState = exports.ObligationOwnershipTransferInProgress = exports.ReserveEmergencyMode = exports.ClonedReserveLiquidityMintMismatch = exports.CloneTargetReserveAlreadyInUse = exports.CloneSourceReserveDisabled = exports.WithdrawTicketFullyCancelled = exports.WithdrawTicketCancellationDisabled = exports.RolloverNotSupportedInElevationGroup = exports.ObligationBorrowRolloverMustProlongDebtTerm = exports.ObligationBorrowRolloverConfigMismatch = exports.PartialRolloverValueTooSmall = exports.ObligationAccountingMismatch = exports.BorrowRolloverExecutionDisabled = exports.ObligationBorrowRolloverTargetReserveMismatch = exports.ObligationBorrowRolloverNotEnabledByOwner = exports.ObligationBorrowOutsideRolloverWindow = exports.ObligationBorrowRolloverNotApplicable = exports.BorrowRolloverLiquidityMintMismatch = exports.InvalidObligationConfigUpdateSubject = exports.BorrowRolloverConfigurationDisabled = exports.WithdrawTicketProgressCallbackAccountsMissing = exports.InvalidWithdrawTicketProgressCallbackConfig = exports.WithdrawTicketValueTooSmall = exports.BorrowOrderValueTooSmall = exports.WithdrawTicketInvalid = exports.InvalidTokenAccountState = exports.WithdrawQueuedLiquidityValueTooSmall = void 0;
6
7
  exports.fromCode = fromCode;
7
8
  class InvalidMarketAuthority extends Error {
8
9
  logs;
@@ -69,9 +70,9 @@ class InvalidSigner extends Error {
69
70
  static code = 6005;
70
71
  code = 6005;
71
72
  name = "InvalidSigner";
72
- msg = "Input account must be a signer";
73
+ msg = "Signer is not allowed to perform this action";
73
74
  constructor(logs) {
74
- super("6005: Input account must be a signer");
75
+ super("6005: Signer is not allowed to perform this action");
75
76
  this.logs = logs;
76
77
  }
77
78
  }
@@ -712,18 +713,18 @@ class InvalidObligationSeedsValue extends Error {
712
713
  }
713
714
  }
714
715
  exports.InvalidObligationSeedsValue = InvalidObligationSeedsValue;
715
- class InvalidObligationId extends Error {
716
+ class DeprecatedInvalidObligationId extends Error {
716
717
  logs;
717
718
  static code = 6059;
718
719
  code = 6059;
719
- name = "InvalidObligationId";
720
- msg = "Obligation id must be 0";
720
+ name = "DeprecatedInvalidObligationId";
721
+ msg = "[DEPRECATED] Obligation id must be 0";
721
722
  constructor(logs) {
722
- super("6059: Obligation id must be 0");
723
+ super("6059: [DEPRECATED] Obligation id must be 0");
723
724
  this.logs = logs;
724
725
  }
725
726
  }
726
- exports.InvalidObligationId = InvalidObligationId;
727
+ exports.DeprecatedInvalidObligationId = DeprecatedInvalidObligationId;
727
728
  class InvalidBorrowRateCurvePoint extends Error {
728
729
  logs;
729
730
  static code = 6060;
@@ -1012,18 +1013,18 @@ class ElevationGroupAlreadyActivated extends Error {
1012
1013
  }
1013
1014
  }
1014
1015
  exports.ElevationGroupAlreadyActivated = ElevationGroupAlreadyActivated;
1015
- class ObligationInDeprecatedReserve extends Error {
1016
+ class ObligationInObsoleteReserve extends Error {
1016
1017
  logs;
1017
1018
  static code = 6084;
1018
1019
  code = 6084;
1019
- name = "ObligationInDeprecatedReserve";
1020
- msg = "Obligation has a deposit in a deprecated reserve";
1020
+ name = "ObligationInObsoleteReserve";
1021
+ msg = "Obligation has a deposit or borrow in an obsolete reserve";
1021
1022
  constructor(logs) {
1022
- super("6084: Obligation has a deposit in a deprecated reserve");
1023
+ super("6084: Obligation has a deposit or borrow in an obsolete reserve");
1023
1024
  this.logs = logs;
1024
1025
  }
1025
1026
  }
1026
- exports.ObligationInDeprecatedReserve = ObligationInDeprecatedReserve;
1027
+ exports.ObligationInObsoleteReserve = ObligationInObsoleteReserve;
1027
1028
  class ReferrerStateOwnerMismatch extends Error {
1028
1029
  logs;
1029
1030
  static code = 6085;
@@ -1120,18 +1121,18 @@ class NetValueRemainingTooSmall extends Error {
1120
1121
  }
1121
1122
  }
1122
1123
  exports.NetValueRemainingTooSmall = NetValueRemainingTooSmall;
1123
- class WorseLTVBlocked extends Error {
1124
+ class WorseLtvBlocked extends Error {
1124
1125
  logs;
1125
1126
  static code = 6093;
1126
1127
  code = 6093;
1127
- name = "WorseLTVBlocked";
1128
+ name = "WorseLtvBlocked";
1128
1129
  msg = "Cannot get the obligation in a worse position";
1129
1130
  constructor(logs) {
1130
1131
  super("6093: Cannot get the obligation in a worse position");
1131
1132
  this.logs = logs;
1132
1133
  }
1133
1134
  }
1134
- exports.WorseLTVBlocked = WorseLTVBlocked;
1135
+ exports.WorseLtvBlocked = WorseLtvBlocked;
1135
1136
  class LiabilitiesBiggerThanAssets extends Error {
1136
1137
  logs;
1137
1138
  static code = 6094;
@@ -1204,18 +1205,18 @@ class LiquidationBorrowFactorPriority extends Error {
1204
1205
  }
1205
1206
  }
1206
1207
  exports.LiquidationBorrowFactorPriority = LiquidationBorrowFactorPriority;
1207
- class LiquidationLowestLTVPriority extends Error {
1208
+ class LiquidationLowestLiquidationLtvPriority extends Error {
1208
1209
  logs;
1209
1210
  static code = 6100;
1210
1211
  code = 6100;
1211
- name = "LiquidationLowestLTVPriority";
1212
- msg = "Liquidation must prioritize the collateral with the lowest LTV";
1212
+ name = "LiquidationLowestLiquidationLtvPriority";
1213
+ msg = "Liquidation must prioritize the collateral with the lowest liquidation LTV";
1213
1214
  constructor(logs) {
1214
- super("6100: Liquidation must prioritize the collateral with the lowest LTV");
1215
+ super("6100: Liquidation must prioritize the collateral with the lowest liquidation LTV");
1215
1216
  this.logs = logs;
1216
1217
  }
1217
1218
  }
1218
- exports.LiquidationLowestLTVPriority = LiquidationLowestLTVPriority;
1219
+ exports.LiquidationLowestLiquidationLtvPriority = LiquidationLowestLiquidationLtvPriority;
1219
1220
  class ElevationGroupBorrowLimitExceeded extends Error {
1220
1221
  logs;
1221
1222
  static code = 6101;
@@ -1348,6 +1349,894 @@ class CannotCalculateReferralAmountDueToSlotsMismatch extends Error {
1348
1349
  }
1349
1350
  }
1350
1351
  exports.CannotCalculateReferralAmountDueToSlotsMismatch = CannotCalculateReferralAmountDueToSlotsMismatch;
1352
+ class ObligationOwnersMustMatch extends Error {
1353
+ logs;
1354
+ static code = 6112;
1355
+ code = 6112;
1356
+ name = "ObligationOwnersMustMatch";
1357
+ msg = "Obligation owners must match";
1358
+ constructor(logs) {
1359
+ super("6112: Obligation owners must match");
1360
+ this.logs = logs;
1361
+ }
1362
+ }
1363
+ exports.ObligationOwnersMustMatch = ObligationOwnersMustMatch;
1364
+ class ObligationsMustMatch extends Error {
1365
+ logs;
1366
+ static code = 6113;
1367
+ code = 6113;
1368
+ name = "ObligationsMustMatch";
1369
+ msg = "Obligations must match";
1370
+ constructor(logs) {
1371
+ super("6113: Obligations must match");
1372
+ this.logs = logs;
1373
+ }
1374
+ }
1375
+ exports.ObligationsMustMatch = ObligationsMustMatch;
1376
+ class LendingMarketsMustMatch extends Error {
1377
+ logs;
1378
+ static code = 6114;
1379
+ code = 6114;
1380
+ name = "LendingMarketsMustMatch";
1381
+ msg = "Lending markets must match";
1382
+ constructor(logs) {
1383
+ super("6114: Lending markets must match");
1384
+ this.logs = logs;
1385
+ }
1386
+ }
1387
+ exports.LendingMarketsMustMatch = LendingMarketsMustMatch;
1388
+ class ObligationCurrentlyMarkedForDeleveraging extends Error {
1389
+ logs;
1390
+ static code = 6115;
1391
+ code = 6115;
1392
+ name = "ObligationCurrentlyMarkedForDeleveraging";
1393
+ msg = "Obligation is already marked for deleveraging";
1394
+ constructor(logs) {
1395
+ super("6115: Obligation is already marked for deleveraging");
1396
+ this.logs = logs;
1397
+ }
1398
+ }
1399
+ exports.ObligationCurrentlyMarkedForDeleveraging = ObligationCurrentlyMarkedForDeleveraging;
1400
+ class MaximumWithdrawValueZero extends Error {
1401
+ logs;
1402
+ static code = 6116;
1403
+ code = 6116;
1404
+ name = "MaximumWithdrawValueZero";
1405
+ msg = "Maximum withdrawable value of this collateral is zero, LTV needs improved";
1406
+ constructor(logs) {
1407
+ super("6116: Maximum withdrawable value of this collateral is zero, LTV needs improved");
1408
+ this.logs = logs;
1409
+ }
1410
+ }
1411
+ exports.MaximumWithdrawValueZero = MaximumWithdrawValueZero;
1412
+ class ZeroMaxLtvAssetsInDeposits extends Error {
1413
+ logs;
1414
+ static code = 6117;
1415
+ code = 6117;
1416
+ name = "ZeroMaxLtvAssetsInDeposits";
1417
+ msg = "No max LTV 0 assets allowed in deposits for repay and withdraw";
1418
+ constructor(logs) {
1419
+ super("6117: No max LTV 0 assets allowed in deposits for repay and withdraw");
1420
+ this.logs = logs;
1421
+ }
1422
+ }
1423
+ exports.ZeroMaxLtvAssetsInDeposits = ZeroMaxLtvAssetsInDeposits;
1424
+ class LowestLtvAssetsPriority extends Error {
1425
+ logs;
1426
+ static code = 6118;
1427
+ code = 6118;
1428
+ name = "LowestLtvAssetsPriority";
1429
+ msg = "Withdrawing must prioritize the collateral with the lowest reserve max-LTV";
1430
+ constructor(logs) {
1431
+ super("6118: Withdrawing must prioritize the collateral with the lowest reserve max-LTV");
1432
+ this.logs = logs;
1433
+ }
1434
+ }
1435
+ exports.LowestLtvAssetsPriority = LowestLtvAssetsPriority;
1436
+ class WorseLtvThanUnhealthyLtv extends Error {
1437
+ logs;
1438
+ static code = 6119;
1439
+ code = 6119;
1440
+ name = "WorseLtvThanUnhealthyLtv";
1441
+ msg = "Cannot get the obligation liquidatable";
1442
+ constructor(logs) {
1443
+ super("6119: Cannot get the obligation liquidatable");
1444
+ this.logs = logs;
1445
+ }
1446
+ }
1447
+ exports.WorseLtvThanUnhealthyLtv = WorseLtvThanUnhealthyLtv;
1448
+ class FarmAccountsMissing extends Error {
1449
+ logs;
1450
+ static code = 6120;
1451
+ code = 6120;
1452
+ name = "FarmAccountsMissing";
1453
+ msg = "Farm accounts to refresh are missing";
1454
+ constructor(logs) {
1455
+ super("6120: Farm accounts to refresh are missing");
1456
+ this.logs = logs;
1457
+ }
1458
+ }
1459
+ exports.FarmAccountsMissing = FarmAccountsMissing;
1460
+ class RepayTooSmallForFullLiquidation extends Error {
1461
+ logs;
1462
+ static code = 6121;
1463
+ code = 6121;
1464
+ name = "RepayTooSmallForFullLiquidation";
1465
+ msg = "Repay amount is too small to satisfy the mandatory full liquidation";
1466
+ constructor(logs) {
1467
+ super("6121: Repay amount is too small to satisfy the mandatory full liquidation");
1468
+ this.logs = logs;
1469
+ }
1470
+ }
1471
+ exports.RepayTooSmallForFullLiquidation = RepayTooSmallForFullLiquidation;
1472
+ class InsufficientRepayAmount extends Error {
1473
+ logs;
1474
+ static code = 6122;
1475
+ code = 6122;
1476
+ name = "InsufficientRepayAmount";
1477
+ msg = "Liquidator provided repay amount lower than required by liquidation rules";
1478
+ constructor(logs) {
1479
+ super("6122: Liquidator provided repay amount lower than required by liquidation rules");
1480
+ this.logs = logs;
1481
+ }
1482
+ }
1483
+ exports.InsufficientRepayAmount = InsufficientRepayAmount;
1484
+ class OrderIndexOutOfBounds extends Error {
1485
+ logs;
1486
+ static code = 6123;
1487
+ code = 6123;
1488
+ name = "OrderIndexOutOfBounds";
1489
+ msg = "Order of the given index cannot exist";
1490
+ constructor(logs) {
1491
+ super("6123: Order of the given index cannot exist");
1492
+ this.logs = logs;
1493
+ }
1494
+ }
1495
+ exports.OrderIndexOutOfBounds = OrderIndexOutOfBounds;
1496
+ class InvalidOrderConfiguration extends Error {
1497
+ logs;
1498
+ static code = 6124;
1499
+ code = 6124;
1500
+ name = "InvalidOrderConfiguration";
1501
+ msg = "Given order configuration has wrong parameters";
1502
+ constructor(logs) {
1503
+ super("6124: Given order configuration has wrong parameters");
1504
+ this.logs = logs;
1505
+ }
1506
+ }
1507
+ exports.InvalidOrderConfiguration = InvalidOrderConfiguration;
1508
+ class OrderConfigurationNotSupportedByObligation extends Error {
1509
+ logs;
1510
+ static code = 6125;
1511
+ code = 6125;
1512
+ name = "OrderConfigurationNotSupportedByObligation";
1513
+ msg = "Given order configuration cannot be used with the current state of the obligation";
1514
+ constructor(logs) {
1515
+ super("6125: Given order configuration cannot be used with the current state of the obligation");
1516
+ this.logs = logs;
1517
+ }
1518
+ }
1519
+ exports.OrderConfigurationNotSupportedByObligation = OrderConfigurationNotSupportedByObligation;
1520
+ class OperationNotPermittedWithCurrentObligationOrders extends Error {
1521
+ logs;
1522
+ static code = 6126;
1523
+ code = 6126;
1524
+ name = "OperationNotPermittedWithCurrentObligationOrders";
1525
+ msg = "Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count";
1526
+ constructor(logs) {
1527
+ super("6126: Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count");
1528
+ this.logs = logs;
1529
+ }
1530
+ }
1531
+ exports.OperationNotPermittedWithCurrentObligationOrders = OperationNotPermittedWithCurrentObligationOrders;
1532
+ class OperationNotPermittedMarketImmutable extends Error {
1533
+ logs;
1534
+ static code = 6127;
1535
+ code = 6127;
1536
+ name = "OperationNotPermittedMarketImmutable";
1537
+ msg = "Cannot update lending market because it is set as immutable";
1538
+ constructor(logs) {
1539
+ super("6127: Cannot update lending market because it is set as immutable");
1540
+ this.logs = logs;
1541
+ }
1542
+ }
1543
+ exports.OperationNotPermittedMarketImmutable = OperationNotPermittedMarketImmutable;
1544
+ class OrderCreationDisabled extends Error {
1545
+ logs;
1546
+ static code = 6128;
1547
+ code = 6128;
1548
+ name = "OrderCreationDisabled";
1549
+ msg = "Creation of new orders is disabled";
1550
+ constructor(logs) {
1551
+ super("6128: Creation of new orders is disabled");
1552
+ this.logs = logs;
1553
+ }
1554
+ }
1555
+ exports.OrderCreationDisabled = OrderCreationDisabled;
1556
+ class NoUpgradeAuthority extends Error {
1557
+ logs;
1558
+ static code = 6129;
1559
+ code = 6129;
1560
+ name = "NoUpgradeAuthority";
1561
+ msg = "Cannot initialize global config because there is no upgrade authority to the program";
1562
+ constructor(logs) {
1563
+ super("6129: Cannot initialize global config because there is no upgrade authority to the program");
1564
+ this.logs = logs;
1565
+ }
1566
+ }
1567
+ exports.NoUpgradeAuthority = NoUpgradeAuthority;
1568
+ class InitialAdminDepositExecuted extends Error {
1569
+ logs;
1570
+ static code = 6130;
1571
+ code = 6130;
1572
+ name = "InitialAdminDepositExecuted";
1573
+ msg = "Initial admin deposit in reserve already executed";
1574
+ constructor(logs) {
1575
+ super("6130: Initial admin deposit in reserve already executed");
1576
+ this.logs = logs;
1577
+ }
1578
+ }
1579
+ exports.InitialAdminDepositExecuted = InitialAdminDepositExecuted;
1580
+ class ReserveHasNotReceivedInitialDeposit extends Error {
1581
+ logs;
1582
+ static code = 6131;
1583
+ code = 6131;
1584
+ name = "ReserveHasNotReceivedInitialDeposit";
1585
+ msg = "Reserve has not received the initial deposit, cannot update config";
1586
+ constructor(logs) {
1587
+ super("6131: Reserve has not received the initial deposit, cannot update config");
1588
+ this.logs = logs;
1589
+ }
1590
+ }
1591
+ exports.ReserveHasNotReceivedInitialDeposit = ReserveHasNotReceivedInitialDeposit;
1592
+ class CTokenUsageBlocked extends Error {
1593
+ logs;
1594
+ static code = 6132;
1595
+ code = 6132;
1596
+ name = "CTokenUsageBlocked";
1597
+ msg = "CToken minting/redeeming is blocked for this reserve";
1598
+ constructor(logs) {
1599
+ super("6132: CToken minting/redeeming is blocked for this reserve");
1600
+ this.logs = logs;
1601
+ }
1602
+ }
1603
+ exports.CTokenUsageBlocked = CTokenUsageBlocked;
1604
+ class CannotUseSameReserve extends Error {
1605
+ logs;
1606
+ static code = 6133;
1607
+ code = 6133;
1608
+ name = "CannotUseSameReserve";
1609
+ msg = "Cannot call ix with same reserve";
1610
+ constructor(logs) {
1611
+ super("6133: Cannot call ix with same reserve");
1612
+ this.logs = logs;
1613
+ }
1614
+ }
1615
+ exports.CannotUseSameReserve = CannotUseSameReserve;
1616
+ class TransactionIncludesRestrictedPrograms extends Error {
1617
+ logs;
1618
+ static code = 6134;
1619
+ code = 6134;
1620
+ name = "TransactionIncludesRestrictedPrograms";
1621
+ msg = "Transaction includes restricted programs";
1622
+ constructor(logs) {
1623
+ super("6134: Transaction includes restricted programs");
1624
+ this.logs = logs;
1625
+ }
1626
+ }
1627
+ exports.TransactionIncludesRestrictedPrograms = TransactionIncludesRestrictedPrograms;
1628
+ class BorrowOrderDebtLiquidityMintMismatch extends Error {
1629
+ logs;
1630
+ static code = 6135;
1631
+ code = 6135;
1632
+ name = "BorrowOrderDebtLiquidityMintMismatch";
1633
+ msg = "There is no borrow order requesting debt in the given asset";
1634
+ constructor(logs) {
1635
+ super("6135: There is no borrow order requesting debt in the given asset");
1636
+ this.logs = logs;
1637
+ }
1638
+ }
1639
+ exports.BorrowOrderDebtLiquidityMintMismatch = BorrowOrderDebtLiquidityMintMismatch;
1640
+ class BorrowOrderMaxBorrowRateExceeded extends Error {
1641
+ logs;
1642
+ static code = 6136;
1643
+ code = 6136;
1644
+ name = "BorrowOrderMaxBorrowRateExceeded";
1645
+ msg = "Reserve used for fill exceeds the maximum borrow rate specified by the order";
1646
+ constructor(logs) {
1647
+ super("6136: Reserve used for fill exceeds the maximum borrow rate specified by the order");
1648
+ this.logs = logs;
1649
+ }
1650
+ }
1651
+ exports.BorrowOrderMaxBorrowRateExceeded = BorrowOrderMaxBorrowRateExceeded;
1652
+ class BorrowOrderMinDebtTermInsufficient extends Error {
1653
+ logs;
1654
+ static code = 6137;
1655
+ code = 6137;
1656
+ name = "BorrowOrderMinDebtTermInsufficient";
1657
+ msg = "Reserve used for fill defines a debt term shorter than specified by the order";
1658
+ constructor(logs) {
1659
+ super("6137: Reserve used for fill defines a debt term shorter than specified by the order");
1660
+ this.logs = logs;
1661
+ }
1662
+ }
1663
+ exports.BorrowOrderMinDebtTermInsufficient = BorrowOrderMinDebtTermInsufficient;
1664
+ class BorrowOrderFillTimeLimitExceeded extends Error {
1665
+ logs;
1666
+ static code = 6138;
1667
+ code = 6138;
1668
+ name = "BorrowOrderFillTimeLimitExceeded";
1669
+ msg = "Borrow order can no longer be filled";
1670
+ constructor(logs) {
1671
+ super("6138: Borrow order can no longer be filled");
1672
+ this.logs = logs;
1673
+ }
1674
+ }
1675
+ exports.BorrowOrderFillTimeLimitExceeded = BorrowOrderFillTimeLimitExceeded;
1676
+ class ReserveDebtMaturityReached extends Error {
1677
+ logs;
1678
+ static code = 6139;
1679
+ code = 6139;
1680
+ name = "ReserveDebtMaturityReached";
1681
+ msg = "Cannot borrow from a reserve that reached its debt maturity timestamp";
1682
+ constructor(logs) {
1683
+ super("6139: Cannot borrow from a reserve that reached its debt maturity timestamp");
1684
+ this.logs = logs;
1685
+ }
1686
+ }
1687
+ exports.ReserveDebtMaturityReached = ReserveDebtMaturityReached;
1688
+ class NonUpdatableOrderConfiguration extends Error {
1689
+ logs;
1690
+ static code = 6140;
1691
+ code = 6140;
1692
+ name = "NonUpdatableOrderConfiguration";
1693
+ msg = "Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)";
1694
+ constructor(logs) {
1695
+ super("6140: Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)");
1696
+ this.logs = logs;
1697
+ }
1698
+ }
1699
+ exports.NonUpdatableOrderConfiguration = NonUpdatableOrderConfiguration;
1700
+ class BorrowOrderExecutionDisabled extends Error {
1701
+ logs;
1702
+ static code = 6141;
1703
+ code = 6141;
1704
+ name = "BorrowOrderExecutionDisabled";
1705
+ msg = "Execution of borrow orders is disabled";
1706
+ constructor(logs) {
1707
+ super("6141: Execution of borrow orders is disabled");
1708
+ this.logs = logs;
1709
+ }
1710
+ }
1711
+ exports.BorrowOrderExecutionDisabled = BorrowOrderExecutionDisabled;
1712
+ class DebtReachedReserveDebtTerm extends Error {
1713
+ logs;
1714
+ static code = 6142;
1715
+ code = 6142;
1716
+ name = "DebtReachedReserveDebtTerm";
1717
+ msg = "Cannot increase the debt that has reached its end of term configured by the reserve";
1718
+ constructor(logs) {
1719
+ super("6142: Cannot increase the debt that has reached its end of term configured by the reserve");
1720
+ this.logs = logs;
1721
+ }
1722
+ }
1723
+ exports.DebtReachedReserveDebtTerm = DebtReachedReserveDebtTerm;
1724
+ class ExpectationNotMet extends Error {
1725
+ logs;
1726
+ static code = 6143;
1727
+ code = 6143;
1728
+ name = "ExpectationNotMet";
1729
+ msg = "The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)";
1730
+ constructor(logs) {
1731
+ super("6143: The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)");
1732
+ this.logs = logs;
1733
+ }
1734
+ }
1735
+ exports.ExpectationNotMet = ExpectationNotMet;
1736
+ class BorrowOrderFillValueTooSmall extends Error {
1737
+ logs;
1738
+ static code = 6144;
1739
+ code = 6144;
1740
+ name = "BorrowOrderFillValueTooSmall";
1741
+ msg = "Available liquidity could not satisfy the minimum required borrow order fill value";
1742
+ constructor(logs) {
1743
+ super("6144: Available liquidity could not satisfy the minimum required borrow order fill value");
1744
+ this.logs = logs;
1745
+ }
1746
+ }
1747
+ exports.BorrowOrderFillValueTooSmall = BorrowOrderFillValueTooSmall;
1748
+ class WithdrawTicketIssuanceDisabled extends Error {
1749
+ logs;
1750
+ static code = 6145;
1751
+ code = 6145;
1752
+ name = "WithdrawTicketIssuanceDisabled";
1753
+ msg = "Issuing new withdraw tickets is disabled by the market";
1754
+ constructor(logs) {
1755
+ super("6145: Issuing new withdraw tickets is disabled by the market");
1756
+ this.logs = logs;
1757
+ }
1758
+ }
1759
+ exports.WithdrawTicketIssuanceDisabled = WithdrawTicketIssuanceDisabled;
1760
+ class WithdrawTicketRedemptionDisabled extends Error {
1761
+ logs;
1762
+ static code = 6146;
1763
+ code = 6146;
1764
+ name = "WithdrawTicketRedemptionDisabled";
1765
+ msg = "Redeeming withdraw tickets is disabled by the market";
1766
+ constructor(logs) {
1767
+ super("6146: Redeeming withdraw tickets is disabled by the market");
1768
+ this.logs = logs;
1769
+ }
1770
+ }
1771
+ exports.WithdrawTicketRedemptionDisabled = WithdrawTicketRedemptionDisabled;
1772
+ class WithdrawTicketStillValid extends Error {
1773
+ logs;
1774
+ static code = 6147;
1775
+ code = 6147;
1776
+ name = "WithdrawTicketStillValid";
1777
+ msg = "Recovering collateral is only available after the withdraw ticket has been marked invalid";
1778
+ constructor(logs) {
1779
+ super("6147: Recovering collateral is only available after the withdraw ticket has been marked invalid");
1780
+ this.logs = logs;
1781
+ }
1782
+ }
1783
+ exports.WithdrawTicketStillValid = WithdrawTicketStillValid;
1784
+ class WithdrawTicketRequiresFullRedemption extends Error {
1785
+ logs;
1786
+ static code = 6148;
1787
+ code = 6148;
1788
+ name = "WithdrawTicketRequiresFullRedemption";
1789
+ 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";
1790
+ constructor(logs) {
1791
+ super("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");
1792
+ this.logs = logs;
1793
+ }
1794
+ }
1795
+ exports.WithdrawTicketRequiresFullRedemption = WithdrawTicketRequiresFullRedemption;
1796
+ class UserTokenBalanceMismatch extends Error {
1797
+ logs;
1798
+ static code = 6149;
1799
+ code = 6149;
1800
+ name = "UserTokenBalanceMismatch";
1801
+ msg = "The user's token account has changed its balance in an unexpected way";
1802
+ constructor(logs) {
1803
+ super("6149: The user's token account has changed its balance in an unexpected way");
1804
+ this.logs = logs;
1805
+ }
1806
+ }
1807
+ exports.UserTokenBalanceMismatch = UserTokenBalanceMismatch;
1808
+ class WithdrawQueuedLiquidityValueTooSmall extends Error {
1809
+ logs;
1810
+ static code = 6150;
1811
+ code = 6150;
1812
+ name = "WithdrawQueuedLiquidityValueTooSmall";
1813
+ msg = "Available liquidity could not satisfy the minimum required ticketed withdrawal value";
1814
+ constructor(logs) {
1815
+ super("6150: Available liquidity could not satisfy the minimum required ticketed withdrawal value");
1816
+ this.logs = logs;
1817
+ }
1818
+ }
1819
+ exports.WithdrawQueuedLiquidityValueTooSmall = WithdrawQueuedLiquidityValueTooSmall;
1820
+ class InvalidTokenAccountState extends Error {
1821
+ logs;
1822
+ static code = 6151;
1823
+ code = 6151;
1824
+ name = "InvalidTokenAccountState";
1825
+ msg = "Token account is in a state preventing the handler's operation (e.g. frozen or delegate)";
1826
+ constructor(logs) {
1827
+ super("6151: Token account is in a state preventing the handler's operation (e.g. frozen or delegate)");
1828
+ this.logs = logs;
1829
+ }
1830
+ }
1831
+ exports.InvalidTokenAccountState = InvalidTokenAccountState;
1832
+ class WithdrawTicketInvalid extends Error {
1833
+ logs;
1834
+ static code = 6152;
1835
+ code = 6152;
1836
+ name = "WithdrawTicketInvalid";
1837
+ msg = "Cannot use ticket that was already marked invalid";
1838
+ constructor(logs) {
1839
+ super("6152: Cannot use ticket that was already marked invalid");
1840
+ this.logs = logs;
1841
+ }
1842
+ }
1843
+ exports.WithdrawTicketInvalid = WithdrawTicketInvalid;
1844
+ class BorrowOrderValueTooSmall extends Error {
1845
+ logs;
1846
+ static code = 6153;
1847
+ code = 6153;
1848
+ name = "BorrowOrderValueTooSmall";
1849
+ msg = "Borrow order's value would be below the market-configured minimum";
1850
+ constructor(logs) {
1851
+ super("6153: Borrow order's value would be below the market-configured minimum");
1852
+ this.logs = logs;
1853
+ }
1854
+ }
1855
+ exports.BorrowOrderValueTooSmall = BorrowOrderValueTooSmall;
1856
+ class WithdrawTicketValueTooSmall extends Error {
1857
+ logs;
1858
+ static code = 6154;
1859
+ code = 6154;
1860
+ name = "WithdrawTicketValueTooSmall";
1861
+ msg = "Withdraw ticket's value would be below the market-configured minimum";
1862
+ constructor(logs) {
1863
+ super("6154: Withdraw ticket's value would be below the market-configured minimum");
1864
+ this.logs = logs;
1865
+ }
1866
+ }
1867
+ exports.WithdrawTicketValueTooSmall = WithdrawTicketValueTooSmall;
1868
+ class InvalidWithdrawTicketProgressCallbackConfig extends Error {
1869
+ logs;
1870
+ static code = 6155;
1871
+ code = 6155;
1872
+ name = "InvalidWithdrawTicketProgressCallbackConfig";
1873
+ msg = "Invalid configuration or required custom accounts for the requested withdraw ticket callback type";
1874
+ constructor(logs) {
1875
+ super("6155: Invalid configuration or required custom accounts for the requested withdraw ticket callback type");
1876
+ this.logs = logs;
1877
+ }
1878
+ }
1879
+ exports.InvalidWithdrawTicketProgressCallbackConfig = InvalidWithdrawTicketProgressCallbackConfig;
1880
+ class WithdrawTicketProgressCallbackAccountsMissing extends Error {
1881
+ logs;
1882
+ static code = 6156;
1883
+ code = 6156;
1884
+ name = "WithdrawTicketProgressCallbackAccountsMissing";
1885
+ msg = "One or more accounts required by the ticket's configured progress callback are missing";
1886
+ constructor(logs) {
1887
+ super("6156: One or more accounts required by the ticket's configured progress callback are missing");
1888
+ this.logs = logs;
1889
+ }
1890
+ }
1891
+ exports.WithdrawTicketProgressCallbackAccountsMissing = WithdrawTicketProgressCallbackAccountsMissing;
1892
+ class BorrowRolloverConfigurationDisabled extends Error {
1893
+ logs;
1894
+ static code = 6157;
1895
+ code = 6157;
1896
+ name = "BorrowRolloverConfigurationDisabled";
1897
+ msg = "Configuring auto-rollover on loans is disabled by market owner";
1898
+ constructor(logs) {
1899
+ super("6157: Configuring auto-rollover on loans is disabled by market owner");
1900
+ this.logs = logs;
1901
+ }
1902
+ }
1903
+ exports.BorrowRolloverConfigurationDisabled = BorrowRolloverConfigurationDisabled;
1904
+ class InvalidObligationConfigUpdateSubject extends Error {
1905
+ logs;
1906
+ static code = 6158;
1907
+ code = 6158;
1908
+ name = "InvalidObligationConfigUpdateSubject";
1909
+ msg = "Invalid specification of the Obligation's part to be configured";
1910
+ constructor(logs) {
1911
+ super("6158: Invalid specification of the Obligation's part to be configured");
1912
+ this.logs = logs;
1913
+ }
1914
+ }
1915
+ exports.InvalidObligationConfigUpdateSubject = InvalidObligationConfigUpdateSubject;
1916
+ class BorrowRolloverLiquidityMintMismatch extends Error {
1917
+ logs;
1918
+ static code = 6159;
1919
+ code = 6159;
1920
+ name = "BorrowRolloverLiquidityMintMismatch";
1921
+ msg = "Auto-rollover must use a target reserve of the same token";
1922
+ constructor(logs) {
1923
+ super("6159: Auto-rollover must use a target reserve of the same token");
1924
+ this.logs = logs;
1925
+ }
1926
+ }
1927
+ exports.BorrowRolloverLiquidityMintMismatch = BorrowRolloverLiquidityMintMismatch;
1928
+ class ObligationBorrowRolloverNotApplicable extends Error {
1929
+ logs;
1930
+ static code = 6160;
1931
+ code = 6160;
1932
+ name = "ObligationBorrowRolloverNotApplicable";
1933
+ msg = "The given borrow is not fixed-term and does not require rolling over";
1934
+ constructor(logs) {
1935
+ super("6160: The given borrow is not fixed-term and does not require rolling over");
1936
+ this.logs = logs;
1937
+ }
1938
+ }
1939
+ exports.ObligationBorrowRolloverNotApplicable = ObligationBorrowRolloverNotApplicable;
1940
+ class ObligationBorrowOutsideRolloverWindow extends Error {
1941
+ logs;
1942
+ static code = 6161;
1943
+ code = 6161;
1944
+ name = "ObligationBorrowOutsideRolloverWindow";
1945
+ msg = "The given borrow is outside the corresponding market-configured rollover window";
1946
+ constructor(logs) {
1947
+ super("6161: The given borrow is outside the corresponding market-configured rollover window");
1948
+ this.logs = logs;
1949
+ }
1950
+ }
1951
+ exports.ObligationBorrowOutsideRolloverWindow = ObligationBorrowOutsideRolloverWindow;
1952
+ class ObligationBorrowRolloverNotEnabledByOwner extends Error {
1953
+ logs;
1954
+ static code = 6162;
1955
+ code = 6162;
1956
+ name = "ObligationBorrowRolloverNotEnabledByOwner";
1957
+ msg = "Obligation's owner did not opt-in for auto-rollover of the given borrow";
1958
+ constructor(logs) {
1959
+ super("6162: Obligation's owner did not opt-in for auto-rollover of the given borrow");
1960
+ this.logs = logs;
1961
+ }
1962
+ }
1963
+ exports.ObligationBorrowRolloverNotEnabledByOwner = ObligationBorrowRolloverNotEnabledByOwner;
1964
+ class ObligationBorrowRolloverTargetReserveMismatch extends Error {
1965
+ logs;
1966
+ static code = 6163;
1967
+ code = 6163;
1968
+ name = "ObligationBorrowRolloverTargetReserveMismatch";
1969
+ msg = "Obligation's owner did not allow to roll over into terms offered by the given reserve";
1970
+ constructor(logs) {
1971
+ super("6163: Obligation's owner did not allow to roll over into terms offered by the given reserve");
1972
+ this.logs = logs;
1973
+ }
1974
+ }
1975
+ exports.ObligationBorrowRolloverTargetReserveMismatch = ObligationBorrowRolloverTargetReserveMismatch;
1976
+ class BorrowRolloverExecutionDisabled extends Error {
1977
+ logs;
1978
+ static code = 6164;
1979
+ code = 6164;
1980
+ name = "BorrowRolloverExecutionDisabled";
1981
+ msg = "Executing auto-rollover is disabled by market owner";
1982
+ constructor(logs) {
1983
+ super("6164: Executing auto-rollover is disabled by market owner");
1984
+ this.logs = logs;
1985
+ }
1986
+ }
1987
+ exports.BorrowRolloverExecutionDisabled = BorrowRolloverExecutionDisabled;
1988
+ class ObligationAccountingMismatch extends Error {
1989
+ logs;
1990
+ static code = 6165;
1991
+ code = 6165;
1992
+ name = "ObligationAccountingMismatch";
1993
+ msg = "Obligation internal state accounting has been unexpectedly modified";
1994
+ constructor(logs) {
1995
+ super("6165: Obligation internal state accounting has been unexpectedly modified");
1996
+ this.logs = logs;
1997
+ }
1998
+ }
1999
+ exports.ObligationAccountingMismatch = ObligationAccountingMismatch;
2000
+ class PartialRolloverValueTooSmall extends Error {
2001
+ logs;
2002
+ static code = 6166;
2003
+ code = 6166;
2004
+ name = "PartialRolloverValueTooSmall";
2005
+ msg = "Partial rollover amount is below the market-configured minimum value";
2006
+ constructor(logs) {
2007
+ super("6166: Partial rollover amount is below the market-configured minimum value");
2008
+ this.logs = logs;
2009
+ }
2010
+ }
2011
+ exports.PartialRolloverValueTooSmall = PartialRolloverValueTooSmall;
2012
+ class ObligationBorrowRolloverConfigMismatch extends Error {
2013
+ logs;
2014
+ static code = 6167;
2015
+ code = 6167;
2016
+ name = "ObligationBorrowRolloverConfigMismatch";
2017
+ msg = "Pre-existing rollover configuration of the loan cannot be overwritten by the operation";
2018
+ constructor(logs) {
2019
+ super("6167: Pre-existing rollover configuration of the loan cannot be overwritten by the operation");
2020
+ this.logs = logs;
2021
+ }
2022
+ }
2023
+ exports.ObligationBorrowRolloverConfigMismatch = ObligationBorrowRolloverConfigMismatch;
2024
+ class ObligationBorrowRolloverMustProlongDebtTerm extends Error {
2025
+ logs;
2026
+ static code = 6168;
2027
+ code = 6168;
2028
+ name = "ObligationBorrowRolloverMustProlongDebtTerm";
2029
+ msg = "Rollover into existing borrow must prolong the remaining debt term";
2030
+ constructor(logs) {
2031
+ super("6168: Rollover into existing borrow must prolong the remaining debt term");
2032
+ this.logs = logs;
2033
+ }
2034
+ }
2035
+ exports.ObligationBorrowRolloverMustProlongDebtTerm = ObligationBorrowRolloverMustProlongDebtTerm;
2036
+ class RolloverNotSupportedInElevationGroup extends Error {
2037
+ logs;
2038
+ static code = 6169;
2039
+ code = 6169;
2040
+ name = "RolloverNotSupportedInElevationGroup";
2041
+ msg = "Rollover is not supported for obligations in an elevation group";
2042
+ constructor(logs) {
2043
+ super("6169: Rollover is not supported for obligations in an elevation group");
2044
+ this.logs = logs;
2045
+ }
2046
+ }
2047
+ exports.RolloverNotSupportedInElevationGroup = RolloverNotSupportedInElevationGroup;
2048
+ class WithdrawTicketCancellationDisabled extends Error {
2049
+ logs;
2050
+ static code = 6170;
2051
+ code = 6170;
2052
+ name = "WithdrawTicketCancellationDisabled";
2053
+ msg = "Cancelling withdraw tickets is disabled by the market";
2054
+ constructor(logs) {
2055
+ super("6170: Cancelling withdraw tickets is disabled by the market");
2056
+ this.logs = logs;
2057
+ }
2058
+ }
2059
+ exports.WithdrawTicketCancellationDisabled = WithdrawTicketCancellationDisabled;
2060
+ class WithdrawTicketFullyCancelled extends Error {
2061
+ logs;
2062
+ static code = 6171;
2063
+ code = 6171;
2064
+ name = "WithdrawTicketFullyCancelled";
2065
+ msg = "Cannot use ticket that was already fully-cancelled";
2066
+ constructor(logs) {
2067
+ super("6171: Cannot use ticket that was already fully-cancelled");
2068
+ this.logs = logs;
2069
+ }
2070
+ }
2071
+ exports.WithdrawTicketFullyCancelled = WithdrawTicketFullyCancelled;
2072
+ class CloneSourceReserveDisabled extends Error {
2073
+ logs;
2074
+ static code = 6172;
2075
+ code = 6172;
2076
+ name = "CloneSourceReserveDisabled";
2077
+ msg = "Cannot clone config from a reserve that is disabled";
2078
+ constructor(logs) {
2079
+ super("6172: Cannot clone config from a reserve that is disabled");
2080
+ this.logs = logs;
2081
+ }
2082
+ }
2083
+ exports.CloneSourceReserveDisabled = CloneSourceReserveDisabled;
2084
+ class CloneTargetReserveAlreadyInUse extends Error {
2085
+ logs;
2086
+ static code = 6173;
2087
+ code = 6173;
2088
+ name = "CloneTargetReserveAlreadyInUse";
2089
+ msg = "Cannot clone config into a reserve that has been in use";
2090
+ constructor(logs) {
2091
+ super("6173: Cannot clone config into a reserve that has been in use");
2092
+ this.logs = logs;
2093
+ }
2094
+ }
2095
+ exports.CloneTargetReserveAlreadyInUse = CloneTargetReserveAlreadyInUse;
2096
+ class ClonedReserveLiquidityMintMismatch extends Error {
2097
+ logs;
2098
+ static code = 6174;
2099
+ code = 6174;
2100
+ name = "ClonedReserveLiquidityMintMismatch";
2101
+ msg = "Cannot clone config between reserves of different mints";
2102
+ constructor(logs) {
2103
+ super("6174: Cannot clone config between reserves of different mints");
2104
+ this.logs = logs;
2105
+ }
2106
+ }
2107
+ exports.ClonedReserveLiquidityMintMismatch = ClonedReserveLiquidityMintMismatch;
2108
+ class ReserveEmergencyMode extends Error {
2109
+ logs;
2110
+ static code = 6175;
2111
+ code = 6175;
2112
+ name = "ReserveEmergencyMode";
2113
+ msg = "Reserve emergency mode is enabled";
2114
+ constructor(logs) {
2115
+ super("6175: Reserve emergency mode is enabled");
2116
+ this.logs = logs;
2117
+ }
2118
+ }
2119
+ exports.ReserveEmergencyMode = ReserveEmergencyMode;
2120
+ class ObligationOwnershipTransferInProgress extends Error {
2121
+ logs;
2122
+ static code = 6176;
2123
+ code = 6176;
2124
+ name = "ObligationOwnershipTransferInProgress";
2125
+ msg = "Obligation ownership transfer is in progress";
2126
+ constructor(logs) {
2127
+ super("6176: Obligation ownership transfer is in progress");
2128
+ this.logs = logs;
2129
+ }
2130
+ }
2131
+ exports.ObligationOwnershipTransferInProgress = ObligationOwnershipTransferInProgress;
2132
+ class ObligationOwnershipTransferNotInInitiatedState extends Error {
2133
+ logs;
2134
+ static code = 6177;
2135
+ code = 6177;
2136
+ name = "ObligationOwnershipTransferNotInInitiatedState";
2137
+ msg = "Obligation ownership transfer is not in initiated state";
2138
+ constructor(logs) {
2139
+ super("6177: Obligation ownership transfer is not in initiated state");
2140
+ this.logs = logs;
2141
+ }
2142
+ }
2143
+ exports.ObligationOwnershipTransferNotInInitiatedState = ObligationOwnershipTransferNotInInitiatedState;
2144
+ class ObligationPendingOwnerNotSet extends Error {
2145
+ logs;
2146
+ static code = 6178;
2147
+ code = 6178;
2148
+ name = "ObligationPendingOwnerNotSet";
2149
+ msg = "Obligation pending owner not set";
2150
+ constructor(logs) {
2151
+ super("6178: Obligation pending owner not set");
2152
+ this.logs = logs;
2153
+ }
2154
+ }
2155
+ exports.ObligationPendingOwnerNotSet = ObligationPendingOwnerNotSet;
2156
+ class ObligationInvalidPendingOwner extends Error {
2157
+ logs;
2158
+ static code = 6179;
2159
+ code = 6179;
2160
+ name = "ObligationInvalidPendingOwner";
2161
+ msg = "Invalid pending owner address";
2162
+ constructor(logs) {
2163
+ super("6179: Invalid pending owner address");
2164
+ this.logs = logs;
2165
+ }
2166
+ }
2167
+ exports.ObligationInvalidPendingOwner = ObligationInvalidPendingOwner;
2168
+ class ObligationOwnershipTransferNotApproved extends Error {
2169
+ logs;
2170
+ static code = 6180;
2171
+ code = 6180;
2172
+ name = "ObligationOwnershipTransferNotApproved";
2173
+ msg = "Obligation ownership transfer not approved by admin";
2174
+ constructor(logs) {
2175
+ super("6180: Obligation ownership transfer not approved by admin");
2176
+ this.logs = logs;
2177
+ }
2178
+ }
2179
+ exports.ObligationOwnershipTransferNotApproved = ObligationOwnershipTransferNotApproved;
2180
+ class ObligationHasActiveBorrowOrders extends Error {
2181
+ logs;
2182
+ static code = 6181;
2183
+ code = 6181;
2184
+ name = "ObligationHasActiveBorrowOrders";
2185
+ msg = "Obligation has active borrow orders";
2186
+ constructor(logs) {
2187
+ super("6181: Obligation has active borrow orders");
2188
+ this.logs = logs;
2189
+ }
2190
+ }
2191
+ exports.ObligationHasActiveBorrowOrders = ObligationHasActiveBorrowOrders;
2192
+ class OnlyComputeBudgetCompanionIxsAllowed extends Error {
2193
+ logs;
2194
+ static code = 6182;
2195
+ code = 6182;
2196
+ name = "OnlyComputeBudgetCompanionIxsAllowed";
2197
+ msg = "Only ComputeBudget instructions may accompany this instruction";
2198
+ constructor(logs) {
2199
+ super("6182: Only ComputeBudget instructions may accompany this instruction");
2200
+ this.logs = logs;
2201
+ }
2202
+ }
2203
+ exports.OnlyComputeBudgetCompanionIxsAllowed = OnlyComputeBudgetCompanionIxsAllowed;
2204
+ class MissingPermissioner extends Error {
2205
+ logs;
2206
+ static code = 6183;
2207
+ code = 6183;
2208
+ name = "MissingPermissioner";
2209
+ msg = "Required permissioning account is missing";
2210
+ constructor(logs) {
2211
+ super("6183: Required permissioning account is missing");
2212
+ this.logs = logs;
2213
+ }
2214
+ }
2215
+ exports.MissingPermissioner = MissingPermissioner;
2216
+ class ReserveRewardsDisabled extends Error {
2217
+ logs;
2218
+ static code = 6184;
2219
+ code = 6184;
2220
+ name = "ReserveRewardsDisabled";
2221
+ msg = "Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)";
2222
+ constructor(logs) {
2223
+ super("6184: Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)");
2224
+ this.logs = logs;
2225
+ }
2226
+ }
2227
+ exports.ReserveRewardsDisabled = ReserveRewardsDisabled;
2228
+ class TransactionIncludesNonceInstruction extends Error {
2229
+ logs;
2230
+ static code = 6185;
2231
+ code = 6185;
2232
+ name = "TransactionIncludesNonceInstruction";
2233
+ msg = "Transaction includes a nonce instruction, which is not allowed for admin operations";
2234
+ constructor(logs) {
2235
+ super("6185: Transaction includes a nonce instruction, which is not allowed for admin operations");
2236
+ this.logs = logs;
2237
+ }
2238
+ }
2239
+ exports.TransactionIncludesNonceInstruction = TransactionIncludesNonceInstruction;
1351
2240
  function fromCode(code, logs) {
1352
2241
  switch (code) {
1353
2242
  case 6000:
@@ -1469,7 +2358,7 @@ function fromCode(code, logs) {
1469
2358
  case 6058:
1470
2359
  return new InvalidObligationSeedsValue(logs);
1471
2360
  case 6059:
1472
- return new InvalidObligationId(logs);
2361
+ return new DeprecatedInvalidObligationId(logs);
1473
2362
  case 6060:
1474
2363
  return new InvalidBorrowRateCurvePoint(logs);
1475
2364
  case 6061:
@@ -1519,7 +2408,7 @@ function fromCode(code, logs) {
1519
2408
  case 6083:
1520
2409
  return new ElevationGroupAlreadyActivated(logs);
1521
2410
  case 6084:
1522
- return new ObligationInDeprecatedReserve(logs);
2411
+ return new ObligationInObsoleteReserve(logs);
1523
2412
  case 6085:
1524
2413
  return new ReferrerStateOwnerMismatch(logs);
1525
2414
  case 6086:
@@ -1537,7 +2426,7 @@ function fromCode(code, logs) {
1537
2426
  case 6092:
1538
2427
  return new NetValueRemainingTooSmall(logs);
1539
2428
  case 6093:
1540
- return new WorseLTVBlocked(logs);
2429
+ return new WorseLtvBlocked(logs);
1541
2430
  case 6094:
1542
2431
  return new LiabilitiesBiggerThanAssets(logs);
1543
2432
  case 6095:
@@ -1551,7 +2440,7 @@ function fromCode(code, logs) {
1551
2440
  case 6099:
1552
2441
  return new LiquidationBorrowFactorPriority(logs);
1553
2442
  case 6100:
1554
- return new LiquidationLowestLTVPriority(logs);
2443
+ return new LiquidationLowestLiquidationLtvPriority(logs);
1555
2444
  case 6101:
1556
2445
  return new ElevationGroupBorrowLimitExceeded(logs);
1557
2446
  case 6102:
@@ -1574,6 +2463,154 @@ function fromCode(code, logs) {
1574
2463
  return new DepositDisabledOutsideElevationGroup(logs);
1575
2464
  case 6111:
1576
2465
  return new CannotCalculateReferralAmountDueToSlotsMismatch(logs);
2466
+ case 6112:
2467
+ return new ObligationOwnersMustMatch(logs);
2468
+ case 6113:
2469
+ return new ObligationsMustMatch(logs);
2470
+ case 6114:
2471
+ return new LendingMarketsMustMatch(logs);
2472
+ case 6115:
2473
+ return new ObligationCurrentlyMarkedForDeleveraging(logs);
2474
+ case 6116:
2475
+ return new MaximumWithdrawValueZero(logs);
2476
+ case 6117:
2477
+ return new ZeroMaxLtvAssetsInDeposits(logs);
2478
+ case 6118:
2479
+ return new LowestLtvAssetsPriority(logs);
2480
+ case 6119:
2481
+ return new WorseLtvThanUnhealthyLtv(logs);
2482
+ case 6120:
2483
+ return new FarmAccountsMissing(logs);
2484
+ case 6121:
2485
+ return new RepayTooSmallForFullLiquidation(logs);
2486
+ case 6122:
2487
+ return new InsufficientRepayAmount(logs);
2488
+ case 6123:
2489
+ return new OrderIndexOutOfBounds(logs);
2490
+ case 6124:
2491
+ return new InvalidOrderConfiguration(logs);
2492
+ case 6125:
2493
+ return new OrderConfigurationNotSupportedByObligation(logs);
2494
+ case 6126:
2495
+ return new OperationNotPermittedWithCurrentObligationOrders(logs);
2496
+ case 6127:
2497
+ return new OperationNotPermittedMarketImmutable(logs);
2498
+ case 6128:
2499
+ return new OrderCreationDisabled(logs);
2500
+ case 6129:
2501
+ return new NoUpgradeAuthority(logs);
2502
+ case 6130:
2503
+ return new InitialAdminDepositExecuted(logs);
2504
+ case 6131:
2505
+ return new ReserveHasNotReceivedInitialDeposit(logs);
2506
+ case 6132:
2507
+ return new CTokenUsageBlocked(logs);
2508
+ case 6133:
2509
+ return new CannotUseSameReserve(logs);
2510
+ case 6134:
2511
+ return new TransactionIncludesRestrictedPrograms(logs);
2512
+ case 6135:
2513
+ return new BorrowOrderDebtLiquidityMintMismatch(logs);
2514
+ case 6136:
2515
+ return new BorrowOrderMaxBorrowRateExceeded(logs);
2516
+ case 6137:
2517
+ return new BorrowOrderMinDebtTermInsufficient(logs);
2518
+ case 6138:
2519
+ return new BorrowOrderFillTimeLimitExceeded(logs);
2520
+ case 6139:
2521
+ return new ReserveDebtMaturityReached(logs);
2522
+ case 6140:
2523
+ return new NonUpdatableOrderConfiguration(logs);
2524
+ case 6141:
2525
+ return new BorrowOrderExecutionDisabled(logs);
2526
+ case 6142:
2527
+ return new DebtReachedReserveDebtTerm(logs);
2528
+ case 6143:
2529
+ return new ExpectationNotMet(logs);
2530
+ case 6144:
2531
+ return new BorrowOrderFillValueTooSmall(logs);
2532
+ case 6145:
2533
+ return new WithdrawTicketIssuanceDisabled(logs);
2534
+ case 6146:
2535
+ return new WithdrawTicketRedemptionDisabled(logs);
2536
+ case 6147:
2537
+ return new WithdrawTicketStillValid(logs);
2538
+ case 6148:
2539
+ return new WithdrawTicketRequiresFullRedemption(logs);
2540
+ case 6149:
2541
+ return new UserTokenBalanceMismatch(logs);
2542
+ case 6150:
2543
+ return new WithdrawQueuedLiquidityValueTooSmall(logs);
2544
+ case 6151:
2545
+ return new InvalidTokenAccountState(logs);
2546
+ case 6152:
2547
+ return new WithdrawTicketInvalid(logs);
2548
+ case 6153:
2549
+ return new BorrowOrderValueTooSmall(logs);
2550
+ case 6154:
2551
+ return new WithdrawTicketValueTooSmall(logs);
2552
+ case 6155:
2553
+ return new InvalidWithdrawTicketProgressCallbackConfig(logs);
2554
+ case 6156:
2555
+ return new WithdrawTicketProgressCallbackAccountsMissing(logs);
2556
+ case 6157:
2557
+ return new BorrowRolloverConfigurationDisabled(logs);
2558
+ case 6158:
2559
+ return new InvalidObligationConfigUpdateSubject(logs);
2560
+ case 6159:
2561
+ return new BorrowRolloverLiquidityMintMismatch(logs);
2562
+ case 6160:
2563
+ return new ObligationBorrowRolloverNotApplicable(logs);
2564
+ case 6161:
2565
+ return new ObligationBorrowOutsideRolloverWindow(logs);
2566
+ case 6162:
2567
+ return new ObligationBorrowRolloverNotEnabledByOwner(logs);
2568
+ case 6163:
2569
+ return new ObligationBorrowRolloverTargetReserveMismatch(logs);
2570
+ case 6164:
2571
+ return new BorrowRolloverExecutionDisabled(logs);
2572
+ case 6165:
2573
+ return new ObligationAccountingMismatch(logs);
2574
+ case 6166:
2575
+ return new PartialRolloverValueTooSmall(logs);
2576
+ case 6167:
2577
+ return new ObligationBorrowRolloverConfigMismatch(logs);
2578
+ case 6168:
2579
+ return new ObligationBorrowRolloverMustProlongDebtTerm(logs);
2580
+ case 6169:
2581
+ return new RolloverNotSupportedInElevationGroup(logs);
2582
+ case 6170:
2583
+ return new WithdrawTicketCancellationDisabled(logs);
2584
+ case 6171:
2585
+ return new WithdrawTicketFullyCancelled(logs);
2586
+ case 6172:
2587
+ return new CloneSourceReserveDisabled(logs);
2588
+ case 6173:
2589
+ return new CloneTargetReserveAlreadyInUse(logs);
2590
+ case 6174:
2591
+ return new ClonedReserveLiquidityMintMismatch(logs);
2592
+ case 6175:
2593
+ return new ReserveEmergencyMode(logs);
2594
+ case 6176:
2595
+ return new ObligationOwnershipTransferInProgress(logs);
2596
+ case 6177:
2597
+ return new ObligationOwnershipTransferNotInInitiatedState(logs);
2598
+ case 6178:
2599
+ return new ObligationPendingOwnerNotSet(logs);
2600
+ case 6179:
2601
+ return new ObligationInvalidPendingOwner(logs);
2602
+ case 6180:
2603
+ return new ObligationOwnershipTransferNotApproved(logs);
2604
+ case 6181:
2605
+ return new ObligationHasActiveBorrowOrders(logs);
2606
+ case 6182:
2607
+ return new OnlyComputeBudgetCompanionIxsAllowed(logs);
2608
+ case 6183:
2609
+ return new MissingPermissioner(logs);
2610
+ case 6184:
2611
+ return new ReserveRewardsDisabled(logs);
2612
+ case 6185:
2613
+ return new TransactionIncludesNonceInstruction(logs);
1577
2614
  }
1578
2615
  return null;
1579
2616
  }