@kamino-finance/klend-sdk 3.2.26 → 4.0.0
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.
- package/dist/classes/action.d.ts +1 -0
- package/dist/classes/action.d.ts.map +1 -0
- package/dist/classes/action.js +1130 -1186
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/curve.d.ts +1 -0
- package/dist/classes/curve.d.ts.map +1 -0
- package/dist/classes/curve.js +1 -1
- package/dist/classes/curve.js.map +1 -1
- package/dist/classes/fraction.d.ts +1 -0
- package/dist/classes/fraction.d.ts.map +1 -0
- package/dist/classes/fraction.js +7 -6
- package/dist/classes/fraction.js.map +1 -1
- package/dist/classes/index.d.ts +1 -0
- package/dist/classes/index.d.ts.map +1 -0
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/jupiterPerps.d.ts +1 -0
- package/dist/classes/jupiterPerps.d.ts.map +1 -0
- package/dist/classes/jupiterPerps.js +7 -18
- package/dist/classes/jupiterPerps.js.map +1 -1
- package/dist/classes/manager.d.ts +1 -0
- package/dist/classes/manager.d.ts.map +1 -0
- package/dist/classes/manager.js +131 -158
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +1 -0
- package/dist/classes/market.d.ts.map +1 -0
- package/dist/classes/market.js +620 -714
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/obligation.d.ts +1 -0
- package/dist/classes/obligation.d.ts.map +1 -0
- package/dist/classes/obligation.js +60 -62
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/reserve.d.ts +1 -0
- package/dist/classes/reserve.d.ts.map +1 -0
- package/dist/classes/reserve.js +120 -129
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/shared.d.ts +1 -0
- package/dist/classes/shared.d.ts.map +1 -0
- package/dist/classes/shared.js.map +1 -1
- package/dist/classes/utils.d.ts +1 -0
- package/dist/classes/utils.d.ts.map +1 -0
- package/dist/classes/utils.js +3 -3
- package/dist/classes/utils.js.map +1 -1
- package/dist/classes/vault.d.ts +1 -0
- package/dist/classes/vault.d.ts.map +1 -0
- package/dist/classes/vault.js +334 -354
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.d.ts +1 -0
- package/dist/client_kamino_manager.d.ts.map +1 -0
- package/dist/client_kamino_manager.js +323 -326
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +1 -0
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/LendingMarket.js +89 -55
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.d.ts +1 -0
- package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/Obligation.js +87 -56
- package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
- package/dist/idl_codegen/accounts/ReferrerState.d.ts +1 -0
- package/dist/idl_codegen/accounts/ReferrerState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerState.js +22 -33
- package/dist/idl_codegen/accounts/ReferrerState.js.map +1 -1
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts +1 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ReferrerTokenState.js +35 -37
- package/dist/idl_codegen/accounts/ReferrerTokenState.js.map +1 -1
- package/dist/idl_codegen/accounts/Reserve.d.ts +1 -0
- package/dist/idl_codegen/accounts/Reserve.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/Reserve.js +60 -49
- package/dist/idl_codegen/accounts/Reserve.js.map +1 -1
- package/dist/idl_codegen/accounts/ShortUrl.d.ts +1 -0
- package/dist/idl_codegen/accounts/ShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/ShortUrl.js +22 -33
- package/dist/idl_codegen/accounts/ShortUrl.js.map +1 -1
- package/dist/idl_codegen/accounts/UserMetadata.d.ts +1 -0
- package/dist/idl_codegen/accounts/UserMetadata.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/UserMetadata.js +34 -37
- package/dist/idl_codegen/accounts/UserMetadata.js.map +1 -1
- package/dist/idl_codegen/accounts/UserState.d.ts +1 -0
- package/dist/idl_codegen/accounts/UserState.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/UserState.js +77 -48
- package/dist/idl_codegen/accounts/UserState.js.map +1 -1
- package/dist/idl_codegen/accounts/index.d.ts +1 -0
- package/dist/idl_codegen/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen/accounts/index.js.map +1 -1
- package/dist/idl_codegen/errors/anchor.d.ts +1 -0
- package/dist/idl_codegen/errors/anchor.d.ts.map +1 -0
- package/dist/idl_codegen/errors/anchor.js +270 -216
- package/dist/idl_codegen/errors/anchor.js.map +1 -1
- package/dist/idl_codegen/errors/custom.d.ts +1 -0
- package/dist/idl_codegen/errors/custom.d.ts.map +1 -0
- package/dist/idl_codegen/errors/custom.js +560 -448
- package/dist/idl_codegen/errors/custom.js.map +1 -1
- package/dist/idl_codegen/errors/index.d.ts +1 -0
- package/dist/idl_codegen/errors/index.d.ts.map +1 -0
- package/dist/idl_codegen/errors/index.js.map +1 -1
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.js.map +1 -1
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts +1 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js.map +1 -1
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts +1 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts +1 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts +1 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/idlMissingTypes.js.map +1 -1
- package/dist/idl_codegen/instructions/index.d.ts +1 -0
- package/dist/idl_codegen/instructions/index.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/index.js.map +1 -1
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts +1 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initFarmsForReserve.js.map +1 -1
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts +1 -0
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initLendingMarket.js.map +1 -1
- package/dist/idl_codegen/instructions/initObligation.d.ts +1 -0
- package/dist/idl_codegen/instructions/initObligation.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initObligation.js.map +1 -1
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts +1 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js.map +1 -1
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts +1 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js.map +1 -1
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts +1 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReferrerTokenState.js.map +1 -1
- package/dist/idl_codegen/instructions/initReserve.d.ts +1 -0
- package/dist/idl_codegen/instructions/initReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initReserve.js.map +1 -1
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts +1 -0
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/initUserMetadata.js.map +1 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/redeemFees.d.ts +1 -0
- package/dist/idl_codegen/instructions/redeemFees.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/redeemFees.js.map +1 -1
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/redeemReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/refreshObligation.d.ts +1 -0
- package/dist/idl_codegen/instructions/refreshObligation.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligation.js.map +1 -1
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts +1 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js.map +1 -1
- package/dist/idl_codegen/instructions/refreshReserve.d.ts +1 -0
- package/dist/idl_codegen/instructions/refreshReserve.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshReserve.js.map +1 -1
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts +1 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/refreshReservesBatch.js.map +1 -1
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/repayObligationLiquidity.js.map +1 -1
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts +1 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/requestElevationGroup.js.map +1 -1
- package/dist/idl_codegen/instructions/socializeLoss.d.ts +1 -0
- package/dist/idl_codegen/instructions/socializeLoss.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/socializeLoss.js.map +1 -1
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts +1 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.js.map +1 -1
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarket.js.map +1 -1
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.js.map +1 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +1 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateReserveConfig.js.map +1 -1
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts +1 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts +1 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts +1 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts.map +1 -0
- package/dist/idl_codegen/instructions/withdrawReferrerFees.js.map +1 -1
- package/dist/idl_codegen/programId.d.ts +1 -0
- package/dist/idl_codegen/programId.d.ts.map +1 -0
- package/dist/idl_codegen/programId.js.map +1 -1
- package/dist/idl_codegen/types/AssetTier.d.ts +1 -0
- package/dist/idl_codegen/types/AssetTier.d.ts.map +1 -0
- package/dist/idl_codegen/types/AssetTier.js +12 -18
- package/dist/idl_codegen/types/AssetTier.js.map +1 -1
- package/dist/idl_codegen/types/BigFractionBytes.d.ts +1 -0
- package/dist/idl_codegen/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/idl_codegen/types/BigFractionBytes.js +2 -0
- package/dist/idl_codegen/types/BigFractionBytes.js.map +1 -1
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts +1 -0
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/idl_codegen/types/BorrowRateCurve.js +2 -1
- package/dist/idl_codegen/types/BorrowRateCurve.js.map +1 -1
- package/dist/idl_codegen/types/CurvePoint.d.ts +1 -0
- package/dist/idl_codegen/types/CurvePoint.d.ts.map +1 -0
- package/dist/idl_codegen/types/CurvePoint.js +2 -0
- package/dist/idl_codegen/types/CurvePoint.js.map +1 -1
- package/dist/idl_codegen/types/ElevationGroup.d.ts +1 -0
- package/dist/idl_codegen/types/ElevationGroup.d.ts.map +1 -0
- package/dist/idl_codegen/types/ElevationGroup.js +10 -0
- package/dist/idl_codegen/types/ElevationGroup.js.map +1 -1
- package/dist/idl_codegen/types/FeeCalculation.d.ts +1 -0
- package/dist/idl_codegen/types/FeeCalculation.d.ts.map +1 -0
- package/dist/idl_codegen/types/FeeCalculation.js +8 -12
- package/dist/idl_codegen/types/FeeCalculation.js.map +1 -1
- package/dist/idl_codegen/types/InitObligationArgs.d.ts +1 -0
- package/dist/idl_codegen/types/InitObligationArgs.d.ts.map +1 -0
- package/dist/idl_codegen/types/InitObligationArgs.js +2 -0
- package/dist/idl_codegen/types/InitObligationArgs.js.map +1 -1
- package/dist/idl_codegen/types/LastUpdate.d.ts +1 -0
- package/dist/idl_codegen/types/LastUpdate.d.ts.map +1 -0
- package/dist/idl_codegen/types/LastUpdate.js +7 -0
- package/dist/idl_codegen/types/LastUpdate.js.map +1 -1
- package/dist/idl_codegen/types/ObligationCollateral.d.ts +1 -0
- package/dist/idl_codegen/types/ObligationCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/types/ObligationCollateral.js +14 -0
- package/dist/idl_codegen/types/ObligationCollateral.js.map +1 -1
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts +1 -0
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/types/ObligationLiquidity.js +17 -1
- package/dist/idl_codegen/types/ObligationLiquidity.js.map +1 -1
- package/dist/idl_codegen/types/PriceHeuristic.d.ts +1 -0
- package/dist/idl_codegen/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/idl_codegen/types/PriceHeuristic.js +6 -0
- package/dist/idl_codegen/types/PriceHeuristic.js.map +1 -1
- package/dist/idl_codegen/types/PythConfiguration.d.ts +1 -0
- package/dist/idl_codegen/types/PythConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/PythConfiguration.js +2 -0
- package/dist/idl_codegen/types/PythConfiguration.js.map +1 -1
- package/dist/idl_codegen/types/ReserveCollateral.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveCollateral.js +8 -0
- package/dist/idl_codegen/types/ReserveCollateral.js.map +1 -1
- package/dist/idl_codegen/types/ReserveConfig.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveConfig.js +78 -5
- package/dist/idl_codegen/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen/types/ReserveFarmKind.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveFarmKind.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveFarmKind.js +8 -12
- package/dist/idl_codegen/types/ReserveFarmKind.js.map +1 -1
- package/dist/idl_codegen/types/ReserveFees.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveFees.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveFees.js +16 -0
- package/dist/idl_codegen/types/ReserveFees.js.map +1 -1
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveLiquidity.js +43 -1
- package/dist/idl_codegen/types/ReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen/types/ReserveStatus.d.ts +1 -0
- package/dist/idl_codegen/types/ReserveStatus.d.ts.map +1 -0
- package/dist/idl_codegen/types/ReserveStatus.js +12 -18
- package/dist/idl_codegen/types/ReserveStatus.js.map +1 -1
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts +1 -0
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/ScopeConfiguration.js +6 -0
- package/dist/idl_codegen/types/ScopeConfiguration.js.map +1 -1
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts +1 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.js +3 -0
- package/dist/idl_codegen/types/SwitchboardConfiguration.js.map +1 -1
- package/dist/idl_codegen/types/TokenInfo.d.ts +1 -0
- package/dist/idl_codegen/types/TokenInfo.d.ts.map +1 -0
- package/dist/idl_codegen/types/TokenInfo.js +27 -4
- package/dist/idl_codegen/types/TokenInfo.js.map +1 -1
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts +1 -0
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateConfigMode.js +188 -282
- package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +41 -33
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js +72 -108
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts +1 -0
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/idl_codegen/types/WithdrawalCaps.js +4 -0
- package/dist/idl_codegen/types/WithdrawalCaps.js.map +1 -1
- package/dist/idl_codegen/types/index.d.ts +1 -0
- package/dist/idl_codegen/types/index.d.ts.map +1 -0
- package/dist/idl_codegen/types/index.js.map +1 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +1 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts.map +1 -0
- package/dist/idl_codegen/zero_padding/ObligationZP.js +83 -54
- package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -1
- package/dist/idl_codegen/zero_padding/index.d.ts +1 -0
- package/dist/idl_codegen/zero_padding/index.d.ts.map +1 -0
- package/dist/idl_codegen/zero_padding/index.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js +39 -42
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/accounts/index.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/programId.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/programId.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/programId.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.js +9 -0
- package/dist/idl_codegen_jupiter_perps/types/Fees.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.js +3 -0
- package/dist/idl_codegen_jupiter_perps/types/Limit.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js +3 -0
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js.map +1 -1
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts +1 -0
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts.map +1 -0
- package/dist/idl_codegen_jupiter_perps/types/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +58 -47
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +51 -47
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/anchor.js +270 -216
- package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/custom.js +120 -96
- package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/programId.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/programId.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js +2 -0
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js +2 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js +2 -0
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js +7 -0
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js +6 -0
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +2 -0
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +8 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js +77 -5
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js +16 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +41 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +6 -0
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +3 -0
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js +27 -4
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +8 -0
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js +4 -0
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/index.d.ts +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lending_operations/index.d.ts +1 -0
- package/dist/lending_operations/index.d.ts.map +1 -0
- package/dist/lending_operations/index.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts +1 -0
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts.map +1 -0
- package/dist/lending_operations/repay_with_collateral_calcs.js +1 -1
- package/dist/lending_operations/repay_with_collateral_calcs.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.d.ts +1 -0
- package/dist/lending_operations/repay_with_collateral_operations.d.ts.map +1 -0
- package/dist/lending_operations/repay_with_collateral_operations.js +15 -24
- package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -1
- package/dist/leverage/calcs.d.ts +1 -0
- package/dist/leverage/calcs.d.ts.map +1 -0
- package/dist/leverage/calcs.js +119 -132
- package/dist/leverage/calcs.js.map +1 -1
- package/dist/leverage/index.d.ts +1 -0
- package/dist/leverage/index.d.ts.map +1 -0
- package/dist/leverage/index.js.map +1 -1
- package/dist/leverage/instructions.d.ts +1 -0
- package/dist/leverage/instructions.d.ts.map +1 -0
- package/dist/leverage/instructions.js.map +1 -1
- package/dist/leverage/operations.d.ts +1 -0
- package/dist/leverage/operations.d.ts.map +1 -0
- package/dist/leverage/operations.js +75 -84
- package/dist/leverage/operations.js.map +1 -1
- package/dist/leverage/utils.d.ts +1 -0
- package/dist/leverage/utils.d.ts.map +1 -0
- package/dist/leverage/utils.js +73 -88
- package/dist/leverage/utils.js.map +1 -1
- package/dist/lib.d.ts +1 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js.map +1 -1
- package/dist/referrals/index.d.ts +1 -0
- package/dist/referrals/index.d.ts.map +1 -0
- package/dist/referrals/index.js.map +1 -1
- package/dist/referrals/instructions.d.ts +1 -0
- package/dist/referrals/instructions.d.ts.map +1 -0
- package/dist/referrals/instructions.js +8 -17
- package/dist/referrals/instructions.js.map +1 -1
- package/dist/referrals/operations.d.ts +2 -1
- package/dist/referrals/operations.d.ts.map +1 -0
- package/dist/referrals/operations.js +119 -143
- package/dist/referrals/operations.js.map +1 -1
- package/dist/utils/ObligationType.d.ts +1 -0
- package/dist/utils/ObligationType.d.ts.map +1 -0
- package/dist/utils/ObligationType.js +16 -7
- package/dist/utils/ObligationType.js.map +1 -1
- package/dist/utils/api.d.ts +1 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/api.js +10 -21
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/ata.d.ts +1 -0
- package/dist/utils/ata.d.ts.map +1 -0
- package/dist/utils/ata.js +25 -38
- package/dist/utils/ata.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/idl.d.ts +1 -0
- package/dist/utils/idl.d.ts.map +1 -0
- package/dist/utils/idl.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/instruction.d.ts +1 -0
- package/dist/utils/instruction.d.ts.map +1 -0
- package/dist/utils/instruction.js +116 -143
- package/dist/utils/instruction.js.map +1 -1
- package/dist/utils/kamino.d.ts +1 -0
- package/dist/utils/kamino.d.ts.map +1 -0
- package/dist/utils/kamino.js +4 -15
- package/dist/utils/kamino.js.map +1 -1
- package/dist/utils/layout.d.ts +1 -0
- package/dist/utils/layout.d.ts.map +1 -0
- package/dist/utils/layout.js.map +1 -1
- package/dist/utils/lookupTable.d.ts +1 -0
- package/dist/utils/lookupTable.d.ts.map +1 -0
- package/dist/utils/lookupTable.js +14 -27
- package/dist/utils/lookupTable.js.map +1 -1
- package/dist/utils/managerTypes.d.ts +1 -0
- package/dist/utils/managerTypes.d.ts.map +1 -0
- package/dist/utils/managerTypes.js +31 -2
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/oracle.d.ts +1 -0
- package/dist/utils/oracle.d.ts.map +1 -0
- package/dist/utils/oracle.js +70 -83
- package/dist/utils/oracle.js.map +1 -1
- package/dist/utils/pubkey.d.ts +1 -0
- package/dist/utils/pubkey.d.ts.map +1 -0
- package/dist/utils/pubkey.js +7 -9
- package/dist/utils/pubkey.js.map +1 -1
- package/dist/utils/rpc.d.ts +1 -0
- package/dist/utils/rpc.d.ts.map +1 -0
- package/dist/utils/rpc.js +48 -70
- package/dist/utils/rpc.js.map +1 -1
- package/dist/utils/seeds.d.ts +1 -0
- package/dist/utils/seeds.d.ts.map +1 -0
- package/dist/utils/seeds.js.map +1 -1
- package/dist/utils/sendTransactionsUtils.d.ts +1 -0
- package/dist/utils/sendTransactionsUtils.d.ts.map +1 -0
- package/dist/utils/sendTransactionsUtils.js +82 -82
- package/dist/utils/sendTransactionsUtils.js.map +1 -1
- package/dist/utils/slots.d.ts +1 -0
- package/dist/utils/slots.d.ts.map +1 -0
- package/dist/utils/slots.js.map +1 -1
- package/dist/utils/syncNative.d.ts +1 -0
- package/dist/utils/syncNative.d.ts.map +1 -0
- package/dist/utils/syncNative.js.map +1 -1
- package/dist/utils/userMetadata.d.ts +1 -0
- package/dist/utils/userMetadata.d.ts.map +1 -0
- package/dist/utils/userMetadata.js +40 -52
- package/dist/utils/userMetadata.js.map +1 -1
- package/package.json +9 -3
- package/src/classes/action.ts +2884 -0
- package/src/classes/curve.ts +29 -0
- package/src/classes/fraction.ts +65 -0
- package/src/classes/index.ts +10 -0
- package/src/classes/jupiterPerps.ts +14 -0
- package/src/classes/manager.ts +746 -0
- package/src/classes/market.ts +1459 -0
- package/src/classes/obligation.ts +1315 -0
- package/src/classes/reserve.ts +1980 -0
- package/src/classes/shared.ts +57 -0
- package/src/classes/utils.ts +192 -0
- package/src/classes/vault.ts +808 -0
- package/src/client.ts +446 -0
- package/src/client_kamino_manager.ts +791 -0
- package/src/global.d.ts +1 -0
- package/src/idl_codegen/accounts/LendingMarket.ts +364 -0
- package/src/idl_codegen/accounts/Obligation.ts +349 -0
- package/src/idl_codegen/accounts/ReferrerState.ts +97 -0
- package/src/idl_codegen/accounts/ReferrerTokenState.ts +145 -0
- package/src/idl_codegen/accounts/Reserve.ts +248 -0
- package/src/idl_codegen/accounts/ShortUrl.ts +97 -0
- package/src/idl_codegen/accounts/UserMetadata.ts +142 -0
- package/src/idl_codegen/accounts/UserState.ts +301 -0
- package/src/idl_codegen/accounts/index.ts +19 -0
- package/src/idl_codegen/errors/anchor.ts +773 -0
- package/src/idl_codegen/errors/custom.ts +1633 -0
- package/src/idl_codegen/errors/index.ts +62 -0
- package/src/idl_codegen/instructions/borrowObligationLiquidity.ts +82 -0
- package/src/idl_codegen/instructions/deleteReferrerStateAndShortUrl.ts +30 -0
- package/src/idl_codegen/instructions/depositObligationCollateral.ts +62 -0
- package/src/idl_codegen/instructions/depositReserveLiquidity.ts +90 -0
- package/src/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.ts +98 -0
- package/src/idl_codegen/instructions/flashBorrowReserveLiquidity.ts +82 -0
- package/src/idl_codegen/instructions/flashRepayReserveLiquidity.ts +83 -0
- package/src/idl_codegen/instructions/idlMissingTypes.ts +62 -0
- package/src/idl_codegen/instructions/index.ts +138 -0
- package/src/idl_codegen/instructions/initFarmsForReserve.ts +62 -0
- package/src/idl_codegen/instructions/initLendingMarket.ts +50 -0
- package/src/idl_codegen/instructions/initObligation.ts +52 -0
- package/src/idl_codegen/instructions/initObligationFarmsForReserve.ts +60 -0
- package/src/idl_codegen/instructions/initReferrerStateAndShortUrl.ts +50 -0
- package/src/idl_codegen/instructions/initReferrerTokenState.ts +46 -0
- package/src/idl_codegen/instructions/initReserve.ts +74 -0
- package/src/idl_codegen/instructions/initUserMetadata.ts +50 -0
- package/src/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.ts +139 -0
- package/src/idl_codegen/instructions/redeemFees.ts +50 -0
- package/src/idl_codegen/instructions/redeemReserveCollateral.ts +94 -0
- package/src/idl_codegen/instructions/refreshObligation.ts +24 -0
- package/src/idl_codegen/instructions/refreshObligationFarmsForReserve.ts +62 -0
- package/src/idl_codegen/instructions/refreshReserve.ts +40 -0
- package/src/idl_codegen/instructions/refreshReservesBatch.ts +29 -0
- package/src/idl_codegen/instructions/repayObligationLiquidity.ts +64 -0
- package/src/idl_codegen/instructions/requestElevationGroup.ts +40 -0
- package/src/idl_codegen/instructions/socializeLoss.ts +48 -0
- package/src/idl_codegen/instructions/updateEntireReserveConfig.ts +45 -0
- package/src/idl_codegen/instructions/updateLendingMarket.ts +43 -0
- package/src/idl_codegen/instructions/updateLendingMarketOwner.ts +28 -0
- package/src/idl_codegen/instructions/updateReserveConfig.ts +52 -0
- package/src/idl_codegen/instructions/updateSingleReserveConfig.ts +48 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateral.ts +68 -0
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +102 -0
- package/src/idl_codegen/instructions/withdrawProtocolFee.ts +62 -0
- package/src/idl_codegen/instructions/withdrawReferrerFees.ts +54 -0
- package/src/idl_codegen/programId.ts +13 -0
- package/src/idl_codegen/types/AssetTier.ts +118 -0
- package/src/idl_codegen/types/BigFractionBytes.ts +67 -0
- package/src/idl_codegen/types/BorrowRateCurve.ts +60 -0
- package/src/idl_codegen/types/CurvePoint.ts +64 -0
- package/src/idl_codegen/types/ElevationGroup.ts +133 -0
- package/src/idl_codegen/types/FeeCalculation.ts +90 -0
- package/src/idl_codegen/types/InitObligationArgs.ts +61 -0
- package/src/idl_codegen/types/LastUpdate.ts +95 -0
- package/src/idl_codegen/types/ObligationCollateral.ts +128 -0
- package/src/idl_codegen/types/ObligationLiquidity.ts +159 -0
- package/src/idl_codegen/types/PriceHeuristic.ts +81 -0
- package/src/idl_codegen/types/PythConfiguration.ts +56 -0
- package/src/idl_codegen/types/ReserveCollateral.ts +104 -0
- package/src/idl_codegen/types/ReserveConfig.ts +467 -0
- package/src/idl_codegen/types/ReserveFarmKind.ts +90 -0
- package/src/idl_codegen/types/ReserveFees.ts +122 -0
- package/src/idl_codegen/types/ReserveLiquidity.ts +286 -0
- package/src/idl_codegen/types/ReserveStatus.ts +120 -0
- package/src/idl_codegen/types/ScopeConfiguration.ts +85 -0
- package/src/idl_codegen/types/SwitchboardConfiguration.ts +67 -0
- package/src/idl_codegen/types/TokenInfo.ts +190 -0
- package/src/idl_codegen/types/UpdateConfigMode.ts +1440 -0
- package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +376 -0
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +570 -0
- package/src/idl_codegen/types/WithdrawalCaps.ts +86 -0
- package/src/idl_codegen/types/index.ts +276 -0
- package/src/idl_codegen/zero_padding/ObligationZP.ts +186 -0
- package/src/idl_codegen/zero_padding/index.ts +1 -0
- package/src/idl_codegen_jupiter_perps/accounts/Pool.ts +155 -0
- package/src/idl_codegen_jupiter_perps/accounts/index.ts +2 -0
- package/src/idl_codegen_jupiter_perps/programId.ts +7 -0
- package/src/idl_codegen_jupiter_perps/types/Fees.ts +130 -0
- package/src/idl_codegen_jupiter_perps/types/Limit.ts +72 -0
- package/src/idl_codegen_jupiter_perps/types/PoolApr.ts +69 -0
- package/src/idl_codegen_jupiter_perps/types/index.ts +6 -0
- package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +221 -0
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +214 -0
- package/src/idl_codegen_kamino_vault/accounts/index.ts +4 -0
- package/src/idl_codegen_kamino_vault/errors/anchor.ts +764 -0
- package/src/idl_codegen_kamino_vault/errors/custom.ts +344 -0
- package/src/idl_codegen_kamino_vault/errors/index.ts +49 -0
- package/src/idl_codegen_kamino_vault/instructions/deposit.ts +54 -0
- package/src/idl_codegen_kamino_vault/instructions/index.ts +10 -0
- package/src/idl_codegen_kamino_vault/instructions/initVault.ts +35 -0
- package/src/idl_codegen_kamino_vault/instructions/invest.ts +60 -0
- package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +58 -0
- package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +81 -0
- package/src/idl_codegen_kamino_vault/programId.ts +7 -0
- package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +61 -0
- package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +55 -0
- package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +61 -0
- package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +90 -0
- package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +78 -0
- package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +56 -0
- package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +104 -0
- package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +426 -0
- package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +118 -0
- package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +268 -0
- package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +85 -0
- package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +64 -0
- package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +172 -0
- package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +115 -0
- package/src/idl_codegen_kamino_vault/types/WithdrawalCaps.ts +86 -0
- package/src/idl_codegen_kamino_vault/types/index.ts +30 -0
- package/src/index.ts +1 -0
- package/src/lending_operations/index.ts +2 -0
- package/src/lending_operations/repay_with_collateral_calcs.ts +71 -0
- package/src/lending_operations/repay_with_collateral_operations.ts +318 -0
- package/src/leverage/calcs.ts +465 -0
- package/src/leverage/index.ts +4 -0
- package/src/leverage/instructions.ts +144 -0
- package/src/leverage/operations.ts +1814 -0
- package/src/leverage/utils.ts +273 -0
- package/src/lib.ts +9 -0
- package/src/referrals/index.ts +2 -0
- package/src/referrals/instructions.ts +114 -0
- package/src/referrals/operations.ts +325 -0
- package/src/utils/ObligationType.ts +171 -0
- package/src/utils/api.ts +59 -0
- package/src/utils/ata.ts +195 -0
- package/src/utils/constants.ts +81 -0
- package/src/utils/idl.ts +4 -0
- package/src/utils/index.ts +16 -0
- package/src/utils/instruction.ts +258 -0
- package/src/utils/kamino.ts +12 -0
- package/src/utils/layout.ts +118 -0
- package/src/utils/lookupTable.ts +55 -0
- package/src/utils/managerTypes.ts +456 -0
- package/src/utils/oracle.ts +338 -0
- package/src/utils/pubkey.ts +261 -0
- package/src/utils/rpc.ts +108 -0
- package/src/utils/seeds.ts +183 -0
- package/src/utils/sendTransactionsUtils.ts +207 -0
- package/src/utils/slots.ts +28 -0
- package/src/utils/syncNative.ts +22 -0
- package/src/utils/userMetadata.ts +401 -0
|
@@ -0,0 +1,1633 @@
|
|
|
1
|
+
export type CustomError =
|
|
2
|
+
| InvalidMarketAuthority
|
|
3
|
+
| InvalidMarketOwner
|
|
4
|
+
| InvalidAccountOwner
|
|
5
|
+
| InvalidAmount
|
|
6
|
+
| InvalidConfig
|
|
7
|
+
| InvalidSigner
|
|
8
|
+
| InvalidAccountInput
|
|
9
|
+
| MathOverflow
|
|
10
|
+
| InsufficientLiquidity
|
|
11
|
+
| ReserveStale
|
|
12
|
+
| WithdrawTooSmall
|
|
13
|
+
| WithdrawTooLarge
|
|
14
|
+
| BorrowTooSmall
|
|
15
|
+
| BorrowTooLarge
|
|
16
|
+
| RepayTooSmall
|
|
17
|
+
| LiquidationTooSmall
|
|
18
|
+
| ObligationHealthy
|
|
19
|
+
| ObligationStale
|
|
20
|
+
| ObligationReserveLimit
|
|
21
|
+
| InvalidObligationOwner
|
|
22
|
+
| ObligationDepositsEmpty
|
|
23
|
+
| ObligationBorrowsEmpty
|
|
24
|
+
| ObligationDepositsZero
|
|
25
|
+
| ObligationBorrowsZero
|
|
26
|
+
| InvalidObligationCollateral
|
|
27
|
+
| InvalidObligationLiquidity
|
|
28
|
+
| ObligationCollateralEmpty
|
|
29
|
+
| ObligationLiquidityEmpty
|
|
30
|
+
| NegativeInterestRate
|
|
31
|
+
| InvalidOracleConfig
|
|
32
|
+
| InsufficientProtocolFeesToRedeem
|
|
33
|
+
| FlashBorrowCpi
|
|
34
|
+
| NoFlashRepayFound
|
|
35
|
+
| InvalidFlashRepay
|
|
36
|
+
| FlashRepayCpi
|
|
37
|
+
| MultipleFlashBorrows
|
|
38
|
+
| FlashLoansDisabled
|
|
39
|
+
| SwitchboardV2Error
|
|
40
|
+
| CouldNotDeserializeScope
|
|
41
|
+
| PriceTooOld
|
|
42
|
+
| PriceTooDivergentFromTwap
|
|
43
|
+
| InvalidTwapPrice
|
|
44
|
+
| GlobalEmergencyMode
|
|
45
|
+
| InvalidFlag
|
|
46
|
+
| PriceNotValid
|
|
47
|
+
| PriceIsBiggerThanHeuristic
|
|
48
|
+
| PriceIsLowerThanHeuristic
|
|
49
|
+
| PriceIsZero
|
|
50
|
+
| PriceConfidenceTooWide
|
|
51
|
+
| IntegerOverflow
|
|
52
|
+
| NoFarmForReserve
|
|
53
|
+
| IncorrectInstructionInPosition
|
|
54
|
+
| NoPriceFound
|
|
55
|
+
| InvalidTwapConfig
|
|
56
|
+
| InvalidPythPriceAccount
|
|
57
|
+
| InvalidSwitchboardAccount
|
|
58
|
+
| InvalidScopePriceAccount
|
|
59
|
+
| ObligationCollateralLtvZero
|
|
60
|
+
| InvalidObligationSeedsValue
|
|
61
|
+
| InvalidObligationId
|
|
62
|
+
| InvalidBorrowRateCurvePoint
|
|
63
|
+
| InvalidUtilizationRate
|
|
64
|
+
| CannotSocializeObligationWithCollateral
|
|
65
|
+
| ObligationEmpty
|
|
66
|
+
| WithdrawalCapReached
|
|
67
|
+
| LastTimestampGreaterThanCurrent
|
|
68
|
+
| LiquidationRewardTooSmall
|
|
69
|
+
| IsolatedAssetTierViolation
|
|
70
|
+
| InconsistentElevationGroup
|
|
71
|
+
| InvalidElevationGroup
|
|
72
|
+
| InvalidElevationGroupConfig
|
|
73
|
+
| UnhealthyElevationGroupLtv
|
|
74
|
+
| ElevationGroupNewLoansDisabled
|
|
75
|
+
| ReserveDeprecated
|
|
76
|
+
| ReferrerAccountNotInitialized
|
|
77
|
+
| ReferrerAccountMintMissmatch
|
|
78
|
+
| ReferrerAccountWrongAddress
|
|
79
|
+
| ReferrerAccountReferrerMissmatch
|
|
80
|
+
| ReferrerAccountMissing
|
|
81
|
+
| InsufficientReferralFeesToRedeem
|
|
82
|
+
| CpiDisabled
|
|
83
|
+
| ShortUrlNotAsciiAlphanumeric
|
|
84
|
+
| ReserveObsolete
|
|
85
|
+
| ElevationGroupAlreadyActivated
|
|
86
|
+
| ObligationInDeprecatedReserve
|
|
87
|
+
| ReferrerStateOwnerMismatch
|
|
88
|
+
| UserMetadataOwnerAlreadySet
|
|
89
|
+
| CollateralNonLiquidatable
|
|
90
|
+
| BorrowingDisabled
|
|
91
|
+
| BorrowLimitExceeded
|
|
92
|
+
| DepositLimitExceeded
|
|
93
|
+
| BorrowingDisabledOutsideElevationGroup
|
|
94
|
+
| NetValueRemainingTooSmall
|
|
95
|
+
| WorseLTVBlocked
|
|
96
|
+
| LiabilitiesBiggerThanAssets
|
|
97
|
+
| ReserveTokenBalanceMismatch
|
|
98
|
+
| ReserveVaultBalanceMismatch
|
|
99
|
+
| ReserveAccountingMismatch
|
|
100
|
+
| BorrowingAboveUtilizationRateDisabled
|
|
101
|
+
| LiquidationBorrowFactorPriority
|
|
102
|
+
| LiquidationLowestLTVPriority
|
|
103
|
+
| ElevationGroupBorrowLimitExceeded
|
|
104
|
+
| ElevationGroupWithoutDebtReserve
|
|
105
|
+
| ElevationGroupMaxCollateralReserveZero
|
|
106
|
+
| ElevationGroupHasAnotherDebtReserve
|
|
107
|
+
| ElevationGroupDebtReserveAsCollateral
|
|
108
|
+
| ObligationCollateralExceedsElevationGroupLimit
|
|
109
|
+
| ObligationElevationGroupMultipleDebtReserve
|
|
110
|
+
| UnsupportedTokenExtension
|
|
111
|
+
| InvalidTokenAccount
|
|
112
|
+
| DepositDisabledOutsideElevationGroup
|
|
113
|
+
| CannotCalculateReferralAmountDueToSlotsMismatch
|
|
114
|
+
|
|
115
|
+
export class InvalidMarketAuthority extends Error {
|
|
116
|
+
static readonly code = 6000
|
|
117
|
+
readonly code = 6000
|
|
118
|
+
readonly name = "InvalidMarketAuthority"
|
|
119
|
+
readonly msg = "Market authority is invalid"
|
|
120
|
+
|
|
121
|
+
constructor(readonly logs?: string[]) {
|
|
122
|
+
super("6000: Market authority is invalid")
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export class InvalidMarketOwner extends Error {
|
|
127
|
+
static readonly code = 6001
|
|
128
|
+
readonly code = 6001
|
|
129
|
+
readonly name = "InvalidMarketOwner"
|
|
130
|
+
readonly msg = "Market owner is invalid"
|
|
131
|
+
|
|
132
|
+
constructor(readonly logs?: string[]) {
|
|
133
|
+
super("6001: Market owner is invalid")
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export class InvalidAccountOwner extends Error {
|
|
138
|
+
static readonly code = 6002
|
|
139
|
+
readonly code = 6002
|
|
140
|
+
readonly name = "InvalidAccountOwner"
|
|
141
|
+
readonly msg = "Input account owner is not the program address"
|
|
142
|
+
|
|
143
|
+
constructor(readonly logs?: string[]) {
|
|
144
|
+
super("6002: Input account owner is not the program address")
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export class InvalidAmount extends Error {
|
|
149
|
+
static readonly code = 6003
|
|
150
|
+
readonly code = 6003
|
|
151
|
+
readonly name = "InvalidAmount"
|
|
152
|
+
readonly msg = "Input amount is invalid"
|
|
153
|
+
|
|
154
|
+
constructor(readonly logs?: string[]) {
|
|
155
|
+
super("6003: Input amount is invalid")
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export class InvalidConfig extends Error {
|
|
160
|
+
static readonly code = 6004
|
|
161
|
+
readonly code = 6004
|
|
162
|
+
readonly name = "InvalidConfig"
|
|
163
|
+
readonly msg = "Input config value is invalid"
|
|
164
|
+
|
|
165
|
+
constructor(readonly logs?: string[]) {
|
|
166
|
+
super("6004: Input config value is invalid")
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export class InvalidSigner extends Error {
|
|
171
|
+
static readonly code = 6005
|
|
172
|
+
readonly code = 6005
|
|
173
|
+
readonly name = "InvalidSigner"
|
|
174
|
+
readonly msg = "Input account must be a signer"
|
|
175
|
+
|
|
176
|
+
constructor(readonly logs?: string[]) {
|
|
177
|
+
super("6005: Input account must be a signer")
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export class InvalidAccountInput extends Error {
|
|
182
|
+
static readonly code = 6006
|
|
183
|
+
readonly code = 6006
|
|
184
|
+
readonly name = "InvalidAccountInput"
|
|
185
|
+
readonly msg = "Invalid account input"
|
|
186
|
+
|
|
187
|
+
constructor(readonly logs?: string[]) {
|
|
188
|
+
super("6006: Invalid account input")
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export class MathOverflow extends Error {
|
|
193
|
+
static readonly code = 6007
|
|
194
|
+
readonly code = 6007
|
|
195
|
+
readonly name = "MathOverflow"
|
|
196
|
+
readonly msg = "Math operation overflow"
|
|
197
|
+
|
|
198
|
+
constructor(readonly logs?: string[]) {
|
|
199
|
+
super("6007: Math operation overflow")
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export class InsufficientLiquidity extends Error {
|
|
204
|
+
static readonly code = 6008
|
|
205
|
+
readonly code = 6008
|
|
206
|
+
readonly name = "InsufficientLiquidity"
|
|
207
|
+
readonly msg = "Insufficient liquidity available"
|
|
208
|
+
|
|
209
|
+
constructor(readonly logs?: string[]) {
|
|
210
|
+
super("6008: Insufficient liquidity available")
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export class ReserveStale extends Error {
|
|
215
|
+
static readonly code = 6009
|
|
216
|
+
readonly code = 6009
|
|
217
|
+
readonly name = "ReserveStale"
|
|
218
|
+
readonly msg = "Reserve state needs to be refreshed"
|
|
219
|
+
|
|
220
|
+
constructor(readonly logs?: string[]) {
|
|
221
|
+
super("6009: Reserve state needs to be refreshed")
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export class WithdrawTooSmall extends Error {
|
|
226
|
+
static readonly code = 6010
|
|
227
|
+
readonly code = 6010
|
|
228
|
+
readonly name = "WithdrawTooSmall"
|
|
229
|
+
readonly msg = "Withdraw amount too small"
|
|
230
|
+
|
|
231
|
+
constructor(readonly logs?: string[]) {
|
|
232
|
+
super("6010: Withdraw amount too small")
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export class WithdrawTooLarge extends Error {
|
|
237
|
+
static readonly code = 6011
|
|
238
|
+
readonly code = 6011
|
|
239
|
+
readonly name = "WithdrawTooLarge"
|
|
240
|
+
readonly msg = "Withdraw amount too large"
|
|
241
|
+
|
|
242
|
+
constructor(readonly logs?: string[]) {
|
|
243
|
+
super("6011: Withdraw amount too large")
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export class BorrowTooSmall extends Error {
|
|
248
|
+
static readonly code = 6012
|
|
249
|
+
readonly code = 6012
|
|
250
|
+
readonly name = "BorrowTooSmall"
|
|
251
|
+
readonly msg = "Borrow amount too small to receive liquidity after fees"
|
|
252
|
+
|
|
253
|
+
constructor(readonly logs?: string[]) {
|
|
254
|
+
super("6012: Borrow amount too small to receive liquidity after fees")
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export class BorrowTooLarge extends Error {
|
|
259
|
+
static readonly code = 6013
|
|
260
|
+
readonly code = 6013
|
|
261
|
+
readonly name = "BorrowTooLarge"
|
|
262
|
+
readonly msg = "Borrow amount too large for deposited collateral"
|
|
263
|
+
|
|
264
|
+
constructor(readonly logs?: string[]) {
|
|
265
|
+
super("6013: Borrow amount too large for deposited collateral")
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export class RepayTooSmall extends Error {
|
|
270
|
+
static readonly code = 6014
|
|
271
|
+
readonly code = 6014
|
|
272
|
+
readonly name = "RepayTooSmall"
|
|
273
|
+
readonly msg = "Repay amount too small to transfer liquidity"
|
|
274
|
+
|
|
275
|
+
constructor(readonly logs?: string[]) {
|
|
276
|
+
super("6014: Repay amount too small to transfer liquidity")
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export class LiquidationTooSmall extends Error {
|
|
281
|
+
static readonly code = 6015
|
|
282
|
+
readonly code = 6015
|
|
283
|
+
readonly name = "LiquidationTooSmall"
|
|
284
|
+
readonly msg = "Liquidation amount too small to receive collateral"
|
|
285
|
+
|
|
286
|
+
constructor(readonly logs?: string[]) {
|
|
287
|
+
super("6015: Liquidation amount too small to receive collateral")
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export class ObligationHealthy extends Error {
|
|
292
|
+
static readonly code = 6016
|
|
293
|
+
readonly code = 6016
|
|
294
|
+
readonly name = "ObligationHealthy"
|
|
295
|
+
readonly msg = "Cannot liquidate healthy obligations"
|
|
296
|
+
|
|
297
|
+
constructor(readonly logs?: string[]) {
|
|
298
|
+
super("6016: Cannot liquidate healthy obligations")
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export class ObligationStale extends Error {
|
|
303
|
+
static readonly code = 6017
|
|
304
|
+
readonly code = 6017
|
|
305
|
+
readonly name = "ObligationStale"
|
|
306
|
+
readonly msg = "Obligation state needs to be refreshed"
|
|
307
|
+
|
|
308
|
+
constructor(readonly logs?: string[]) {
|
|
309
|
+
super("6017: Obligation state needs to be refreshed")
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export class ObligationReserveLimit extends Error {
|
|
314
|
+
static readonly code = 6018
|
|
315
|
+
readonly code = 6018
|
|
316
|
+
readonly name = "ObligationReserveLimit"
|
|
317
|
+
readonly msg = "Obligation reserve limit exceeded"
|
|
318
|
+
|
|
319
|
+
constructor(readonly logs?: string[]) {
|
|
320
|
+
super("6018: Obligation reserve limit exceeded")
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export class InvalidObligationOwner extends Error {
|
|
325
|
+
static readonly code = 6019
|
|
326
|
+
readonly code = 6019
|
|
327
|
+
readonly name = "InvalidObligationOwner"
|
|
328
|
+
readonly msg = "Obligation owner is invalid"
|
|
329
|
+
|
|
330
|
+
constructor(readonly logs?: string[]) {
|
|
331
|
+
super("6019: Obligation owner is invalid")
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export class ObligationDepositsEmpty extends Error {
|
|
336
|
+
static readonly code = 6020
|
|
337
|
+
readonly code = 6020
|
|
338
|
+
readonly name = "ObligationDepositsEmpty"
|
|
339
|
+
readonly msg = "Obligation deposits are empty"
|
|
340
|
+
|
|
341
|
+
constructor(readonly logs?: string[]) {
|
|
342
|
+
super("6020: Obligation deposits are empty")
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export class ObligationBorrowsEmpty extends Error {
|
|
347
|
+
static readonly code = 6021
|
|
348
|
+
readonly code = 6021
|
|
349
|
+
readonly name = "ObligationBorrowsEmpty"
|
|
350
|
+
readonly msg = "Obligation borrows are empty"
|
|
351
|
+
|
|
352
|
+
constructor(readonly logs?: string[]) {
|
|
353
|
+
super("6021: Obligation borrows are empty")
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export class ObligationDepositsZero extends Error {
|
|
358
|
+
static readonly code = 6022
|
|
359
|
+
readonly code = 6022
|
|
360
|
+
readonly name = "ObligationDepositsZero"
|
|
361
|
+
readonly msg = "Obligation deposits have zero value"
|
|
362
|
+
|
|
363
|
+
constructor(readonly logs?: string[]) {
|
|
364
|
+
super("6022: Obligation deposits have zero value")
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export class ObligationBorrowsZero extends Error {
|
|
369
|
+
static readonly code = 6023
|
|
370
|
+
readonly code = 6023
|
|
371
|
+
readonly name = "ObligationBorrowsZero"
|
|
372
|
+
readonly msg = "Obligation borrows have zero value"
|
|
373
|
+
|
|
374
|
+
constructor(readonly logs?: string[]) {
|
|
375
|
+
super("6023: Obligation borrows have zero value")
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export class InvalidObligationCollateral extends Error {
|
|
380
|
+
static readonly code = 6024
|
|
381
|
+
readonly code = 6024
|
|
382
|
+
readonly name = "InvalidObligationCollateral"
|
|
383
|
+
readonly msg = "Invalid obligation collateral"
|
|
384
|
+
|
|
385
|
+
constructor(readonly logs?: string[]) {
|
|
386
|
+
super("6024: Invalid obligation collateral")
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export class InvalidObligationLiquidity extends Error {
|
|
391
|
+
static readonly code = 6025
|
|
392
|
+
readonly code = 6025
|
|
393
|
+
readonly name = "InvalidObligationLiquidity"
|
|
394
|
+
readonly msg = "Invalid obligation liquidity"
|
|
395
|
+
|
|
396
|
+
constructor(readonly logs?: string[]) {
|
|
397
|
+
super("6025: Invalid obligation liquidity")
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export class ObligationCollateralEmpty extends Error {
|
|
402
|
+
static readonly code = 6026
|
|
403
|
+
readonly code = 6026
|
|
404
|
+
readonly name = "ObligationCollateralEmpty"
|
|
405
|
+
readonly msg = "Obligation collateral is empty"
|
|
406
|
+
|
|
407
|
+
constructor(readonly logs?: string[]) {
|
|
408
|
+
super("6026: Obligation collateral is empty")
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export class ObligationLiquidityEmpty extends Error {
|
|
413
|
+
static readonly code = 6027
|
|
414
|
+
readonly code = 6027
|
|
415
|
+
readonly name = "ObligationLiquidityEmpty"
|
|
416
|
+
readonly msg = "Obligation liquidity is empty"
|
|
417
|
+
|
|
418
|
+
constructor(readonly logs?: string[]) {
|
|
419
|
+
super("6027: Obligation liquidity is empty")
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export class NegativeInterestRate extends Error {
|
|
424
|
+
static readonly code = 6028
|
|
425
|
+
readonly code = 6028
|
|
426
|
+
readonly name = "NegativeInterestRate"
|
|
427
|
+
readonly msg = "Interest rate is negative"
|
|
428
|
+
|
|
429
|
+
constructor(readonly logs?: string[]) {
|
|
430
|
+
super("6028: Interest rate is negative")
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export class InvalidOracleConfig extends Error {
|
|
435
|
+
static readonly code = 6029
|
|
436
|
+
readonly code = 6029
|
|
437
|
+
readonly name = "InvalidOracleConfig"
|
|
438
|
+
readonly msg = "Input oracle config is invalid"
|
|
439
|
+
|
|
440
|
+
constructor(readonly logs?: string[]) {
|
|
441
|
+
super("6029: Input oracle config is invalid")
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export class InsufficientProtocolFeesToRedeem extends Error {
|
|
446
|
+
static readonly code = 6030
|
|
447
|
+
readonly code = 6030
|
|
448
|
+
readonly name = "InsufficientProtocolFeesToRedeem"
|
|
449
|
+
readonly msg = "Insufficient protocol fees to claim or no liquidity available"
|
|
450
|
+
|
|
451
|
+
constructor(readonly logs?: string[]) {
|
|
452
|
+
super("6030: Insufficient protocol fees to claim or no liquidity available")
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export class FlashBorrowCpi extends Error {
|
|
457
|
+
static readonly code = 6031
|
|
458
|
+
readonly code = 6031
|
|
459
|
+
readonly name = "FlashBorrowCpi"
|
|
460
|
+
readonly msg = "No cpi flash borrows allowed"
|
|
461
|
+
|
|
462
|
+
constructor(readonly logs?: string[]) {
|
|
463
|
+
super("6031: No cpi flash borrows allowed")
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export class NoFlashRepayFound extends Error {
|
|
468
|
+
static readonly code = 6032
|
|
469
|
+
readonly code = 6032
|
|
470
|
+
readonly name = "NoFlashRepayFound"
|
|
471
|
+
readonly msg = "No corresponding repay found for flash borrow"
|
|
472
|
+
|
|
473
|
+
constructor(readonly logs?: string[]) {
|
|
474
|
+
super("6032: No corresponding repay found for flash borrow")
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export class InvalidFlashRepay extends Error {
|
|
479
|
+
static readonly code = 6033
|
|
480
|
+
readonly code = 6033
|
|
481
|
+
readonly name = "InvalidFlashRepay"
|
|
482
|
+
readonly msg = "Invalid repay found"
|
|
483
|
+
|
|
484
|
+
constructor(readonly logs?: string[]) {
|
|
485
|
+
super("6033: Invalid repay found")
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export class FlashRepayCpi extends Error {
|
|
490
|
+
static readonly code = 6034
|
|
491
|
+
readonly code = 6034
|
|
492
|
+
readonly name = "FlashRepayCpi"
|
|
493
|
+
readonly msg = "No cpi flash repays allowed"
|
|
494
|
+
|
|
495
|
+
constructor(readonly logs?: string[]) {
|
|
496
|
+
super("6034: No cpi flash repays allowed")
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export class MultipleFlashBorrows extends Error {
|
|
501
|
+
static readonly code = 6035
|
|
502
|
+
readonly code = 6035
|
|
503
|
+
readonly name = "MultipleFlashBorrows"
|
|
504
|
+
readonly msg = "Multiple flash borrows not allowed in the same transaction"
|
|
505
|
+
|
|
506
|
+
constructor(readonly logs?: string[]) {
|
|
507
|
+
super("6035: Multiple flash borrows not allowed in the same transaction")
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export class FlashLoansDisabled extends Error {
|
|
512
|
+
static readonly code = 6036
|
|
513
|
+
readonly code = 6036
|
|
514
|
+
readonly name = "FlashLoansDisabled"
|
|
515
|
+
readonly msg = "Flash loans are disabled for this reserve"
|
|
516
|
+
|
|
517
|
+
constructor(readonly logs?: string[]) {
|
|
518
|
+
super("6036: Flash loans are disabled for this reserve")
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export class SwitchboardV2Error extends Error {
|
|
523
|
+
static readonly code = 6037
|
|
524
|
+
readonly code = 6037
|
|
525
|
+
readonly name = "SwitchboardV2Error"
|
|
526
|
+
readonly msg = "Switchboard error"
|
|
527
|
+
|
|
528
|
+
constructor(readonly logs?: string[]) {
|
|
529
|
+
super("6037: Switchboard error")
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export class CouldNotDeserializeScope extends Error {
|
|
534
|
+
static readonly code = 6038
|
|
535
|
+
readonly code = 6038
|
|
536
|
+
readonly name = "CouldNotDeserializeScope"
|
|
537
|
+
readonly msg = "Cannot deserialize the scope price account"
|
|
538
|
+
|
|
539
|
+
constructor(readonly logs?: string[]) {
|
|
540
|
+
super("6038: Cannot deserialize the scope price account")
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export class PriceTooOld extends Error {
|
|
545
|
+
static readonly code = 6039
|
|
546
|
+
readonly code = 6039
|
|
547
|
+
readonly name = "PriceTooOld"
|
|
548
|
+
readonly msg = "Price too old"
|
|
549
|
+
|
|
550
|
+
constructor(readonly logs?: string[]) {
|
|
551
|
+
super("6039: Price too old")
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export class PriceTooDivergentFromTwap extends Error {
|
|
556
|
+
static readonly code = 6040
|
|
557
|
+
readonly code = 6040
|
|
558
|
+
readonly name = "PriceTooDivergentFromTwap"
|
|
559
|
+
readonly msg = "Price too divergent from twap"
|
|
560
|
+
|
|
561
|
+
constructor(readonly logs?: string[]) {
|
|
562
|
+
super("6040: Price too divergent from twap")
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export class InvalidTwapPrice extends Error {
|
|
567
|
+
static readonly code = 6041
|
|
568
|
+
readonly code = 6041
|
|
569
|
+
readonly name = "InvalidTwapPrice"
|
|
570
|
+
readonly msg = "Invalid twap price"
|
|
571
|
+
|
|
572
|
+
constructor(readonly logs?: string[]) {
|
|
573
|
+
super("6041: Invalid twap price")
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export class GlobalEmergencyMode extends Error {
|
|
578
|
+
static readonly code = 6042
|
|
579
|
+
readonly code = 6042
|
|
580
|
+
readonly name = "GlobalEmergencyMode"
|
|
581
|
+
readonly msg = "Emergency mode is enabled"
|
|
582
|
+
|
|
583
|
+
constructor(readonly logs?: string[]) {
|
|
584
|
+
super("6042: Emergency mode is enabled")
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export class InvalidFlag extends Error {
|
|
589
|
+
static readonly code = 6043
|
|
590
|
+
readonly code = 6043
|
|
591
|
+
readonly name = "InvalidFlag"
|
|
592
|
+
readonly msg = "Invalid lending market config"
|
|
593
|
+
|
|
594
|
+
constructor(readonly logs?: string[]) {
|
|
595
|
+
super("6043: Invalid lending market config")
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export class PriceNotValid extends Error {
|
|
600
|
+
static readonly code = 6044
|
|
601
|
+
readonly code = 6044
|
|
602
|
+
readonly name = "PriceNotValid"
|
|
603
|
+
readonly msg = "Price is not valid"
|
|
604
|
+
|
|
605
|
+
constructor(readonly logs?: string[]) {
|
|
606
|
+
super("6044: Price is not valid")
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export class PriceIsBiggerThanHeuristic extends Error {
|
|
611
|
+
static readonly code = 6045
|
|
612
|
+
readonly code = 6045
|
|
613
|
+
readonly name = "PriceIsBiggerThanHeuristic"
|
|
614
|
+
readonly msg = "Price is bigger than allowed by heuristic"
|
|
615
|
+
|
|
616
|
+
constructor(readonly logs?: string[]) {
|
|
617
|
+
super("6045: Price is bigger than allowed by heuristic")
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export class PriceIsLowerThanHeuristic extends Error {
|
|
622
|
+
static readonly code = 6046
|
|
623
|
+
readonly code = 6046
|
|
624
|
+
readonly name = "PriceIsLowerThanHeuristic"
|
|
625
|
+
readonly msg = "Price lower than allowed by heuristic"
|
|
626
|
+
|
|
627
|
+
constructor(readonly logs?: string[]) {
|
|
628
|
+
super("6046: Price lower than allowed by heuristic")
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export class PriceIsZero extends Error {
|
|
633
|
+
static readonly code = 6047
|
|
634
|
+
readonly code = 6047
|
|
635
|
+
readonly name = "PriceIsZero"
|
|
636
|
+
readonly msg = "Price is zero"
|
|
637
|
+
|
|
638
|
+
constructor(readonly logs?: string[]) {
|
|
639
|
+
super("6047: Price is zero")
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export class PriceConfidenceTooWide extends Error {
|
|
644
|
+
static readonly code = 6048
|
|
645
|
+
readonly code = 6048
|
|
646
|
+
readonly name = "PriceConfidenceTooWide"
|
|
647
|
+
readonly msg = "Price confidence too wide"
|
|
648
|
+
|
|
649
|
+
constructor(readonly logs?: string[]) {
|
|
650
|
+
super("6048: Price confidence too wide")
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export class IntegerOverflow extends Error {
|
|
655
|
+
static readonly code = 6049
|
|
656
|
+
readonly code = 6049
|
|
657
|
+
readonly name = "IntegerOverflow"
|
|
658
|
+
readonly msg = "Conversion between integers failed"
|
|
659
|
+
|
|
660
|
+
constructor(readonly logs?: string[]) {
|
|
661
|
+
super("6049: Conversion between integers failed")
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export class NoFarmForReserve extends Error {
|
|
666
|
+
static readonly code = 6050
|
|
667
|
+
readonly code = 6050
|
|
668
|
+
readonly name = "NoFarmForReserve"
|
|
669
|
+
readonly msg = "This reserve does not have a farm"
|
|
670
|
+
|
|
671
|
+
constructor(readonly logs?: string[]) {
|
|
672
|
+
super("6050: This reserve does not have a farm")
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export class IncorrectInstructionInPosition extends Error {
|
|
677
|
+
static readonly code = 6051
|
|
678
|
+
readonly code = 6051
|
|
679
|
+
readonly name = "IncorrectInstructionInPosition"
|
|
680
|
+
readonly msg = "Wrong instruction at expected position"
|
|
681
|
+
|
|
682
|
+
constructor(readonly logs?: string[]) {
|
|
683
|
+
super("6051: Wrong instruction at expected position")
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export class NoPriceFound extends Error {
|
|
688
|
+
static readonly code = 6052
|
|
689
|
+
readonly code = 6052
|
|
690
|
+
readonly name = "NoPriceFound"
|
|
691
|
+
readonly msg = "No price found"
|
|
692
|
+
|
|
693
|
+
constructor(readonly logs?: string[]) {
|
|
694
|
+
super("6052: No price found")
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export class InvalidTwapConfig extends Error {
|
|
699
|
+
static readonly code = 6053
|
|
700
|
+
readonly code = 6053
|
|
701
|
+
readonly name = "InvalidTwapConfig"
|
|
702
|
+
readonly msg =
|
|
703
|
+
"Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"
|
|
704
|
+
|
|
705
|
+
constructor(readonly logs?: string[]) {
|
|
706
|
+
super(
|
|
707
|
+
"6053: Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"
|
|
708
|
+
)
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export class InvalidPythPriceAccount extends Error {
|
|
713
|
+
static readonly code = 6054
|
|
714
|
+
readonly code = 6054
|
|
715
|
+
readonly name = "InvalidPythPriceAccount"
|
|
716
|
+
readonly msg = "Pyth price account does not match configuration"
|
|
717
|
+
|
|
718
|
+
constructor(readonly logs?: string[]) {
|
|
719
|
+
super("6054: Pyth price account does not match configuration")
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export class InvalidSwitchboardAccount extends Error {
|
|
724
|
+
static readonly code = 6055
|
|
725
|
+
readonly code = 6055
|
|
726
|
+
readonly name = "InvalidSwitchboardAccount"
|
|
727
|
+
readonly msg = "Switchboard account(s) do not match configuration"
|
|
728
|
+
|
|
729
|
+
constructor(readonly logs?: string[]) {
|
|
730
|
+
super("6055: Switchboard account(s) do not match configuration")
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
export class InvalidScopePriceAccount extends Error {
|
|
735
|
+
static readonly code = 6056
|
|
736
|
+
readonly code = 6056
|
|
737
|
+
readonly name = "InvalidScopePriceAccount"
|
|
738
|
+
readonly msg = "Scope price account does not match configuration"
|
|
739
|
+
|
|
740
|
+
constructor(readonly logs?: string[]) {
|
|
741
|
+
super("6056: Scope price account does not match configuration")
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export class ObligationCollateralLtvZero extends Error {
|
|
746
|
+
static readonly code = 6057
|
|
747
|
+
readonly code = 6057
|
|
748
|
+
readonly name = "ObligationCollateralLtvZero"
|
|
749
|
+
readonly msg =
|
|
750
|
+
"The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals"
|
|
751
|
+
|
|
752
|
+
constructor(readonly logs?: string[]) {
|
|
753
|
+
super(
|
|
754
|
+
"6057: The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals"
|
|
755
|
+
)
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
export class InvalidObligationSeedsValue extends Error {
|
|
760
|
+
static readonly code = 6058
|
|
761
|
+
readonly code = 6058
|
|
762
|
+
readonly name = "InvalidObligationSeedsValue"
|
|
763
|
+
readonly msg =
|
|
764
|
+
"Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2"
|
|
765
|
+
|
|
766
|
+
constructor(readonly logs?: string[]) {
|
|
767
|
+
super(
|
|
768
|
+
"6058: Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2"
|
|
769
|
+
)
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
export class InvalidObligationId extends Error {
|
|
774
|
+
static readonly code = 6059
|
|
775
|
+
readonly code = 6059
|
|
776
|
+
readonly name = "InvalidObligationId"
|
|
777
|
+
readonly msg = "Obligation id must be 0"
|
|
778
|
+
|
|
779
|
+
constructor(readonly logs?: string[]) {
|
|
780
|
+
super("6059: Obligation id must be 0")
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export class InvalidBorrowRateCurvePoint extends Error {
|
|
785
|
+
static readonly code = 6060
|
|
786
|
+
readonly code = 6060
|
|
787
|
+
readonly name = "InvalidBorrowRateCurvePoint"
|
|
788
|
+
readonly msg = "Invalid borrow rate curve point"
|
|
789
|
+
|
|
790
|
+
constructor(readonly logs?: string[]) {
|
|
791
|
+
super("6060: Invalid borrow rate curve point")
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export class InvalidUtilizationRate extends Error {
|
|
796
|
+
static readonly code = 6061
|
|
797
|
+
readonly code = 6061
|
|
798
|
+
readonly name = "InvalidUtilizationRate"
|
|
799
|
+
readonly msg = "Invalid utilization rate"
|
|
800
|
+
|
|
801
|
+
constructor(readonly logs?: string[]) {
|
|
802
|
+
super("6061: Invalid utilization rate")
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
export class CannotSocializeObligationWithCollateral extends Error {
|
|
807
|
+
static readonly code = 6062
|
|
808
|
+
readonly code = 6062
|
|
809
|
+
readonly name = "CannotSocializeObligationWithCollateral"
|
|
810
|
+
readonly msg =
|
|
811
|
+
"Obligation hasn't been fully liquidated and debt cannot be socialized."
|
|
812
|
+
|
|
813
|
+
constructor(readonly logs?: string[]) {
|
|
814
|
+
super(
|
|
815
|
+
"6062: Obligation hasn't been fully liquidated and debt cannot be socialized."
|
|
816
|
+
)
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export class ObligationEmpty extends Error {
|
|
821
|
+
static readonly code = 6063
|
|
822
|
+
readonly code = 6063
|
|
823
|
+
readonly name = "ObligationEmpty"
|
|
824
|
+
readonly msg = "Obligation has no borrows or deposits."
|
|
825
|
+
|
|
826
|
+
constructor(readonly logs?: string[]) {
|
|
827
|
+
super("6063: Obligation has no borrows or deposits.")
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export class WithdrawalCapReached extends Error {
|
|
832
|
+
static readonly code = 6064
|
|
833
|
+
readonly code = 6064
|
|
834
|
+
readonly name = "WithdrawalCapReached"
|
|
835
|
+
readonly msg = "Withdrawal cap is reached"
|
|
836
|
+
|
|
837
|
+
constructor(readonly logs?: string[]) {
|
|
838
|
+
super("6064: Withdrawal cap is reached")
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export class LastTimestampGreaterThanCurrent extends Error {
|
|
843
|
+
static readonly code = 6065
|
|
844
|
+
readonly code = 6065
|
|
845
|
+
readonly name = "LastTimestampGreaterThanCurrent"
|
|
846
|
+
readonly msg =
|
|
847
|
+
"The last interval start timestamp is greater than the current timestamp"
|
|
848
|
+
|
|
849
|
+
constructor(readonly logs?: string[]) {
|
|
850
|
+
super(
|
|
851
|
+
"6065: The last interval start timestamp is greater than the current timestamp"
|
|
852
|
+
)
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export class LiquidationRewardTooSmall extends Error {
|
|
857
|
+
static readonly code = 6066
|
|
858
|
+
readonly code = 6066
|
|
859
|
+
readonly name = "LiquidationRewardTooSmall"
|
|
860
|
+
readonly msg =
|
|
861
|
+
"The reward amount is less than the minimum acceptable received liquidity"
|
|
862
|
+
|
|
863
|
+
constructor(readonly logs?: string[]) {
|
|
864
|
+
super(
|
|
865
|
+
"6066: The reward amount is less than the minimum acceptable received liquidity"
|
|
866
|
+
)
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
export class IsolatedAssetTierViolation extends Error {
|
|
871
|
+
static readonly code = 6067
|
|
872
|
+
readonly code = 6067
|
|
873
|
+
readonly name = "IsolatedAssetTierViolation"
|
|
874
|
+
readonly msg = "Isolated Asset Tier Violation"
|
|
875
|
+
|
|
876
|
+
constructor(readonly logs?: string[]) {
|
|
877
|
+
super("6067: Isolated Asset Tier Violation")
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export class InconsistentElevationGroup extends Error {
|
|
882
|
+
static readonly code = 6068
|
|
883
|
+
readonly code = 6068
|
|
884
|
+
readonly name = "InconsistentElevationGroup"
|
|
885
|
+
readonly msg =
|
|
886
|
+
"The obligation's elevation group and the reserve's are not the same"
|
|
887
|
+
|
|
888
|
+
constructor(readonly logs?: string[]) {
|
|
889
|
+
super(
|
|
890
|
+
"6068: The obligation's elevation group and the reserve's are not the same"
|
|
891
|
+
)
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export class InvalidElevationGroup extends Error {
|
|
896
|
+
static readonly code = 6069
|
|
897
|
+
readonly code = 6069
|
|
898
|
+
readonly name = "InvalidElevationGroup"
|
|
899
|
+
readonly msg =
|
|
900
|
+
"The elevation group chosen for the reserve does not exist in the lending market"
|
|
901
|
+
|
|
902
|
+
constructor(readonly logs?: string[]) {
|
|
903
|
+
super(
|
|
904
|
+
"6069: The elevation group chosen for the reserve does not exist in the lending market"
|
|
905
|
+
)
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
export class InvalidElevationGroupConfig extends Error {
|
|
910
|
+
static readonly code = 6070
|
|
911
|
+
readonly code = 6070
|
|
912
|
+
readonly name = "InvalidElevationGroupConfig"
|
|
913
|
+
readonly msg = "The elevation group updated has wrong parameters set"
|
|
914
|
+
|
|
915
|
+
constructor(readonly logs?: string[]) {
|
|
916
|
+
super("6070: The elevation group updated has wrong parameters set")
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export class UnhealthyElevationGroupLtv extends Error {
|
|
921
|
+
static readonly code = 6071
|
|
922
|
+
readonly code = 6071
|
|
923
|
+
readonly name = "UnhealthyElevationGroupLtv"
|
|
924
|
+
readonly msg =
|
|
925
|
+
"The current obligation must have most or all its debt repaid before changing the elevation group"
|
|
926
|
+
|
|
927
|
+
constructor(readonly logs?: string[]) {
|
|
928
|
+
super(
|
|
929
|
+
"6071: The current obligation must have most or all its debt repaid before changing the elevation group"
|
|
930
|
+
)
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export class ElevationGroupNewLoansDisabled extends Error {
|
|
935
|
+
static readonly code = 6072
|
|
936
|
+
readonly code = 6072
|
|
937
|
+
readonly name = "ElevationGroupNewLoansDisabled"
|
|
938
|
+
readonly msg =
|
|
939
|
+
"Elevation group does not accept any new loans or any new borrows/withdrawals"
|
|
940
|
+
|
|
941
|
+
constructor(readonly logs?: string[]) {
|
|
942
|
+
super(
|
|
943
|
+
"6072: Elevation group does not accept any new loans or any new borrows/withdrawals"
|
|
944
|
+
)
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export class ReserveDeprecated extends Error {
|
|
949
|
+
static readonly code = 6073
|
|
950
|
+
readonly code = 6073
|
|
951
|
+
readonly name = "ReserveDeprecated"
|
|
952
|
+
readonly msg = "Reserve was deprecated, no longer usable"
|
|
953
|
+
|
|
954
|
+
constructor(readonly logs?: string[]) {
|
|
955
|
+
super("6073: Reserve was deprecated, no longer usable")
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export class ReferrerAccountNotInitialized extends Error {
|
|
960
|
+
static readonly code = 6074
|
|
961
|
+
readonly code = 6074
|
|
962
|
+
readonly name = "ReferrerAccountNotInitialized"
|
|
963
|
+
readonly msg = "Referrer account not initialized"
|
|
964
|
+
|
|
965
|
+
constructor(readonly logs?: string[]) {
|
|
966
|
+
super("6074: Referrer account not initialized")
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export class ReferrerAccountMintMissmatch extends Error {
|
|
971
|
+
static readonly code = 6075
|
|
972
|
+
readonly code = 6075
|
|
973
|
+
readonly name = "ReferrerAccountMintMissmatch"
|
|
974
|
+
readonly msg =
|
|
975
|
+
"Referrer account mint does not match the operation reserve mint"
|
|
976
|
+
|
|
977
|
+
constructor(readonly logs?: string[]) {
|
|
978
|
+
super(
|
|
979
|
+
"6075: Referrer account mint does not match the operation reserve mint"
|
|
980
|
+
)
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export class ReferrerAccountWrongAddress extends Error {
|
|
985
|
+
static readonly code = 6076
|
|
986
|
+
readonly code = 6076
|
|
987
|
+
readonly name = "ReferrerAccountWrongAddress"
|
|
988
|
+
readonly msg = "Referrer account address is not a valid program address"
|
|
989
|
+
|
|
990
|
+
constructor(readonly logs?: string[]) {
|
|
991
|
+
super("6076: Referrer account address is not a valid program address")
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export class ReferrerAccountReferrerMissmatch extends Error {
|
|
996
|
+
static readonly code = 6077
|
|
997
|
+
readonly code = 6077
|
|
998
|
+
readonly name = "ReferrerAccountReferrerMissmatch"
|
|
999
|
+
readonly msg = "Referrer account referrer does not match the owner referrer"
|
|
1000
|
+
|
|
1001
|
+
constructor(readonly logs?: string[]) {
|
|
1002
|
+
super("6077: Referrer account referrer does not match the owner referrer")
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
export class ReferrerAccountMissing extends Error {
|
|
1007
|
+
static readonly code = 6078
|
|
1008
|
+
readonly code = 6078
|
|
1009
|
+
readonly name = "ReferrerAccountMissing"
|
|
1010
|
+
readonly msg = "Referrer account missing for obligation with referrer"
|
|
1011
|
+
|
|
1012
|
+
constructor(readonly logs?: string[]) {
|
|
1013
|
+
super("6078: Referrer account missing for obligation with referrer")
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
export class InsufficientReferralFeesToRedeem extends Error {
|
|
1018
|
+
static readonly code = 6079
|
|
1019
|
+
readonly code = 6079
|
|
1020
|
+
readonly name = "InsufficientReferralFeesToRedeem"
|
|
1021
|
+
readonly msg = "Insufficient referral fees to claim or no liquidity available"
|
|
1022
|
+
|
|
1023
|
+
constructor(readonly logs?: string[]) {
|
|
1024
|
+
super("6079: Insufficient referral fees to claim or no liquidity available")
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
export class CpiDisabled extends Error {
|
|
1029
|
+
static readonly code = 6080
|
|
1030
|
+
readonly code = 6080
|
|
1031
|
+
readonly name = "CpiDisabled"
|
|
1032
|
+
readonly msg = "CPI disabled for this instruction"
|
|
1033
|
+
|
|
1034
|
+
constructor(readonly logs?: string[]) {
|
|
1035
|
+
super("6080: CPI disabled for this instruction")
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
export class ShortUrlNotAsciiAlphanumeric extends Error {
|
|
1040
|
+
static readonly code = 6081
|
|
1041
|
+
readonly code = 6081
|
|
1042
|
+
readonly name = "ShortUrlNotAsciiAlphanumeric"
|
|
1043
|
+
readonly msg = "Referrer short_url is not ascii alphanumeric"
|
|
1044
|
+
|
|
1045
|
+
constructor(readonly logs?: string[]) {
|
|
1046
|
+
super("6081: Referrer short_url is not ascii alphanumeric")
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export class ReserveObsolete extends Error {
|
|
1051
|
+
static readonly code = 6082
|
|
1052
|
+
readonly code = 6082
|
|
1053
|
+
readonly name = "ReserveObsolete"
|
|
1054
|
+
readonly msg = "Reserve is marked as obsolete"
|
|
1055
|
+
|
|
1056
|
+
constructor(readonly logs?: string[]) {
|
|
1057
|
+
super("6082: Reserve is marked as obsolete")
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
export class ElevationGroupAlreadyActivated extends Error {
|
|
1062
|
+
static readonly code = 6083
|
|
1063
|
+
readonly code = 6083
|
|
1064
|
+
readonly name = "ElevationGroupAlreadyActivated"
|
|
1065
|
+
readonly msg = "Obligation already part of the same elevation group"
|
|
1066
|
+
|
|
1067
|
+
constructor(readonly logs?: string[]) {
|
|
1068
|
+
super("6083: Obligation already part of the same elevation group")
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export class ObligationInDeprecatedReserve extends Error {
|
|
1073
|
+
static readonly code = 6084
|
|
1074
|
+
readonly code = 6084
|
|
1075
|
+
readonly name = "ObligationInDeprecatedReserve"
|
|
1076
|
+
readonly msg = "Obligation has a deposit in a deprecated reserve"
|
|
1077
|
+
|
|
1078
|
+
constructor(readonly logs?: string[]) {
|
|
1079
|
+
super("6084: Obligation has a deposit in a deprecated reserve")
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export class ReferrerStateOwnerMismatch extends Error {
|
|
1084
|
+
static readonly code = 6085
|
|
1085
|
+
readonly code = 6085
|
|
1086
|
+
readonly name = "ReferrerStateOwnerMismatch"
|
|
1087
|
+
readonly msg = "Referrer state owner does not match the given signer"
|
|
1088
|
+
|
|
1089
|
+
constructor(readonly logs?: string[]) {
|
|
1090
|
+
super("6085: Referrer state owner does not match the given signer")
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export class UserMetadataOwnerAlreadySet extends Error {
|
|
1095
|
+
static readonly code = 6086
|
|
1096
|
+
readonly code = 6086
|
|
1097
|
+
readonly name = "UserMetadataOwnerAlreadySet"
|
|
1098
|
+
readonly msg = "User metadata owner is already set"
|
|
1099
|
+
|
|
1100
|
+
constructor(readonly logs?: string[]) {
|
|
1101
|
+
super("6086: User metadata owner is already set")
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export class CollateralNonLiquidatable extends Error {
|
|
1106
|
+
static readonly code = 6087
|
|
1107
|
+
readonly code = 6087
|
|
1108
|
+
readonly name = "CollateralNonLiquidatable"
|
|
1109
|
+
readonly msg = "This collateral cannot be liquidated (LTV set to 0)"
|
|
1110
|
+
|
|
1111
|
+
constructor(readonly logs?: string[]) {
|
|
1112
|
+
super("6087: This collateral cannot be liquidated (LTV set to 0)")
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export class BorrowingDisabled extends Error {
|
|
1117
|
+
static readonly code = 6088
|
|
1118
|
+
readonly code = 6088
|
|
1119
|
+
readonly name = "BorrowingDisabled"
|
|
1120
|
+
readonly msg = "Borrowing is disabled"
|
|
1121
|
+
|
|
1122
|
+
constructor(readonly logs?: string[]) {
|
|
1123
|
+
super("6088: Borrowing is disabled")
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
export class BorrowLimitExceeded extends Error {
|
|
1128
|
+
static readonly code = 6089
|
|
1129
|
+
readonly code = 6089
|
|
1130
|
+
readonly name = "BorrowLimitExceeded"
|
|
1131
|
+
readonly msg = "Cannot borrow above borrow limit"
|
|
1132
|
+
|
|
1133
|
+
constructor(readonly logs?: string[]) {
|
|
1134
|
+
super("6089: Cannot borrow above borrow limit")
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
export class DepositLimitExceeded extends Error {
|
|
1139
|
+
static readonly code = 6090
|
|
1140
|
+
readonly code = 6090
|
|
1141
|
+
readonly name = "DepositLimitExceeded"
|
|
1142
|
+
readonly msg = "Cannot deposit above deposit limit"
|
|
1143
|
+
|
|
1144
|
+
constructor(readonly logs?: string[]) {
|
|
1145
|
+
super("6090: Cannot deposit above deposit limit")
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export class BorrowingDisabledOutsideElevationGroup extends Error {
|
|
1150
|
+
static readonly code = 6091
|
|
1151
|
+
readonly code = 6091
|
|
1152
|
+
readonly name = "BorrowingDisabledOutsideElevationGroup"
|
|
1153
|
+
readonly msg =
|
|
1154
|
+
"Reserve does not accept any new borrows outside elevation group"
|
|
1155
|
+
|
|
1156
|
+
constructor(readonly logs?: string[]) {
|
|
1157
|
+
super(
|
|
1158
|
+
"6091: Reserve does not accept any new borrows outside elevation group"
|
|
1159
|
+
)
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
export class NetValueRemainingTooSmall extends Error {
|
|
1164
|
+
static readonly code = 6092
|
|
1165
|
+
readonly code = 6092
|
|
1166
|
+
readonly name = "NetValueRemainingTooSmall"
|
|
1167
|
+
readonly msg = "Net value remaining too small"
|
|
1168
|
+
|
|
1169
|
+
constructor(readonly logs?: string[]) {
|
|
1170
|
+
super("6092: Net value remaining too small")
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
export class WorseLTVBlocked extends Error {
|
|
1175
|
+
static readonly code = 6093
|
|
1176
|
+
readonly code = 6093
|
|
1177
|
+
readonly name = "WorseLTVBlocked"
|
|
1178
|
+
readonly msg = "Cannot get the obligation in a worse position"
|
|
1179
|
+
|
|
1180
|
+
constructor(readonly logs?: string[]) {
|
|
1181
|
+
super("6093: Cannot get the obligation in a worse position")
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export class LiabilitiesBiggerThanAssets extends Error {
|
|
1186
|
+
static readonly code = 6094
|
|
1187
|
+
readonly code = 6094
|
|
1188
|
+
readonly name = "LiabilitiesBiggerThanAssets"
|
|
1189
|
+
readonly msg = "Cannot have more liabilities than assets in a position"
|
|
1190
|
+
|
|
1191
|
+
constructor(readonly logs?: string[]) {
|
|
1192
|
+
super("6094: Cannot have more liabilities than assets in a position")
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
export class ReserveTokenBalanceMismatch extends Error {
|
|
1197
|
+
static readonly code = 6095
|
|
1198
|
+
readonly code = 6095
|
|
1199
|
+
readonly name = "ReserveTokenBalanceMismatch"
|
|
1200
|
+
readonly msg = "Reserve state and token account cannot drift"
|
|
1201
|
+
|
|
1202
|
+
constructor(readonly logs?: string[]) {
|
|
1203
|
+
super("6095: Reserve state and token account cannot drift")
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export class ReserveVaultBalanceMismatch extends Error {
|
|
1208
|
+
static readonly code = 6096
|
|
1209
|
+
readonly code = 6096
|
|
1210
|
+
readonly name = "ReserveVaultBalanceMismatch"
|
|
1211
|
+
readonly msg = "Reserve token account has been unexpectedly modified"
|
|
1212
|
+
|
|
1213
|
+
constructor(readonly logs?: string[]) {
|
|
1214
|
+
super("6096: Reserve token account has been unexpectedly modified")
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
export class ReserveAccountingMismatch extends Error {
|
|
1219
|
+
static readonly code = 6097
|
|
1220
|
+
readonly code = 6097
|
|
1221
|
+
readonly name = "ReserveAccountingMismatch"
|
|
1222
|
+
readonly msg =
|
|
1223
|
+
"Reserve internal state accounting has been unexpectedly modified"
|
|
1224
|
+
|
|
1225
|
+
constructor(readonly logs?: string[]) {
|
|
1226
|
+
super(
|
|
1227
|
+
"6097: Reserve internal state accounting has been unexpectedly modified"
|
|
1228
|
+
)
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
export class BorrowingAboveUtilizationRateDisabled extends Error {
|
|
1233
|
+
static readonly code = 6098
|
|
1234
|
+
readonly code = 6098
|
|
1235
|
+
readonly name = "BorrowingAboveUtilizationRateDisabled"
|
|
1236
|
+
readonly msg = "Borrowing above set utilization rate is disabled"
|
|
1237
|
+
|
|
1238
|
+
constructor(readonly logs?: string[]) {
|
|
1239
|
+
super("6098: Borrowing above set utilization rate is disabled")
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
export class LiquidationBorrowFactorPriority extends Error {
|
|
1244
|
+
static readonly code = 6099
|
|
1245
|
+
readonly code = 6099
|
|
1246
|
+
readonly name = "LiquidationBorrowFactorPriority"
|
|
1247
|
+
readonly msg =
|
|
1248
|
+
"Liquidation must prioritize the debt with the highest borrow factor"
|
|
1249
|
+
|
|
1250
|
+
constructor(readonly logs?: string[]) {
|
|
1251
|
+
super(
|
|
1252
|
+
"6099: Liquidation must prioritize the debt with the highest borrow factor"
|
|
1253
|
+
)
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export class LiquidationLowestLTVPriority extends Error {
|
|
1258
|
+
static readonly code = 6100
|
|
1259
|
+
readonly code = 6100
|
|
1260
|
+
readonly name = "LiquidationLowestLTVPriority"
|
|
1261
|
+
readonly msg =
|
|
1262
|
+
"Liquidation must prioritize the collateral with the lowest LTV"
|
|
1263
|
+
|
|
1264
|
+
constructor(readonly logs?: string[]) {
|
|
1265
|
+
super(
|
|
1266
|
+
"6100: Liquidation must prioritize the collateral with the lowest LTV"
|
|
1267
|
+
)
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
export class ElevationGroupBorrowLimitExceeded extends Error {
|
|
1272
|
+
static readonly code = 6101
|
|
1273
|
+
readonly code = 6101
|
|
1274
|
+
readonly name = "ElevationGroupBorrowLimitExceeded"
|
|
1275
|
+
readonly msg = "Elevation group borrow limit exceeded"
|
|
1276
|
+
|
|
1277
|
+
constructor(readonly logs?: string[]) {
|
|
1278
|
+
super("6101: Elevation group borrow limit exceeded")
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
export class ElevationGroupWithoutDebtReserve extends Error {
|
|
1283
|
+
static readonly code = 6102
|
|
1284
|
+
readonly code = 6102
|
|
1285
|
+
readonly name = "ElevationGroupWithoutDebtReserve"
|
|
1286
|
+
readonly msg = "The elevation group does not have a debt reserve defined"
|
|
1287
|
+
|
|
1288
|
+
constructor(readonly logs?: string[]) {
|
|
1289
|
+
super("6102: The elevation group does not have a debt reserve defined")
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
export class ElevationGroupMaxCollateralReserveZero extends Error {
|
|
1294
|
+
static readonly code = 6103
|
|
1295
|
+
readonly code = 6103
|
|
1296
|
+
readonly name = "ElevationGroupMaxCollateralReserveZero"
|
|
1297
|
+
readonly msg = "The elevation group does not allow any collateral reserves"
|
|
1298
|
+
|
|
1299
|
+
constructor(readonly logs?: string[]) {
|
|
1300
|
+
super("6103: The elevation group does not allow any collateral reserves")
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
export class ElevationGroupHasAnotherDebtReserve extends Error {
|
|
1305
|
+
static readonly code = 6104
|
|
1306
|
+
readonly code = 6104
|
|
1307
|
+
readonly name = "ElevationGroupHasAnotherDebtReserve"
|
|
1308
|
+
readonly msg =
|
|
1309
|
+
"In elevation group attempt to borrow from a reserve that is not the debt reserve"
|
|
1310
|
+
|
|
1311
|
+
constructor(readonly logs?: string[]) {
|
|
1312
|
+
super(
|
|
1313
|
+
"6104: In elevation group attempt to borrow from a reserve that is not the debt reserve"
|
|
1314
|
+
)
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
export class ElevationGroupDebtReserveAsCollateral extends Error {
|
|
1319
|
+
static readonly code = 6105
|
|
1320
|
+
readonly code = 6105
|
|
1321
|
+
readonly name = "ElevationGroupDebtReserveAsCollateral"
|
|
1322
|
+
readonly msg =
|
|
1323
|
+
"The elevation group's debt reserve cannot be used as a collateral reserve"
|
|
1324
|
+
|
|
1325
|
+
constructor(readonly logs?: string[]) {
|
|
1326
|
+
super(
|
|
1327
|
+
"6105: The elevation group's debt reserve cannot be used as a collateral reserve"
|
|
1328
|
+
)
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
export class ObligationCollateralExceedsElevationGroupLimit extends Error {
|
|
1333
|
+
static readonly code = 6106
|
|
1334
|
+
readonly code = 6106
|
|
1335
|
+
readonly name = "ObligationCollateralExceedsElevationGroupLimit"
|
|
1336
|
+
readonly msg =
|
|
1337
|
+
"Obligation have more collateral than the maximum allowed by the elevation group"
|
|
1338
|
+
|
|
1339
|
+
constructor(readonly logs?: string[]) {
|
|
1340
|
+
super(
|
|
1341
|
+
"6106: Obligation have more collateral than the maximum allowed by the elevation group"
|
|
1342
|
+
)
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
export class ObligationElevationGroupMultipleDebtReserve extends Error {
|
|
1347
|
+
static readonly code = 6107
|
|
1348
|
+
readonly code = 6107
|
|
1349
|
+
readonly name = "ObligationElevationGroupMultipleDebtReserve"
|
|
1350
|
+
readonly msg =
|
|
1351
|
+
"Obligation is an elevation group but have more than one debt reserve"
|
|
1352
|
+
|
|
1353
|
+
constructor(readonly logs?: string[]) {
|
|
1354
|
+
super(
|
|
1355
|
+
"6107: Obligation is an elevation group but have more than one debt reserve"
|
|
1356
|
+
)
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
export class UnsupportedTokenExtension extends Error {
|
|
1361
|
+
static readonly code = 6108
|
|
1362
|
+
readonly code = 6108
|
|
1363
|
+
readonly name = "UnsupportedTokenExtension"
|
|
1364
|
+
readonly msg = "Mint has a token (2022) extension that is not supported"
|
|
1365
|
+
|
|
1366
|
+
constructor(readonly logs?: string[]) {
|
|
1367
|
+
super("6108: Mint has a token (2022) extension that is not supported")
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
export class InvalidTokenAccount extends Error {
|
|
1372
|
+
static readonly code = 6109
|
|
1373
|
+
readonly code = 6109
|
|
1374
|
+
readonly name = "InvalidTokenAccount"
|
|
1375
|
+
readonly msg = "Can't have an spl token mint with a t22 account"
|
|
1376
|
+
|
|
1377
|
+
constructor(readonly logs?: string[]) {
|
|
1378
|
+
super("6109: Can't have an spl token mint with a t22 account")
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
export class DepositDisabledOutsideElevationGroup extends Error {
|
|
1383
|
+
static readonly code = 6110
|
|
1384
|
+
readonly code = 6110
|
|
1385
|
+
readonly name = "DepositDisabledOutsideElevationGroup"
|
|
1386
|
+
readonly msg = "Can't deposit into this reserve outside elevation group"
|
|
1387
|
+
|
|
1388
|
+
constructor(readonly logs?: string[]) {
|
|
1389
|
+
super("6110: Can't deposit into this reserve outside elevation group")
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
export class CannotCalculateReferralAmountDueToSlotsMismatch extends Error {
|
|
1394
|
+
static readonly code = 6111
|
|
1395
|
+
readonly code = 6111
|
|
1396
|
+
readonly name = "CannotCalculateReferralAmountDueToSlotsMismatch"
|
|
1397
|
+
readonly msg = "Cannot calculate referral amount due to slots mismatch"
|
|
1398
|
+
|
|
1399
|
+
constructor(readonly logs?: string[]) {
|
|
1400
|
+
super("6111: Cannot calculate referral amount due to slots mismatch")
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
export function fromCode(code: number, logs?: string[]): CustomError | null {
|
|
1405
|
+
switch (code) {
|
|
1406
|
+
case 6000:
|
|
1407
|
+
return new InvalidMarketAuthority(logs)
|
|
1408
|
+
case 6001:
|
|
1409
|
+
return new InvalidMarketOwner(logs)
|
|
1410
|
+
case 6002:
|
|
1411
|
+
return new InvalidAccountOwner(logs)
|
|
1412
|
+
case 6003:
|
|
1413
|
+
return new InvalidAmount(logs)
|
|
1414
|
+
case 6004:
|
|
1415
|
+
return new InvalidConfig(logs)
|
|
1416
|
+
case 6005:
|
|
1417
|
+
return new InvalidSigner(logs)
|
|
1418
|
+
case 6006:
|
|
1419
|
+
return new InvalidAccountInput(logs)
|
|
1420
|
+
case 6007:
|
|
1421
|
+
return new MathOverflow(logs)
|
|
1422
|
+
case 6008:
|
|
1423
|
+
return new InsufficientLiquidity(logs)
|
|
1424
|
+
case 6009:
|
|
1425
|
+
return new ReserveStale(logs)
|
|
1426
|
+
case 6010:
|
|
1427
|
+
return new WithdrawTooSmall(logs)
|
|
1428
|
+
case 6011:
|
|
1429
|
+
return new WithdrawTooLarge(logs)
|
|
1430
|
+
case 6012:
|
|
1431
|
+
return new BorrowTooSmall(logs)
|
|
1432
|
+
case 6013:
|
|
1433
|
+
return new BorrowTooLarge(logs)
|
|
1434
|
+
case 6014:
|
|
1435
|
+
return new RepayTooSmall(logs)
|
|
1436
|
+
case 6015:
|
|
1437
|
+
return new LiquidationTooSmall(logs)
|
|
1438
|
+
case 6016:
|
|
1439
|
+
return new ObligationHealthy(logs)
|
|
1440
|
+
case 6017:
|
|
1441
|
+
return new ObligationStale(logs)
|
|
1442
|
+
case 6018:
|
|
1443
|
+
return new ObligationReserveLimit(logs)
|
|
1444
|
+
case 6019:
|
|
1445
|
+
return new InvalidObligationOwner(logs)
|
|
1446
|
+
case 6020:
|
|
1447
|
+
return new ObligationDepositsEmpty(logs)
|
|
1448
|
+
case 6021:
|
|
1449
|
+
return new ObligationBorrowsEmpty(logs)
|
|
1450
|
+
case 6022:
|
|
1451
|
+
return new ObligationDepositsZero(logs)
|
|
1452
|
+
case 6023:
|
|
1453
|
+
return new ObligationBorrowsZero(logs)
|
|
1454
|
+
case 6024:
|
|
1455
|
+
return new InvalidObligationCollateral(logs)
|
|
1456
|
+
case 6025:
|
|
1457
|
+
return new InvalidObligationLiquidity(logs)
|
|
1458
|
+
case 6026:
|
|
1459
|
+
return new ObligationCollateralEmpty(logs)
|
|
1460
|
+
case 6027:
|
|
1461
|
+
return new ObligationLiquidityEmpty(logs)
|
|
1462
|
+
case 6028:
|
|
1463
|
+
return new NegativeInterestRate(logs)
|
|
1464
|
+
case 6029:
|
|
1465
|
+
return new InvalidOracleConfig(logs)
|
|
1466
|
+
case 6030:
|
|
1467
|
+
return new InsufficientProtocolFeesToRedeem(logs)
|
|
1468
|
+
case 6031:
|
|
1469
|
+
return new FlashBorrowCpi(logs)
|
|
1470
|
+
case 6032:
|
|
1471
|
+
return new NoFlashRepayFound(logs)
|
|
1472
|
+
case 6033:
|
|
1473
|
+
return new InvalidFlashRepay(logs)
|
|
1474
|
+
case 6034:
|
|
1475
|
+
return new FlashRepayCpi(logs)
|
|
1476
|
+
case 6035:
|
|
1477
|
+
return new MultipleFlashBorrows(logs)
|
|
1478
|
+
case 6036:
|
|
1479
|
+
return new FlashLoansDisabled(logs)
|
|
1480
|
+
case 6037:
|
|
1481
|
+
return new SwitchboardV2Error(logs)
|
|
1482
|
+
case 6038:
|
|
1483
|
+
return new CouldNotDeserializeScope(logs)
|
|
1484
|
+
case 6039:
|
|
1485
|
+
return new PriceTooOld(logs)
|
|
1486
|
+
case 6040:
|
|
1487
|
+
return new PriceTooDivergentFromTwap(logs)
|
|
1488
|
+
case 6041:
|
|
1489
|
+
return new InvalidTwapPrice(logs)
|
|
1490
|
+
case 6042:
|
|
1491
|
+
return new GlobalEmergencyMode(logs)
|
|
1492
|
+
case 6043:
|
|
1493
|
+
return new InvalidFlag(logs)
|
|
1494
|
+
case 6044:
|
|
1495
|
+
return new PriceNotValid(logs)
|
|
1496
|
+
case 6045:
|
|
1497
|
+
return new PriceIsBiggerThanHeuristic(logs)
|
|
1498
|
+
case 6046:
|
|
1499
|
+
return new PriceIsLowerThanHeuristic(logs)
|
|
1500
|
+
case 6047:
|
|
1501
|
+
return new PriceIsZero(logs)
|
|
1502
|
+
case 6048:
|
|
1503
|
+
return new PriceConfidenceTooWide(logs)
|
|
1504
|
+
case 6049:
|
|
1505
|
+
return new IntegerOverflow(logs)
|
|
1506
|
+
case 6050:
|
|
1507
|
+
return new NoFarmForReserve(logs)
|
|
1508
|
+
case 6051:
|
|
1509
|
+
return new IncorrectInstructionInPosition(logs)
|
|
1510
|
+
case 6052:
|
|
1511
|
+
return new NoPriceFound(logs)
|
|
1512
|
+
case 6053:
|
|
1513
|
+
return new InvalidTwapConfig(logs)
|
|
1514
|
+
case 6054:
|
|
1515
|
+
return new InvalidPythPriceAccount(logs)
|
|
1516
|
+
case 6055:
|
|
1517
|
+
return new InvalidSwitchboardAccount(logs)
|
|
1518
|
+
case 6056:
|
|
1519
|
+
return new InvalidScopePriceAccount(logs)
|
|
1520
|
+
case 6057:
|
|
1521
|
+
return new ObligationCollateralLtvZero(logs)
|
|
1522
|
+
case 6058:
|
|
1523
|
+
return new InvalidObligationSeedsValue(logs)
|
|
1524
|
+
case 6059:
|
|
1525
|
+
return new InvalidObligationId(logs)
|
|
1526
|
+
case 6060:
|
|
1527
|
+
return new InvalidBorrowRateCurvePoint(logs)
|
|
1528
|
+
case 6061:
|
|
1529
|
+
return new InvalidUtilizationRate(logs)
|
|
1530
|
+
case 6062:
|
|
1531
|
+
return new CannotSocializeObligationWithCollateral(logs)
|
|
1532
|
+
case 6063:
|
|
1533
|
+
return new ObligationEmpty(logs)
|
|
1534
|
+
case 6064:
|
|
1535
|
+
return new WithdrawalCapReached(logs)
|
|
1536
|
+
case 6065:
|
|
1537
|
+
return new LastTimestampGreaterThanCurrent(logs)
|
|
1538
|
+
case 6066:
|
|
1539
|
+
return new LiquidationRewardTooSmall(logs)
|
|
1540
|
+
case 6067:
|
|
1541
|
+
return new IsolatedAssetTierViolation(logs)
|
|
1542
|
+
case 6068:
|
|
1543
|
+
return new InconsistentElevationGroup(logs)
|
|
1544
|
+
case 6069:
|
|
1545
|
+
return new InvalidElevationGroup(logs)
|
|
1546
|
+
case 6070:
|
|
1547
|
+
return new InvalidElevationGroupConfig(logs)
|
|
1548
|
+
case 6071:
|
|
1549
|
+
return new UnhealthyElevationGroupLtv(logs)
|
|
1550
|
+
case 6072:
|
|
1551
|
+
return new ElevationGroupNewLoansDisabled(logs)
|
|
1552
|
+
case 6073:
|
|
1553
|
+
return new ReserveDeprecated(logs)
|
|
1554
|
+
case 6074:
|
|
1555
|
+
return new ReferrerAccountNotInitialized(logs)
|
|
1556
|
+
case 6075:
|
|
1557
|
+
return new ReferrerAccountMintMissmatch(logs)
|
|
1558
|
+
case 6076:
|
|
1559
|
+
return new ReferrerAccountWrongAddress(logs)
|
|
1560
|
+
case 6077:
|
|
1561
|
+
return new ReferrerAccountReferrerMissmatch(logs)
|
|
1562
|
+
case 6078:
|
|
1563
|
+
return new ReferrerAccountMissing(logs)
|
|
1564
|
+
case 6079:
|
|
1565
|
+
return new InsufficientReferralFeesToRedeem(logs)
|
|
1566
|
+
case 6080:
|
|
1567
|
+
return new CpiDisabled(logs)
|
|
1568
|
+
case 6081:
|
|
1569
|
+
return new ShortUrlNotAsciiAlphanumeric(logs)
|
|
1570
|
+
case 6082:
|
|
1571
|
+
return new ReserveObsolete(logs)
|
|
1572
|
+
case 6083:
|
|
1573
|
+
return new ElevationGroupAlreadyActivated(logs)
|
|
1574
|
+
case 6084:
|
|
1575
|
+
return new ObligationInDeprecatedReserve(logs)
|
|
1576
|
+
case 6085:
|
|
1577
|
+
return new ReferrerStateOwnerMismatch(logs)
|
|
1578
|
+
case 6086:
|
|
1579
|
+
return new UserMetadataOwnerAlreadySet(logs)
|
|
1580
|
+
case 6087:
|
|
1581
|
+
return new CollateralNonLiquidatable(logs)
|
|
1582
|
+
case 6088:
|
|
1583
|
+
return new BorrowingDisabled(logs)
|
|
1584
|
+
case 6089:
|
|
1585
|
+
return new BorrowLimitExceeded(logs)
|
|
1586
|
+
case 6090:
|
|
1587
|
+
return new DepositLimitExceeded(logs)
|
|
1588
|
+
case 6091:
|
|
1589
|
+
return new BorrowingDisabledOutsideElevationGroup(logs)
|
|
1590
|
+
case 6092:
|
|
1591
|
+
return new NetValueRemainingTooSmall(logs)
|
|
1592
|
+
case 6093:
|
|
1593
|
+
return new WorseLTVBlocked(logs)
|
|
1594
|
+
case 6094:
|
|
1595
|
+
return new LiabilitiesBiggerThanAssets(logs)
|
|
1596
|
+
case 6095:
|
|
1597
|
+
return new ReserveTokenBalanceMismatch(logs)
|
|
1598
|
+
case 6096:
|
|
1599
|
+
return new ReserveVaultBalanceMismatch(logs)
|
|
1600
|
+
case 6097:
|
|
1601
|
+
return new ReserveAccountingMismatch(logs)
|
|
1602
|
+
case 6098:
|
|
1603
|
+
return new BorrowingAboveUtilizationRateDisabled(logs)
|
|
1604
|
+
case 6099:
|
|
1605
|
+
return new LiquidationBorrowFactorPriority(logs)
|
|
1606
|
+
case 6100:
|
|
1607
|
+
return new LiquidationLowestLTVPriority(logs)
|
|
1608
|
+
case 6101:
|
|
1609
|
+
return new ElevationGroupBorrowLimitExceeded(logs)
|
|
1610
|
+
case 6102:
|
|
1611
|
+
return new ElevationGroupWithoutDebtReserve(logs)
|
|
1612
|
+
case 6103:
|
|
1613
|
+
return new ElevationGroupMaxCollateralReserveZero(logs)
|
|
1614
|
+
case 6104:
|
|
1615
|
+
return new ElevationGroupHasAnotherDebtReserve(logs)
|
|
1616
|
+
case 6105:
|
|
1617
|
+
return new ElevationGroupDebtReserveAsCollateral(logs)
|
|
1618
|
+
case 6106:
|
|
1619
|
+
return new ObligationCollateralExceedsElevationGroupLimit(logs)
|
|
1620
|
+
case 6107:
|
|
1621
|
+
return new ObligationElevationGroupMultipleDebtReserve(logs)
|
|
1622
|
+
case 6108:
|
|
1623
|
+
return new UnsupportedTokenExtension(logs)
|
|
1624
|
+
case 6109:
|
|
1625
|
+
return new InvalidTokenAccount(logs)
|
|
1626
|
+
case 6110:
|
|
1627
|
+
return new DepositDisabledOutsideElevationGroup(logs)
|
|
1628
|
+
case 6111:
|
|
1629
|
+
return new CannotCalculateReferralAmountDueToSlotsMismatch(logs)
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
return null
|
|
1633
|
+
}
|