"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IntegerOverflow = exports.PriceConfidenceTooWide = exports.PriceIsZero = exports.PriceIsLowerThanHeuristic = exports.PriceIsBiggerThanHeuristic = exports.PriceNotValid = exports.InvalidFlag = exports.GlobalEmergencyMode = exports.InvalidTwapPrice = exports.PriceTooDivergentFromTwap = exports.PriceTooOld = exports.CouldNotDeserializeScope = exports.SwitchboardV2Error = exports.FlashLoansDisabled = exports.MultipleFlashBorrows = exports.FlashRepayCpi = exports.InvalidFlashRepay = exports.NoFlashRepayFound = exports.FlashBorrowCpi = exports.InsufficientProtocolFeesToRedeem = exports.InvalidOracleConfig = exports.NegativeInterestRate = exports.ObligationLiquidityEmpty = exports.ObligationCollateralEmpty = exports.InvalidObligationLiquidity = exports.InvalidObligationCollateral = exports.ObligationBorrowsZero = exports.ObligationDepositsZero = exports.ObligationBorrowsEmpty = exports.ObligationDepositsEmpty = exports.InvalidObligationOwner = exports.ObligationReserveLimit = exports.ObligationStale = exports.ObligationHealthy = exports.LiquidationTooSmall = exports.RepayTooSmall = exports.BorrowTooLarge = exports.BorrowTooSmall = exports.WithdrawTooLarge = exports.WithdrawTooSmall = exports.ReserveStale = exports.InsufficientLiquidity = exports.MathOverflow = exports.InvalidAccountInput = exports.InvalidSigner = exports.InvalidConfig = exports.InvalidAmount = exports.InvalidAccountOwner = exports.InvalidMarketOwner = exports.InvalidMarketAuthority = void 0;
exports.LiquidationBorrowFactorPriority = exports.BorrowingAboveUtilizationRateDisabled = exports.ReserveAccountingMismatch = exports.ReserveVaultBalanceMismatch = exports.ReserveTokenBalanceMismatch = exports.LiabilitiesBiggerThanAssets = exports.WorseLtvBlocked = exports.NetValueRemainingTooSmall = exports.BorrowingDisabledOutsideElevationGroup = exports.DepositLimitExceeded = exports.BorrowLimitExceeded = exports.BorrowingDisabled = exports.CollateralNonLiquidatable = exports.UserMetadataOwnerAlreadySet = exports.ReferrerStateOwnerMismatch = exports.ObligationInObsoleteReserve = exports.ElevationGroupAlreadyActivated = exports.ReserveObsolete = exports.ShortUrlNotAsciiAlphanumeric = exports.CpiDisabled = exports.InsufficientReferralFeesToRedeem = exports.ReferrerAccountMissing = exports.ReferrerAccountReferrerMissmatch = exports.ReferrerAccountWrongAddress = exports.ReferrerAccountMintMissmatch = exports.ReferrerAccountNotInitialized = exports.ReserveDeprecated = exports.ElevationGroupNewLoansDisabled = exports.UnhealthyElevationGroupLtv = exports.InvalidElevationGroupConfig = exports.InvalidElevationGroup = exports.InconsistentElevationGroup = exports.IsolatedAssetTierViolation = exports.LiquidationRewardTooSmall = exports.LastTimestampGreaterThanCurrent = exports.WithdrawalCapReached = exports.ObligationEmpty = exports.CannotSocializeObligationWithCollateral = exports.InvalidUtilizationRate = exports.InvalidBorrowRateCurvePoint = exports.DeprecatedInvalidObligationId = exports.InvalidObligationSeedsValue = exports.ObligationCollateralLtvZero = exports.InvalidScopePriceAccount = exports.InvalidSwitchboardAccount = exports.InvalidPythPriceAccount = exports.InvalidTwapConfig = exports.NoPriceFound = exports.IncorrectInstructionInPosition = exports.NoFarmForReserve = void 0;
exports.UserTokenBalanceMismatch = exports.WithdrawTicketRequiresFullRedemption = exports.WithdrawTicketStillValid = exports.WithdrawTicketRedemptionDisabled = exports.WithdrawTicketIssuanceDisabled = exports.BorrowOrderFillValueTooSmall = exports.ExpectationNotMet = exports.DebtReachedReserveDebtTerm = exports.BorrowOrderExecutionDisabled = exports.NonUpdatableOrderConfiguration = exports.ReserveDebtMaturityReached = exports.BorrowOrderFillTimeLimitExceeded = exports.BorrowOrderMinDebtTermInsufficient = exports.BorrowOrderMaxBorrowRateExceeded = exports.BorrowOrderDebtLiquidityMintMismatch = exports.TransactionIncludesRestrictedPrograms = exports.CannotUseSameReserve = exports.CTokenUsageBlocked = exports.ReserveHasNotReceivedInitialDeposit = exports.InitialAdminDepositExecuted = exports.NoUpgradeAuthority = exports.OrderCreationDisabled = exports.OperationNotPermittedMarketImmutable = exports.OperationNotPermittedWithCurrentObligationOrders = exports.OrderConfigurationNotSupportedByObligation = exports.InvalidOrderConfiguration = exports.OrderIndexOutOfBounds = exports.InsufficientRepayAmount = exports.RepayTooSmallForFullLiquidation = exports.FarmAccountsMissing = exports.WorseLtvThanUnhealthyLtv = exports.LowestLtvAssetsPriority = exports.ZeroMaxLtvAssetsInDeposits = exports.MaximumWithdrawValueZero = exports.ObligationCurrentlyMarkedForDeleveraging = exports.LendingMarketsMustMatch = exports.ObligationsMustMatch = exports.ObligationOwnersMustMatch = exports.CannotCalculateReferralAmountDueToSlotsMismatch = exports.DepositDisabledOutsideElevationGroup = exports.InvalidTokenAccount = exports.UnsupportedTokenExtension = exports.ObligationElevationGroupMultipleDebtReserve = exports.ObligationCollateralExceedsElevationGroupLimit = exports.ElevationGroupDebtReserveAsCollateral = exports.ElevationGroupHasAnotherDebtReserve = exports.ElevationGroupMaxCollateralReserveZero = exports.ElevationGroupWithoutDebtReserve = exports.ElevationGroupBorrowLimitExceeded = exports.LiquidationLowestLiquidationLtvPriority = void 0;
exports.ReserveRewardsDisabled = exports.MissingPermissioner = exports.OnlyComputeBudgetCompanionIxsAllowed = exports.ObligationHasActiveBorrowOrders = exports.ObligationOwnershipTransferNotApproved = exports.ObligationInvalidPendingOwner = exports.ObligationPendingOwnerNotSet = exports.ObligationOwnershipTransferNotInInitiatedState = exports.ObligationOwnershipTransferInProgress = exports.ReserveEmergencyMode = exports.ClonedReserveLiquidityMintMismatch = exports.CloneTargetReserveAlreadyInUse = exports.CloneSourceReserveDisabled = exports.WithdrawTicketFullyCancelled = exports.WithdrawTicketCancellationDisabled = exports.RolloverNotSupportedInElevationGroup = exports.ObligationBorrowRolloverMustProlongDebtTerm = exports.ObligationBorrowRolloverConfigMismatch = exports.PartialRolloverValueTooSmall = exports.ObligationAccountingMismatch = exports.BorrowRolloverExecutionDisabled = exports.ObligationBorrowRolloverTargetReserveMismatch = exports.ObligationBorrowRolloverNotEnabledByOwner = exports.ObligationBorrowOutsideRolloverWindow = exports.ObligationBorrowRolloverNotApplicable = exports.BorrowRolloverLiquidityMintMismatch = exports.InvalidObligationConfigUpdateSubject = exports.BorrowRolloverConfigurationDisabled = exports.WithdrawTicketProgressCallbackAccountsMissing = exports.InvalidWithdrawTicketProgressCallbackConfig = exports.WithdrawTicketValueTooSmall = exports.BorrowOrderValueTooSmall = exports.WithdrawTicketInvalid = exports.InvalidTokenAccountState = exports.WithdrawQueuedLiquidityValueTooSmall = void 0;
exports.fromCode = fromCode;
class InvalidMarketAuthority extends Error {
    logs;
    static code = 6000;
    code = 6000;
    name = "InvalidMarketAuthority";
    msg = "Market authority is invalid";
    constructor(logs) {
        super("6000: Market authority is invalid");
        this.logs = logs;
    }
}
exports.InvalidMarketAuthority = InvalidMarketAuthority;
class InvalidMarketOwner extends Error {
    logs;
    static code = 6001;
    code = 6001;
    name = "InvalidMarketOwner";
    msg = "Market owner is invalid";
    constructor(logs) {
        super("6001: Market owner is invalid");
        this.logs = logs;
    }
}
exports.InvalidMarketOwner = InvalidMarketOwner;
class InvalidAccountOwner extends Error {
    logs;
    static code = 6002;
    code = 6002;
    name = "InvalidAccountOwner";
    msg = "Input account owner is not the program address";
    constructor(logs) {
        super("6002: Input account owner is not the program address");
        this.logs = logs;
    }
}
exports.InvalidAccountOwner = InvalidAccountOwner;
class InvalidAmount extends Error {
    logs;
    static code = 6003;
    code = 6003;
    name = "InvalidAmount";
    msg = "Input amount is invalid";
    constructor(logs) {
        super("6003: Input amount is invalid");
        this.logs = logs;
    }
}
exports.InvalidAmount = InvalidAmount;
class InvalidConfig extends Error {
    logs;
    static code = 6004;
    code = 6004;
    name = "InvalidConfig";
    msg = "Input config value is invalid";
    constructor(logs) {
        super("6004: Input config value is invalid");
        this.logs = logs;
    }
}
exports.InvalidConfig = InvalidConfig;
class InvalidSigner extends Error {
    logs;
    static code = 6005;
    code = 6005;
    name = "InvalidSigner";
    msg = "Signer is not allowed to perform this action";
    constructor(logs) {
        super("6005: Signer is not allowed to perform this action");
        this.logs = logs;
    }
}
exports.InvalidSigner = InvalidSigner;
class InvalidAccountInput extends Error {
    logs;
    static code = 6006;
    code = 6006;
    name = "InvalidAccountInput";
    msg = "Invalid account input";
    constructor(logs) {
        super("6006: Invalid account input");
        this.logs = logs;
    }
}
exports.InvalidAccountInput = InvalidAccountInput;
class MathOverflow extends Error {
    logs;
    static code = 6007;
    code = 6007;
    name = "MathOverflow";
    msg = "Math operation overflow";
    constructor(logs) {
        super("6007: Math operation overflow");
        this.logs = logs;
    }
}
exports.MathOverflow = MathOverflow;
class InsufficientLiquidity extends Error {
    logs;
    static code = 6008;
    code = 6008;
    name = "InsufficientLiquidity";
    msg = "Insufficient liquidity available";
    constructor(logs) {
        super("6008: Insufficient liquidity available");
        this.logs = logs;
    }
}
exports.InsufficientLiquidity = InsufficientLiquidity;
class ReserveStale extends Error {
    logs;
    static code = 6009;
    code = 6009;
    name = "ReserveStale";
    msg = "Reserve state needs to be refreshed";
    constructor(logs) {
        super("6009: Reserve state needs to be refreshed");
        this.logs = logs;
    }
}
exports.ReserveStale = ReserveStale;
class WithdrawTooSmall extends Error {
    logs;
    static code = 6010;
    code = 6010;
    name = "WithdrawTooSmall";
    msg = "Withdraw amount too small";
    constructor(logs) {
        super("6010: Withdraw amount too small");
        this.logs = logs;
    }
}
exports.WithdrawTooSmall = WithdrawTooSmall;
class WithdrawTooLarge extends Error {
    logs;
    static code = 6011;
    code = 6011;
    name = "WithdrawTooLarge";
    msg = "Withdraw amount too large";
    constructor(logs) {
        super("6011: Withdraw amount too large");
        this.logs = logs;
    }
}
exports.WithdrawTooLarge = WithdrawTooLarge;
class BorrowTooSmall extends Error {
    logs;
    static code = 6012;
    code = 6012;
    name = "BorrowTooSmall";
    msg = "Borrow amount too small to receive liquidity after fees";
    constructor(logs) {
        super("6012: Borrow amount too small to receive liquidity after fees");
        this.logs = logs;
    }
}
exports.BorrowTooSmall = BorrowTooSmall;
class BorrowTooLarge extends Error {
    logs;
    static code = 6013;
    code = 6013;
    name = "BorrowTooLarge";
    msg = "Borrow amount too large for deposited collateral";
    constructor(logs) {
        super("6013: Borrow amount too large for deposited collateral");
        this.logs = logs;
    }
}
exports.BorrowTooLarge = BorrowTooLarge;
class RepayTooSmall extends Error {
    logs;
    static code = 6014;
    code = 6014;
    name = "RepayTooSmall";
    msg = "Repay amount too small to transfer liquidity";
    constructor(logs) {
        super("6014: Repay amount too small to transfer liquidity");
        this.logs = logs;
    }
}
exports.RepayTooSmall = RepayTooSmall;
class LiquidationTooSmall extends Error {
    logs;
    static code = 6015;
    code = 6015;
    name = "LiquidationTooSmall";
    msg = "Liquidation amount too small to receive collateral";
    constructor(logs) {
        super("6015: Liquidation amount too small to receive collateral");
        this.logs = logs;
    }
}
exports.LiquidationTooSmall = LiquidationTooSmall;
class ObligationHealthy extends Error {
    logs;
    static code = 6016;
    code = 6016;
    name = "ObligationHealthy";
    msg = "Cannot liquidate healthy obligations";
    constructor(logs) {
        super("6016: Cannot liquidate healthy obligations");
        this.logs = logs;
    }
}
exports.ObligationHealthy = ObligationHealthy;
class ObligationStale extends Error {
    logs;
    static code = 6017;
    code = 6017;
    name = "ObligationStale";
    msg = "Obligation state needs to be refreshed";
    constructor(logs) {
        super("6017: Obligation state needs to be refreshed");
        this.logs = logs;
    }
}
exports.ObligationStale = ObligationStale;
class ObligationReserveLimit extends Error {
    logs;
    static code = 6018;
    code = 6018;
    name = "ObligationReserveLimit";
    msg = "Obligation reserve limit exceeded";
    constructor(logs) {
        super("6018: Obligation reserve limit exceeded");
        this.logs = logs;
    }
}
exports.ObligationReserveLimit = ObligationReserveLimit;
class InvalidObligationOwner extends Error {
    logs;
    static code = 6019;
    code = 6019;
    name = "InvalidObligationOwner";
    msg = "Obligation owner is invalid";
    constructor(logs) {
        super("6019: Obligation owner is invalid");
        this.logs = logs;
    }
}
exports.InvalidObligationOwner = InvalidObligationOwner;
class ObligationDepositsEmpty extends Error {
    logs;
    static code = 6020;
    code = 6020;
    name = "ObligationDepositsEmpty";
    msg = "Obligation deposits are empty";
    constructor(logs) {
        super("6020: Obligation deposits are empty");
        this.logs = logs;
    }
}
exports.ObligationDepositsEmpty = ObligationDepositsEmpty;
class ObligationBorrowsEmpty extends Error {
    logs;
    static code = 6021;
    code = 6021;
    name = "ObligationBorrowsEmpty";
    msg = "Obligation borrows are empty";
    constructor(logs) {
        super("6021: Obligation borrows are empty");
        this.logs = logs;
    }
}
exports.ObligationBorrowsEmpty = ObligationBorrowsEmpty;
class ObligationDepositsZero extends Error {
    logs;
    static code = 6022;
    code = 6022;
    name = "ObligationDepositsZero";
    msg = "Obligation deposits have zero value";
    constructor(logs) {
        super("6022: Obligation deposits have zero value");
        this.logs = logs;
    }
}
exports.ObligationDepositsZero = ObligationDepositsZero;
class ObligationBorrowsZero extends Error {
    logs;
    static code = 6023;
    code = 6023;
    name = "ObligationBorrowsZero";
    msg = "Obligation borrows have zero value";
    constructor(logs) {
        super("6023: Obligation borrows have zero value");
        this.logs = logs;
    }
}
exports.ObligationBorrowsZero = ObligationBorrowsZero;
class InvalidObligationCollateral extends Error {
    logs;
    static code = 6024;
    code = 6024;
    name = "InvalidObligationCollateral";
    msg = "Invalid obligation collateral";
    constructor(logs) {
        super("6024: Invalid obligation collateral");
        this.logs = logs;
    }
}
exports.InvalidObligationCollateral = InvalidObligationCollateral;
class InvalidObligationLiquidity extends Error {
    logs;
    static code = 6025;
    code = 6025;
    name = "InvalidObligationLiquidity";
    msg = "Invalid obligation liquidity";
    constructor(logs) {
        super("6025: Invalid obligation liquidity");
        this.logs = logs;
    }
}
exports.InvalidObligationLiquidity = InvalidObligationLiquidity;
class ObligationCollateralEmpty extends Error {
    logs;
    static code = 6026;
    code = 6026;
    name = "ObligationCollateralEmpty";
    msg = "Obligation collateral is empty";
    constructor(logs) {
        super("6026: Obligation collateral is empty");
        this.logs = logs;
    }
}
exports.ObligationCollateralEmpty = ObligationCollateralEmpty;
class ObligationLiquidityEmpty extends Error {
    logs;
    static code = 6027;
    code = 6027;
    name = "ObligationLiquidityEmpty";
    msg = "Obligation liquidity is empty";
    constructor(logs) {
        super("6027: Obligation liquidity is empty");
        this.logs = logs;
    }
}
exports.ObligationLiquidityEmpty = ObligationLiquidityEmpty;
class NegativeInterestRate extends Error {
    logs;
    static code = 6028;
    code = 6028;
    name = "NegativeInterestRate";
    msg = "Interest rate is negative";
    constructor(logs) {
        super("6028: Interest rate is negative");
        this.logs = logs;
    }
}
exports.NegativeInterestRate = NegativeInterestRate;
class InvalidOracleConfig extends Error {
    logs;
    static code = 6029;
    code = 6029;
    name = "InvalidOracleConfig";
    msg = "Input oracle config is invalid";
    constructor(logs) {
        super("6029: Input oracle config is invalid");
        this.logs = logs;
    }
}
exports.InvalidOracleConfig = InvalidOracleConfig;
class InsufficientProtocolFeesToRedeem extends Error {
    logs;
    static code = 6030;
    code = 6030;
    name = "InsufficientProtocolFeesToRedeem";
    msg = "Insufficient protocol fees to claim or no liquidity available";
    constructor(logs) {
        super("6030: Insufficient protocol fees to claim or no liquidity available");
        this.logs = logs;
    }
}
exports.InsufficientProtocolFeesToRedeem = InsufficientProtocolFeesToRedeem;
class FlashBorrowCpi extends Error {
    logs;
    static code = 6031;
    code = 6031;
    name = "FlashBorrowCpi";
    msg = "No cpi flash borrows allowed";
    constructor(logs) {
        super("6031: No cpi flash borrows allowed");
        this.logs = logs;
    }
}
exports.FlashBorrowCpi = FlashBorrowCpi;
class NoFlashRepayFound extends Error {
    logs;
    static code = 6032;
    code = 6032;
    name = "NoFlashRepayFound";
    msg = "No corresponding repay found for flash borrow";
    constructor(logs) {
        super("6032: No corresponding repay found for flash borrow");
        this.logs = logs;
    }
}
exports.NoFlashRepayFound = NoFlashRepayFound;
class InvalidFlashRepay extends Error {
    logs;
    static code = 6033;
    code = 6033;
    name = "InvalidFlashRepay";
    msg = "Invalid repay found";
    constructor(logs) {
        super("6033: Invalid repay found");
        this.logs = logs;
    }
}
exports.InvalidFlashRepay = InvalidFlashRepay;
class FlashRepayCpi extends Error {
    logs;
    static code = 6034;
    code = 6034;
    name = "FlashRepayCpi";
    msg = "No cpi flash repays allowed";
    constructor(logs) {
        super("6034: No cpi flash repays allowed");
        this.logs = logs;
    }
}
exports.FlashRepayCpi = FlashRepayCpi;
class MultipleFlashBorrows extends Error {
    logs;
    static code = 6035;
    code = 6035;
    name = "MultipleFlashBorrows";
    msg = "Multiple flash borrows not allowed in the same transaction";
    constructor(logs) {
        super("6035: Multiple flash borrows not allowed in the same transaction");
        this.logs = logs;
    }
}
exports.MultipleFlashBorrows = MultipleFlashBorrows;
class FlashLoansDisabled extends Error {
    logs;
    static code = 6036;
    code = 6036;
    name = "FlashLoansDisabled";
    msg = "Flash loans are disabled for this reserve";
    constructor(logs) {
        super("6036: Flash loans are disabled for this reserve");
        this.logs = logs;
    }
}
exports.FlashLoansDisabled = FlashLoansDisabled;
class SwitchboardV2Error extends Error {
    logs;
    static code = 6037;
    code = 6037;
    name = "SwitchboardV2Error";
    msg = "Switchboard error";
    constructor(logs) {
        super("6037: Switchboard error");
        this.logs = logs;
    }
}
exports.SwitchboardV2Error = SwitchboardV2Error;
class CouldNotDeserializeScope extends Error {
    logs;
    static code = 6038;
    code = 6038;
    name = "CouldNotDeserializeScope";
    msg = "Cannot deserialize the scope price account";
    constructor(logs) {
        super("6038: Cannot deserialize the scope price account");
        this.logs = logs;
    }
}
exports.CouldNotDeserializeScope = CouldNotDeserializeScope;
class PriceTooOld extends Error {
    logs;
    static code = 6039;
    code = 6039;
    name = "PriceTooOld";
    msg = "Price too old";
    constructor(logs) {
        super("6039: Price too old");
        this.logs = logs;
    }
}
exports.PriceTooOld = PriceTooOld;
class PriceTooDivergentFromTwap extends Error {
    logs;
    static code = 6040;
    code = 6040;
    name = "PriceTooDivergentFromTwap";
    msg = "Price too divergent from twap";
    constructor(logs) {
        super("6040: Price too divergent from twap");
        this.logs = logs;
    }
}
exports.PriceTooDivergentFromTwap = PriceTooDivergentFromTwap;
class InvalidTwapPrice extends Error {
    logs;
    static code = 6041;
    code = 6041;
    name = "InvalidTwapPrice";
    msg = "Invalid twap price";
    constructor(logs) {
        super("6041: Invalid twap price");
        this.logs = logs;
    }
}
exports.InvalidTwapPrice = InvalidTwapPrice;
class GlobalEmergencyMode extends Error {
    logs;
    static code = 6042;
    code = 6042;
    name = "GlobalEmergencyMode";
    msg = "Emergency mode is enabled";
    constructor(logs) {
        super("6042: Emergency mode is enabled");
        this.logs = logs;
    }
}
exports.GlobalEmergencyMode = GlobalEmergencyMode;
class InvalidFlag extends Error {
    logs;
    static code = 6043;
    code = 6043;
    name = "InvalidFlag";
    msg = "Invalid lending market config";
    constructor(logs) {
        super("6043: Invalid lending market config");
        this.logs = logs;
    }
}
exports.InvalidFlag = InvalidFlag;
class PriceNotValid extends Error {
    logs;
    static code = 6044;
    code = 6044;
    name = "PriceNotValid";
    msg = "Price is not valid";
    constructor(logs) {
        super("6044: Price is not valid");
        this.logs = logs;
    }
}
exports.PriceNotValid = PriceNotValid;
class PriceIsBiggerThanHeuristic extends Error {
    logs;
    static code = 6045;
    code = 6045;
    name = "PriceIsBiggerThanHeuristic";
    msg = "Price is bigger than allowed by heuristic";
    constructor(logs) {
        super("6045: Price is bigger than allowed by heuristic");
        this.logs = logs;
    }
}
exports.PriceIsBiggerThanHeuristic = PriceIsBiggerThanHeuristic;
class PriceIsLowerThanHeuristic extends Error {
    logs;
    static code = 6046;
    code = 6046;
    name = "PriceIsLowerThanHeuristic";
    msg = "Price lower than allowed by heuristic";
    constructor(logs) {
        super("6046: Price lower than allowed by heuristic");
        this.logs = logs;
    }
}
exports.PriceIsLowerThanHeuristic = PriceIsLowerThanHeuristic;
class PriceIsZero extends Error {
    logs;
    static code = 6047;
    code = 6047;
    name = "PriceIsZero";
    msg = "Price is zero";
    constructor(logs) {
        super("6047: Price is zero");
        this.logs = logs;
    }
}
exports.PriceIsZero = PriceIsZero;
class PriceConfidenceTooWide extends Error {
    logs;
    static code = 6048;
    code = 6048;
    name = "PriceConfidenceTooWide";
    msg = "Price confidence too wide";
    constructor(logs) {
        super("6048: Price confidence too wide");
        this.logs = logs;
    }
}
exports.PriceConfidenceTooWide = PriceConfidenceTooWide;
class IntegerOverflow extends Error {
    logs;
    static code = 6049;
    code = 6049;
    name = "IntegerOverflow";
    msg = "Conversion between integers failed";
    constructor(logs) {
        super("6049: Conversion between integers failed");
        this.logs = logs;
    }
}
exports.IntegerOverflow = IntegerOverflow;
class NoFarmForReserve extends Error {
    logs;
    static code = 6050;
    code = 6050;
    name = "NoFarmForReserve";
    msg = "This reserve does not have a farm";
    constructor(logs) {
        super("6050: This reserve does not have a farm");
        this.logs = logs;
    }
}
exports.NoFarmForReserve = NoFarmForReserve;
class IncorrectInstructionInPosition extends Error {
    logs;
    static code = 6051;
    code = 6051;
    name = "IncorrectInstructionInPosition";
    msg = "Wrong instruction at expected position";
    constructor(logs) {
        super("6051: Wrong instruction at expected position");
        this.logs = logs;
    }
}
exports.IncorrectInstructionInPosition = IncorrectInstructionInPosition;
class NoPriceFound extends Error {
    logs;
    static code = 6052;
    code = 6052;
    name = "NoPriceFound";
    msg = "No price found";
    constructor(logs) {
        super("6052: No price found");
        this.logs = logs;
    }
}
exports.NoPriceFound = NoPriceFound;
class InvalidTwapConfig extends Error {
    logs;
    static code = 6053;
    code = 6053;
    name = "InvalidTwapConfig";
    msg = "Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap";
    constructor(logs) {
        super("6053: Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap");
        this.logs = logs;
    }
}
exports.InvalidTwapConfig = InvalidTwapConfig;
class InvalidPythPriceAccount extends Error {
    logs;
    static code = 6054;
    code = 6054;
    name = "InvalidPythPriceAccount";
    msg = "Pyth price account does not match configuration";
    constructor(logs) {
        super("6054: Pyth price account does not match configuration");
        this.logs = logs;
    }
}
exports.InvalidPythPriceAccount = InvalidPythPriceAccount;
class InvalidSwitchboardAccount extends Error {
    logs;
    static code = 6055;
    code = 6055;
    name = "InvalidSwitchboardAccount";
    msg = "Switchboard account(s) do not match configuration";
    constructor(logs) {
        super("6055: Switchboard account(s) do not match configuration");
        this.logs = logs;
    }
}
exports.InvalidSwitchboardAccount = InvalidSwitchboardAccount;
class InvalidScopePriceAccount extends Error {
    logs;
    static code = 6056;
    code = 6056;
    name = "InvalidScopePriceAccount";
    msg = "Scope price account does not match configuration";
    constructor(logs) {
        super("6056: Scope price account does not match configuration");
        this.logs = logs;
    }
}
exports.InvalidScopePriceAccount = InvalidScopePriceAccount;
class ObligationCollateralLtvZero extends Error {
    logs;
    static code = 6057;
    code = 6057;
    name = "ObligationCollateralLtvZero";
    msg = "The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals";
    constructor(logs) {
        super("6057: The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals");
        this.logs = logs;
    }
}
exports.ObligationCollateralLtvZero = ObligationCollateralLtvZero;
class InvalidObligationSeedsValue extends Error {
    logs;
    static code = 6058;
    code = 6058;
    name = "InvalidObligationSeedsValue";
    msg = "Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2";
    constructor(logs) {
        super("6058: Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2");
        this.logs = logs;
    }
}
exports.InvalidObligationSeedsValue = InvalidObligationSeedsValue;
class DeprecatedInvalidObligationId extends Error {
    logs;
    static code = 6059;
    code = 6059;
    name = "DeprecatedInvalidObligationId";
    msg = "[DEPRECATED] Obligation id must be 0";
    constructor(logs) {
        super("6059: [DEPRECATED] Obligation id must be 0");
        this.logs = logs;
    }
}
exports.DeprecatedInvalidObligationId = DeprecatedInvalidObligationId;
class InvalidBorrowRateCurvePoint extends Error {
    logs;
    static code = 6060;
    code = 6060;
    name = "InvalidBorrowRateCurvePoint";
    msg = "Invalid borrow rate curve point";
    constructor(logs) {
        super("6060: Invalid borrow rate curve point");
        this.logs = logs;
    }
}
exports.InvalidBorrowRateCurvePoint = InvalidBorrowRateCurvePoint;
class InvalidUtilizationRate extends Error {
    logs;
    static code = 6061;
    code = 6061;
    name = "InvalidUtilizationRate";
    msg = "Invalid utilization rate";
    constructor(logs) {
        super("6061: Invalid utilization rate");
        this.logs = logs;
    }
}
exports.InvalidUtilizationRate = InvalidUtilizationRate;
class CannotSocializeObligationWithCollateral extends Error {
    logs;
    static code = 6062;
    code = 6062;
    name = "CannotSocializeObligationWithCollateral";
    msg = "Obligation hasn't been fully liquidated and debt cannot be socialized.";
    constructor(logs) {
        super("6062: Obligation hasn't been fully liquidated and debt cannot be socialized.");
        this.logs = logs;
    }
}
exports.CannotSocializeObligationWithCollateral = CannotSocializeObligationWithCollateral;
class ObligationEmpty extends Error {
    logs;
    static code = 6063;
    code = 6063;
    name = "ObligationEmpty";
    msg = "Obligation has no borrows or deposits.";
    constructor(logs) {
        super("6063: Obligation has no borrows or deposits.");
        this.logs = logs;
    }
}
exports.ObligationEmpty = ObligationEmpty;
class WithdrawalCapReached extends Error {
    logs;
    static code = 6064;
    code = 6064;
    name = "WithdrawalCapReached";
    msg = "Withdrawal cap is reached";
    constructor(logs) {
        super("6064: Withdrawal cap is reached");
        this.logs = logs;
    }
}
exports.WithdrawalCapReached = WithdrawalCapReached;
class LastTimestampGreaterThanCurrent extends Error {
    logs;
    static code = 6065;
    code = 6065;
    name = "LastTimestampGreaterThanCurrent";
    msg = "The last interval start timestamp is greater than the current timestamp";
    constructor(logs) {
        super("6065: The last interval start timestamp is greater than the current timestamp");
        this.logs = logs;
    }
}
exports.LastTimestampGreaterThanCurrent = LastTimestampGreaterThanCurrent;
class LiquidationRewardTooSmall extends Error {
    logs;
    static code = 6066;
    code = 6066;
    name = "LiquidationRewardTooSmall";
    msg = "The reward amount is less than the minimum acceptable received liquidity";
    constructor(logs) {
        super("6066: The reward amount is less than the minimum acceptable received liquidity");
        this.logs = logs;
    }
}
exports.LiquidationRewardTooSmall = LiquidationRewardTooSmall;
class IsolatedAssetTierViolation extends Error {
    logs;
    static code = 6067;
    code = 6067;
    name = "IsolatedAssetTierViolation";
    msg = "Isolated Asset Tier Violation";
    constructor(logs) {
        super("6067: Isolated Asset Tier Violation");
        this.logs = logs;
    }
}
exports.IsolatedAssetTierViolation = IsolatedAssetTierViolation;
class InconsistentElevationGroup extends Error {
    logs;
    static code = 6068;
    code = 6068;
    name = "InconsistentElevationGroup";
    msg = "The obligation's elevation group and the reserve's are not the same";
    constructor(logs) {
        super("6068: The obligation's elevation group and the reserve's are not the same");
        this.logs = logs;
    }
}
exports.InconsistentElevationGroup = InconsistentElevationGroup;
class InvalidElevationGroup extends Error {
    logs;
    static code = 6069;
    code = 6069;
    name = "InvalidElevationGroup";
    msg = "The elevation group chosen for the reserve does not exist in the lending market";
    constructor(logs) {
        super("6069: The elevation group chosen for the reserve does not exist in the lending market");
        this.logs = logs;
    }
}
exports.InvalidElevationGroup = InvalidElevationGroup;
class InvalidElevationGroupConfig extends Error {
    logs;
    static code = 6070;
    code = 6070;
    name = "InvalidElevationGroupConfig";
    msg = "The elevation group updated has wrong parameters set";
    constructor(logs) {
        super("6070: The elevation group updated has wrong parameters set");
        this.logs = logs;
    }
}
exports.InvalidElevationGroupConfig = InvalidElevationGroupConfig;
class UnhealthyElevationGroupLtv extends Error {
    logs;
    static code = 6071;
    code = 6071;
    name = "UnhealthyElevationGroupLtv";
    msg = "The current obligation must have most or all its debt repaid before changing the elevation group";
    constructor(logs) {
        super("6071: The current obligation must have most or all its debt repaid before changing the elevation group");
        this.logs = logs;
    }
}
exports.UnhealthyElevationGroupLtv = UnhealthyElevationGroupLtv;
class ElevationGroupNewLoansDisabled extends Error {
    logs;
    static code = 6072;
    code = 6072;
    name = "ElevationGroupNewLoansDisabled";
    msg = "Elevation group does not accept any new loans or any new borrows/withdrawals";
    constructor(logs) {
        super("6072: Elevation group does not accept any new loans or any new borrows/withdrawals");
        this.logs = logs;
    }
}
exports.ElevationGroupNewLoansDisabled = ElevationGroupNewLoansDisabled;
class ReserveDeprecated extends Error {
    logs;
    static code = 6073;
    code = 6073;
    name = "ReserveDeprecated";
    msg = "Reserve was deprecated, no longer usable";
    constructor(logs) {
        super("6073: Reserve was deprecated, no longer usable");
        this.logs = logs;
    }
}
exports.ReserveDeprecated = ReserveDeprecated;
class ReferrerAccountNotInitialized extends Error {
    logs;
    static code = 6074;
    code = 6074;
    name = "ReferrerAccountNotInitialized";
    msg = "Referrer account not initialized";
    constructor(logs) {
        super("6074: Referrer account not initialized");
        this.logs = logs;
    }
}
exports.ReferrerAccountNotInitialized = ReferrerAccountNotInitialized;
class ReferrerAccountMintMissmatch extends Error {
    logs;
    static code = 6075;
    code = 6075;
    name = "ReferrerAccountMintMissmatch";
    msg = "Referrer account mint does not match the operation reserve mint";
    constructor(logs) {
        super("6075: Referrer account mint does not match the operation reserve mint");
        this.logs = logs;
    }
}
exports.ReferrerAccountMintMissmatch = ReferrerAccountMintMissmatch;
class ReferrerAccountWrongAddress extends Error {
    logs;
    static code = 6076;
    code = 6076;
    name = "ReferrerAccountWrongAddress";
    msg = "Referrer account address is not a valid program address";
    constructor(logs) {
        super("6076: Referrer account address is not a valid program address");
        this.logs = logs;
    }
}
exports.ReferrerAccountWrongAddress = ReferrerAccountWrongAddress;
class ReferrerAccountReferrerMissmatch extends Error {
    logs;
    static code = 6077;
    code = 6077;
    name = "ReferrerAccountReferrerMissmatch";
    msg = "Referrer account referrer does not match the owner referrer";
    constructor(logs) {
        super("6077: Referrer account referrer does not match the owner referrer");
        this.logs = logs;
    }
}
exports.ReferrerAccountReferrerMissmatch = ReferrerAccountReferrerMissmatch;
class ReferrerAccountMissing extends Error {
    logs;
    static code = 6078;
    code = 6078;
    name = "ReferrerAccountMissing";
    msg = "Referrer account missing for obligation with referrer";
    constructor(logs) {
        super("6078: Referrer account missing for obligation with referrer");
        this.logs = logs;
    }
}
exports.ReferrerAccountMissing = ReferrerAccountMissing;
class InsufficientReferralFeesToRedeem extends Error {
    logs;
    static code = 6079;
    code = 6079;
    name = "InsufficientReferralFeesToRedeem";
    msg = "Insufficient referral fees to claim or no liquidity available";
    constructor(logs) {
        super("6079: Insufficient referral fees to claim or no liquidity available");
        this.logs = logs;
    }
}
exports.InsufficientReferralFeesToRedeem = InsufficientReferralFeesToRedeem;
class CpiDisabled extends Error {
    logs;
    static code = 6080;
    code = 6080;
    name = "CpiDisabled";
    msg = "CPI disabled for this instruction";
    constructor(logs) {
        super("6080: CPI disabled for this instruction");
        this.logs = logs;
    }
}
exports.CpiDisabled = CpiDisabled;
class ShortUrlNotAsciiAlphanumeric extends Error {
    logs;
    static code = 6081;
    code = 6081;
    name = "ShortUrlNotAsciiAlphanumeric";
    msg = "Referrer short_url is not ascii alphanumeric";
    constructor(logs) {
        super("6081: Referrer short_url is not ascii alphanumeric");
        this.logs = logs;
    }
}
exports.ShortUrlNotAsciiAlphanumeric = ShortUrlNotAsciiAlphanumeric;
class ReserveObsolete extends Error {
    logs;
    static code = 6082;
    code = 6082;
    name = "ReserveObsolete";
    msg = "Reserve is marked as obsolete";
    constructor(logs) {
        super("6082: Reserve is marked as obsolete");
        this.logs = logs;
    }
}
exports.ReserveObsolete = ReserveObsolete;
class ElevationGroupAlreadyActivated extends Error {
    logs;
    static code = 6083;
    code = 6083;
    name = "ElevationGroupAlreadyActivated";
    msg = "Obligation already part of the same elevation group";
    constructor(logs) {
        super("6083: Obligation already part of the same elevation group");
        this.logs = logs;
    }
}
exports.ElevationGroupAlreadyActivated = ElevationGroupAlreadyActivated;
class ObligationInObsoleteReserve extends Error {
    logs;
    static code = 6084;
    code = 6084;
    name = "ObligationInObsoleteReserve";
    msg = "Obligation has a deposit or borrow in an obsolete reserve";
    constructor(logs) {
        super("6084: Obligation has a deposit or borrow in an obsolete reserve");
        this.logs = logs;
    }
}
exports.ObligationInObsoleteReserve = ObligationInObsoleteReserve;
class ReferrerStateOwnerMismatch extends Error {
    logs;
    static code = 6085;
    code = 6085;
    name = "ReferrerStateOwnerMismatch";
    msg = "Referrer state owner does not match the given signer";
    constructor(logs) {
        super("6085: Referrer state owner does not match the given signer");
        this.logs = logs;
    }
}
exports.ReferrerStateOwnerMismatch = ReferrerStateOwnerMismatch;
class UserMetadataOwnerAlreadySet extends Error {
    logs;
    static code = 6086;
    code = 6086;
    name = "UserMetadataOwnerAlreadySet";
    msg = "User metadata owner is already set";
    constructor(logs) {
        super("6086: User metadata owner is already set");
        this.logs = logs;
    }
}
exports.UserMetadataOwnerAlreadySet = UserMetadataOwnerAlreadySet;
class CollateralNonLiquidatable extends Error {
    logs;
    static code = 6087;
    code = 6087;
    name = "CollateralNonLiquidatable";
    msg = "This collateral cannot be liquidated (LTV set to 0)";
    constructor(logs) {
        super("6087: This collateral cannot be liquidated (LTV set to 0)");
        this.logs = logs;
    }
}
exports.CollateralNonLiquidatable = CollateralNonLiquidatable;
class BorrowingDisabled extends Error {
    logs;
    static code = 6088;
    code = 6088;
    name = "BorrowingDisabled";
    msg = "Borrowing is disabled";
    constructor(logs) {
        super("6088: Borrowing is disabled");
        this.logs = logs;
    }
}
exports.BorrowingDisabled = BorrowingDisabled;
class BorrowLimitExceeded extends Error {
    logs;
    static code = 6089;
    code = 6089;
    name = "BorrowLimitExceeded";
    msg = "Cannot borrow above borrow limit";
    constructor(logs) {
        super("6089: Cannot borrow above borrow limit");
        this.logs = logs;
    }
}
exports.BorrowLimitExceeded = BorrowLimitExceeded;
class DepositLimitExceeded extends Error {
    logs;
    static code = 6090;
    code = 6090;
    name = "DepositLimitExceeded";
    msg = "Cannot deposit above deposit limit";
    constructor(logs) {
        super("6090: Cannot deposit above deposit limit");
        this.logs = logs;
    }
}
exports.DepositLimitExceeded = DepositLimitExceeded;
class BorrowingDisabledOutsideElevationGroup extends Error {
    logs;
    static code = 6091;
    code = 6091;
    name = "BorrowingDisabledOutsideElevationGroup";
    msg = "Reserve does not accept any new borrows outside elevation group";
    constructor(logs) {
        super("6091: Reserve does not accept any new borrows outside elevation group");
        this.logs = logs;
    }
}
exports.BorrowingDisabledOutsideElevationGroup = BorrowingDisabledOutsideElevationGroup;
class NetValueRemainingTooSmall extends Error {
    logs;
    static code = 6092;
    code = 6092;
    name = "NetValueRemainingTooSmall";
    msg = "Net value remaining too small";
    constructor(logs) {
        super("6092: Net value remaining too small");
        this.logs = logs;
    }
}
exports.NetValueRemainingTooSmall = NetValueRemainingTooSmall;
class WorseLtvBlocked extends Error {
    logs;
    static code = 6093;
    code = 6093;
    name = "WorseLtvBlocked";
    msg = "Cannot get the obligation in a worse position";
    constructor(logs) {
        super("6093: Cannot get the obligation in a worse position");
        this.logs = logs;
    }
}
exports.WorseLtvBlocked = WorseLtvBlocked;
class LiabilitiesBiggerThanAssets extends Error {
    logs;
    static code = 6094;
    code = 6094;
    name = "LiabilitiesBiggerThanAssets";
    msg = "Cannot have more liabilities than assets in a position";
    constructor(logs) {
        super("6094: Cannot have more liabilities than assets in a position");
        this.logs = logs;
    }
}
exports.LiabilitiesBiggerThanAssets = LiabilitiesBiggerThanAssets;
class ReserveTokenBalanceMismatch extends Error {
    logs;
    static code = 6095;
    code = 6095;
    name = "ReserveTokenBalanceMismatch";
    msg = "Reserve state and token account cannot drift";
    constructor(logs) {
        super("6095: Reserve state and token account cannot drift");
        this.logs = logs;
    }
}
exports.ReserveTokenBalanceMismatch = ReserveTokenBalanceMismatch;
class ReserveVaultBalanceMismatch extends Error {
    logs;
    static code = 6096;
    code = 6096;
    name = "ReserveVaultBalanceMismatch";
    msg = "Reserve token account has been unexpectedly modified";
    constructor(logs) {
        super("6096: Reserve token account has been unexpectedly modified");
        this.logs = logs;
    }
}
exports.ReserveVaultBalanceMismatch = ReserveVaultBalanceMismatch;
class ReserveAccountingMismatch extends Error {
    logs;
    static code = 6097;
    code = 6097;
    name = "ReserveAccountingMismatch";
    msg = "Reserve internal state accounting has been unexpectedly modified";
    constructor(logs) {
        super("6097: Reserve internal state accounting has been unexpectedly modified");
        this.logs = logs;
    }
}
exports.ReserveAccountingMismatch = ReserveAccountingMismatch;
class BorrowingAboveUtilizationRateDisabled extends Error {
    logs;
    static code = 6098;
    code = 6098;
    name = "BorrowingAboveUtilizationRateDisabled";
    msg = "Borrowing above set utilization rate is disabled";
    constructor(logs) {
        super("6098: Borrowing above set utilization rate is disabled");
        this.logs = logs;
    }
}
exports.BorrowingAboveUtilizationRateDisabled = BorrowingAboveUtilizationRateDisabled;
class LiquidationBorrowFactorPriority extends Error {
    logs;
    static code = 6099;
    code = 6099;
    name = "LiquidationBorrowFactorPriority";
    msg = "Liquidation must prioritize the debt with the highest borrow factor";
    constructor(logs) {
        super("6099: Liquidation must prioritize the debt with the highest borrow factor");
        this.logs = logs;
    }
}
exports.LiquidationBorrowFactorPriority = LiquidationBorrowFactorPriority;
class LiquidationLowestLiquidationLtvPriority extends Error {
    logs;
    static code = 6100;
    code = 6100;
    name = "LiquidationLowestLiquidationLtvPriority";
    msg = "Liquidation must prioritize the collateral with the lowest liquidation LTV";
    constructor(logs) {
        super("6100: Liquidation must prioritize the collateral with the lowest liquidation LTV");
        this.logs = logs;
    }
}
exports.LiquidationLowestLiquidationLtvPriority = LiquidationLowestLiquidationLtvPriority;
class ElevationGroupBorrowLimitExceeded extends Error {
    logs;
    static code = 6101;
    code = 6101;
    name = "ElevationGroupBorrowLimitExceeded";
    msg = "Elevation group borrow limit exceeded";
    constructor(logs) {
        super("6101: Elevation group borrow limit exceeded");
        this.logs = logs;
    }
}
exports.ElevationGroupBorrowLimitExceeded = ElevationGroupBorrowLimitExceeded;
class ElevationGroupWithoutDebtReserve extends Error {
    logs;
    static code = 6102;
    code = 6102;
    name = "ElevationGroupWithoutDebtReserve";
    msg = "The elevation group does not have a debt reserve defined";
    constructor(logs) {
        super("6102: The elevation group does not have a debt reserve defined");
        this.logs = logs;
    }
}
exports.ElevationGroupWithoutDebtReserve = ElevationGroupWithoutDebtReserve;
class ElevationGroupMaxCollateralReserveZero extends Error {
    logs;
    static code = 6103;
    code = 6103;
    name = "ElevationGroupMaxCollateralReserveZero";
    msg = "The elevation group does not allow any collateral reserves";
    constructor(logs) {
        super("6103: The elevation group does not allow any collateral reserves");
        this.logs = logs;
    }
}
exports.ElevationGroupMaxCollateralReserveZero = ElevationGroupMaxCollateralReserveZero;
class ElevationGroupHasAnotherDebtReserve extends Error {
    logs;
    static code = 6104;
    code = 6104;
    name = "ElevationGroupHasAnotherDebtReserve";
    msg = "In elevation group attempt to borrow from a reserve that is not the debt reserve";
    constructor(logs) {
        super("6104: In elevation group attempt to borrow from a reserve that is not the debt reserve");
        this.logs = logs;
    }
}
exports.ElevationGroupHasAnotherDebtReserve = ElevationGroupHasAnotherDebtReserve;
class ElevationGroupDebtReserveAsCollateral extends Error {
    logs;
    static code = 6105;
    code = 6105;
    name = "ElevationGroupDebtReserveAsCollateral";
    msg = "The elevation group's debt reserve cannot be used as a collateral reserve";
    constructor(logs) {
        super("6105: The elevation group's debt reserve cannot be used as a collateral reserve");
        this.logs = logs;
    }
}
exports.ElevationGroupDebtReserveAsCollateral = ElevationGroupDebtReserveAsCollateral;
class ObligationCollateralExceedsElevationGroupLimit extends Error {
    logs;
    static code = 6106;
    code = 6106;
    name = "ObligationCollateralExceedsElevationGroupLimit";
    msg = "Obligation have more collateral than the maximum allowed by the elevation group";
    constructor(logs) {
        super("6106: Obligation have more collateral than the maximum allowed by the elevation group");
        this.logs = logs;
    }
}
exports.ObligationCollateralExceedsElevationGroupLimit = ObligationCollateralExceedsElevationGroupLimit;
class ObligationElevationGroupMultipleDebtReserve extends Error {
    logs;
    static code = 6107;
    code = 6107;
    name = "ObligationElevationGroupMultipleDebtReserve";
    msg = "Obligation is an elevation group but have more than one debt reserve";
    constructor(logs) {
        super("6107: Obligation is an elevation group but have more than one debt reserve");
        this.logs = logs;
    }
}
exports.ObligationElevationGroupMultipleDebtReserve = ObligationElevationGroupMultipleDebtReserve;
class UnsupportedTokenExtension extends Error {
    logs;
    static code = 6108;
    code = 6108;
    name = "UnsupportedTokenExtension";
    msg = "Mint has a token (2022) extension that is not supported";
    constructor(logs) {
        super("6108: Mint has a token (2022) extension that is not supported");
        this.logs = logs;
    }
}
exports.UnsupportedTokenExtension = UnsupportedTokenExtension;
class InvalidTokenAccount extends Error {
    logs;
    static code = 6109;
    code = 6109;
    name = "InvalidTokenAccount";
    msg = "Can't have an spl token mint with a t22 account";
    constructor(logs) {
        super("6109: Can't have an spl token mint with a t22 account");
        this.logs = logs;
    }
}
exports.InvalidTokenAccount = InvalidTokenAccount;
class DepositDisabledOutsideElevationGroup extends Error {
    logs;
    static code = 6110;
    code = 6110;
    name = "DepositDisabledOutsideElevationGroup";
    msg = "Can't deposit into this reserve outside elevation group";
    constructor(logs) {
        super("6110: Can't deposit into this reserve outside elevation group");
        this.logs = logs;
    }
}
exports.DepositDisabledOutsideElevationGroup = DepositDisabledOutsideElevationGroup;
class CannotCalculateReferralAmountDueToSlotsMismatch extends Error {
    logs;
    static code = 6111;
    code = 6111;
    name = "CannotCalculateReferralAmountDueToSlotsMismatch";
    msg = "Cannot calculate referral amount due to slots mismatch";
    constructor(logs) {
        super("6111: Cannot calculate referral amount due to slots mismatch");
        this.logs = logs;
    }
}
exports.CannotCalculateReferralAmountDueToSlotsMismatch = CannotCalculateReferralAmountDueToSlotsMismatch;
class ObligationOwnersMustMatch extends Error {
    logs;
    static code = 6112;
    code = 6112;
    name = "ObligationOwnersMustMatch";
    msg = "Obligation owners must match";
    constructor(logs) {
        super("6112: Obligation owners must match");
        this.logs = logs;
    }
}
exports.ObligationOwnersMustMatch = ObligationOwnersMustMatch;
class ObligationsMustMatch extends Error {
    logs;
    static code = 6113;
    code = 6113;
    name = "ObligationsMustMatch";
    msg = "Obligations must match";
    constructor(logs) {
        super("6113: Obligations must match");
        this.logs = logs;
    }
}
exports.ObligationsMustMatch = ObligationsMustMatch;
class LendingMarketsMustMatch extends Error {
    logs;
    static code = 6114;
    code = 6114;
    name = "LendingMarketsMustMatch";
    msg = "Lending markets must match";
    constructor(logs) {
        super("6114: Lending markets must match");
        this.logs = logs;
    }
}
exports.LendingMarketsMustMatch = LendingMarketsMustMatch;
class ObligationCurrentlyMarkedForDeleveraging extends Error {
    logs;
    static code = 6115;
    code = 6115;
    name = "ObligationCurrentlyMarkedForDeleveraging";
    msg = "Obligation is already marked for deleveraging";
    constructor(logs) {
        super("6115: Obligation is already marked for deleveraging");
        this.logs = logs;
    }
}
exports.ObligationCurrentlyMarkedForDeleveraging = ObligationCurrentlyMarkedForDeleveraging;
class MaximumWithdrawValueZero extends Error {
    logs;
    static code = 6116;
    code = 6116;
    name = "MaximumWithdrawValueZero";
    msg = "Maximum withdrawable value of this collateral is zero, LTV needs improved";
    constructor(logs) {
        super("6116: Maximum withdrawable value of this collateral is zero, LTV needs improved");
        this.logs = logs;
    }
}
exports.MaximumWithdrawValueZero = MaximumWithdrawValueZero;
class ZeroMaxLtvAssetsInDeposits extends Error {
    logs;
    static code = 6117;
    code = 6117;
    name = "ZeroMaxLtvAssetsInDeposits";
    msg = "No max LTV 0 assets allowed in deposits for repay and withdraw";
    constructor(logs) {
        super("6117: No max LTV 0 assets allowed in deposits for repay and withdraw");
        this.logs = logs;
    }
}
exports.ZeroMaxLtvAssetsInDeposits = ZeroMaxLtvAssetsInDeposits;
class LowestLtvAssetsPriority extends Error {
    logs;
    static code = 6118;
    code = 6118;
    name = "LowestLtvAssetsPriority";
    msg = "Withdrawing must prioritize the collateral with the lowest reserve max-LTV";
    constructor(logs) {
        super("6118: Withdrawing must prioritize the collateral with the lowest reserve max-LTV");
        this.logs = logs;
    }
}
exports.LowestLtvAssetsPriority = LowestLtvAssetsPriority;
class WorseLtvThanUnhealthyLtv extends Error {
    logs;
    static code = 6119;
    code = 6119;
    name = "WorseLtvThanUnhealthyLtv";
    msg = "Cannot get the obligation liquidatable";
    constructor(logs) {
        super("6119: Cannot get the obligation liquidatable");
        this.logs = logs;
    }
}
exports.WorseLtvThanUnhealthyLtv = WorseLtvThanUnhealthyLtv;
class FarmAccountsMissing extends Error {
    logs;
    static code = 6120;
    code = 6120;
    name = "FarmAccountsMissing";
    msg = "Farm accounts to refresh are missing";
    constructor(logs) {
        super("6120: Farm accounts to refresh are missing");
        this.logs = logs;
    }
}
exports.FarmAccountsMissing = FarmAccountsMissing;
class RepayTooSmallForFullLiquidation extends Error {
    logs;
    static code = 6121;
    code = 6121;
    name = "RepayTooSmallForFullLiquidation";
    msg = "Repay amount is too small to satisfy the mandatory full liquidation";
    constructor(logs) {
        super("6121: Repay amount is too small to satisfy the mandatory full liquidation");
        this.logs = logs;
    }
}
exports.RepayTooSmallForFullLiquidation = RepayTooSmallForFullLiquidation;
class InsufficientRepayAmount extends Error {
    logs;
    static code = 6122;
    code = 6122;
    name = "InsufficientRepayAmount";
    msg = "Liquidator provided repay amount lower than required by liquidation rules";
    constructor(logs) {
        super("6122: Liquidator provided repay amount lower than required by liquidation rules");
        this.logs = logs;
    }
}
exports.InsufficientRepayAmount = InsufficientRepayAmount;
class OrderIndexOutOfBounds extends Error {
    logs;
    static code = 6123;
    code = 6123;
    name = "OrderIndexOutOfBounds";
    msg = "Obligation order of the given index cannot exist";
    constructor(logs) {
        super("6123: Obligation order of the given index cannot exist");
        this.logs = logs;
    }
}
exports.OrderIndexOutOfBounds = OrderIndexOutOfBounds;
class InvalidOrderConfiguration extends Error {
    logs;
    static code = 6124;
    code = 6124;
    name = "InvalidOrderConfiguration";
    msg = "Given order configuration has wrong parameters";
    constructor(logs) {
        super("6124: Given order configuration has wrong parameters");
        this.logs = logs;
    }
}
exports.InvalidOrderConfiguration = InvalidOrderConfiguration;
class OrderConfigurationNotSupportedByObligation extends Error {
    logs;
    static code = 6125;
    code = 6125;
    name = "OrderConfigurationNotSupportedByObligation";
    msg = "Given order configuration cannot be used with the current state of the obligation";
    constructor(logs) {
        super("6125: Given order configuration cannot be used with the current state of the obligation");
        this.logs = logs;
    }
}
exports.OrderConfigurationNotSupportedByObligation = OrderConfigurationNotSupportedByObligation;
class OperationNotPermittedWithCurrentObligationOrders extends Error {
    logs;
    static code = 6126;
    code = 6126;
    name = "OperationNotPermittedWithCurrentObligationOrders";
    msg = "Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count";
    constructor(logs) {
        super("6126: Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count");
        this.logs = logs;
    }
}
exports.OperationNotPermittedWithCurrentObligationOrders = OperationNotPermittedWithCurrentObligationOrders;
class OperationNotPermittedMarketImmutable extends Error {
    logs;
    static code = 6127;
    code = 6127;
    name = "OperationNotPermittedMarketImmutable";
    msg = "Cannot update lending market because it is set as immutable";
    constructor(logs) {
        super("6127: Cannot update lending market because it is set as immutable");
        this.logs = logs;
    }
}
exports.OperationNotPermittedMarketImmutable = OperationNotPermittedMarketImmutable;
class OrderCreationDisabled extends Error {
    logs;
    static code = 6128;
    code = 6128;
    name = "OrderCreationDisabled";
    msg = "Creation of new orders is disabled";
    constructor(logs) {
        super("6128: Creation of new orders is disabled");
        this.logs = logs;
    }
}
exports.OrderCreationDisabled = OrderCreationDisabled;
class NoUpgradeAuthority extends Error {
    logs;
    static code = 6129;
    code = 6129;
    name = "NoUpgradeAuthority";
    msg = "Cannot initialize global config because there is no upgrade authority to the program";
    constructor(logs) {
        super("6129: Cannot initialize global config because there is no upgrade authority to the program");
        this.logs = logs;
    }
}
exports.NoUpgradeAuthority = NoUpgradeAuthority;
class InitialAdminDepositExecuted extends Error {
    logs;
    static code = 6130;
    code = 6130;
    name = "InitialAdminDepositExecuted";
    msg = "Initial admin deposit in reserve already executed";
    constructor(logs) {
        super("6130: Initial admin deposit in reserve already executed");
        this.logs = logs;
    }
}
exports.InitialAdminDepositExecuted = InitialAdminDepositExecuted;
class ReserveHasNotReceivedInitialDeposit extends Error {
    logs;
    static code = 6131;
    code = 6131;
    name = "ReserveHasNotReceivedInitialDeposit";
    msg = "Reserve has not received the initial deposit, cannot update config";
    constructor(logs) {
        super("6131: Reserve has not received the initial deposit, cannot update config");
        this.logs = logs;
    }
}
exports.ReserveHasNotReceivedInitialDeposit = ReserveHasNotReceivedInitialDeposit;
class CTokenUsageBlocked extends Error {
    logs;
    static code = 6132;
    code = 6132;
    name = "CTokenUsageBlocked";
    msg = "CToken minting/redeeming is blocked for this reserve";
    constructor(logs) {
        super("6132: CToken minting/redeeming is blocked for this reserve");
        this.logs = logs;
    }
}
exports.CTokenUsageBlocked = CTokenUsageBlocked;
class CannotUseSameReserve extends Error {
    logs;
    static code = 6133;
    code = 6133;
    name = "CannotUseSameReserve";
    msg = "Cannot call ix with same reserve";
    constructor(logs) {
        super("6133: Cannot call ix with same reserve");
        this.logs = logs;
    }
}
exports.CannotUseSameReserve = CannotUseSameReserve;
class TransactionIncludesRestrictedPrograms extends Error {
    logs;
    static code = 6134;
    code = 6134;
    name = "TransactionIncludesRestrictedPrograms";
    msg = "Transaction includes restricted programs";
    constructor(logs) {
        super("6134: Transaction includes restricted programs");
        this.logs = logs;
    }
}
exports.TransactionIncludesRestrictedPrograms = TransactionIncludesRestrictedPrograms;
class BorrowOrderDebtLiquidityMintMismatch extends Error {
    logs;
    static code = 6135;
    code = 6135;
    name = "BorrowOrderDebtLiquidityMintMismatch";
    msg = "There is no borrow order requesting debt in the given asset";
    constructor(logs) {
        super("6135: There is no borrow order requesting debt in the given asset");
        this.logs = logs;
    }
}
exports.BorrowOrderDebtLiquidityMintMismatch = BorrowOrderDebtLiquidityMintMismatch;
class BorrowOrderMaxBorrowRateExceeded extends Error {
    logs;
    static code = 6136;
    code = 6136;
    name = "BorrowOrderMaxBorrowRateExceeded";
    msg = "Reserve used for fill exceeds the maximum borrow rate specified by the order";
    constructor(logs) {
        super("6136: Reserve used for fill exceeds the maximum borrow rate specified by the order");
        this.logs = logs;
    }
}
exports.BorrowOrderMaxBorrowRateExceeded = BorrowOrderMaxBorrowRateExceeded;
class BorrowOrderMinDebtTermInsufficient extends Error {
    logs;
    static code = 6137;
    code = 6137;
    name = "BorrowOrderMinDebtTermInsufficient";
    msg = "Reserve used for fill defines a debt term shorter than specified by the order";
    constructor(logs) {
        super("6137: Reserve used for fill defines a debt term shorter than specified by the order");
        this.logs = logs;
    }
}
exports.BorrowOrderMinDebtTermInsufficient = BorrowOrderMinDebtTermInsufficient;
class BorrowOrderFillTimeLimitExceeded extends Error {
    logs;
    static code = 6138;
    code = 6138;
    name = "BorrowOrderFillTimeLimitExceeded";
    msg = "Borrow order can no longer be filled";
    constructor(logs) {
        super("6138: Borrow order can no longer be filled");
        this.logs = logs;
    }
}
exports.BorrowOrderFillTimeLimitExceeded = BorrowOrderFillTimeLimitExceeded;
class ReserveDebtMaturityReached extends Error {
    logs;
    static code = 6139;
    code = 6139;
    name = "ReserveDebtMaturityReached";
    msg = "Cannot borrow from a reserve that reached its debt maturity timestamp";
    constructor(logs) {
        super("6139: Cannot borrow from a reserve that reached its debt maturity timestamp");
        this.logs = logs;
    }
}
exports.ReserveDebtMaturityReached = ReserveDebtMaturityReached;
class NonUpdatableOrderConfiguration extends Error {
    logs;
    static code = 6140;
    code = 6140;
    name = "NonUpdatableOrderConfiguration";
    msg = "Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)";
    constructor(logs) {
        super("6140: Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)");
        this.logs = logs;
    }
}
exports.NonUpdatableOrderConfiguration = NonUpdatableOrderConfiguration;
class BorrowOrderExecutionDisabled extends Error {
    logs;
    static code = 6141;
    code = 6141;
    name = "BorrowOrderExecutionDisabled";
    msg = "Execution of borrow orders is disabled";
    constructor(logs) {
        super("6141: Execution of borrow orders is disabled");
        this.logs = logs;
    }
}
exports.BorrowOrderExecutionDisabled = BorrowOrderExecutionDisabled;
class DebtReachedReserveDebtTerm extends Error {
    logs;
    static code = 6142;
    code = 6142;
    name = "DebtReachedReserveDebtTerm";
    msg = "Cannot increase the debt that has reached its end of term configured by the reserve";
    constructor(logs) {
        super("6142: Cannot increase the debt that has reached its end of term configured by the reserve");
        this.logs = logs;
    }
}
exports.DebtReachedReserveDebtTerm = DebtReachedReserveDebtTerm;
class ExpectationNotMet extends Error {
    logs;
    static code = 6143;
    code = 6143;
    name = "ExpectationNotMet";
    msg = "The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)";
    constructor(logs) {
        super("6143: The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)");
        this.logs = logs;
    }
}
exports.ExpectationNotMet = ExpectationNotMet;
class BorrowOrderFillValueTooSmall extends Error {
    logs;
    static code = 6144;
    code = 6144;
    name = "BorrowOrderFillValueTooSmall";
    msg = "Available liquidity could not satisfy the minimum required borrow order fill value";
    constructor(logs) {
        super("6144: Available liquidity could not satisfy the minimum required borrow order fill value");
        this.logs = logs;
    }
}
exports.BorrowOrderFillValueTooSmall = BorrowOrderFillValueTooSmall;
class WithdrawTicketIssuanceDisabled extends Error {
    logs;
    static code = 6145;
    code = 6145;
    name = "WithdrawTicketIssuanceDisabled";
    msg = "Issuing new withdraw tickets is disabled by the market";
    constructor(logs) {
        super("6145: Issuing new withdraw tickets is disabled by the market");
        this.logs = logs;
    }
}
exports.WithdrawTicketIssuanceDisabled = WithdrawTicketIssuanceDisabled;
class WithdrawTicketRedemptionDisabled extends Error {
    logs;
    static code = 6146;
    code = 6146;
    name = "WithdrawTicketRedemptionDisabled";
    msg = "Redeeming withdraw tickets is disabled by the market";
    constructor(logs) {
        super("6146: Redeeming withdraw tickets is disabled by the market");
        this.logs = logs;
    }
}
exports.WithdrawTicketRedemptionDisabled = WithdrawTicketRedemptionDisabled;
class WithdrawTicketStillValid extends Error {
    logs;
    static code = 6147;
    code = 6147;
    name = "WithdrawTicketStillValid";
    msg = "Recovering collateral is only available after the withdraw ticket has been marked invalid";
    constructor(logs) {
        super("6147: Recovering collateral is only available after the withdraw ticket has been marked invalid");
        this.logs = logs;
    }
}
exports.WithdrawTicketStillValid = WithdrawTicketStillValid;
class WithdrawTicketRequiresFullRedemption extends Error {
    logs;
    static code = 6148;
    code = 6148;
    name = "WithdrawTicketRequiresFullRedemption";
    msg = "The withdraw ticket's current state requires that it is fully redeemed (e.g. due to owner ATA creation), but there is not enough liquidity";
    constructor(logs) {
        super("6148: The withdraw ticket's current state requires that it is fully redeemed (e.g. due to owner ATA creation), but there is not enough liquidity");
        this.logs = logs;
    }
}
exports.WithdrawTicketRequiresFullRedemption = WithdrawTicketRequiresFullRedemption;
class UserTokenBalanceMismatch extends Error {
    logs;
    static code = 6149;
    code = 6149;
    name = "UserTokenBalanceMismatch";
    msg = "The user's token account has changed its balance in an unexpected way";
    constructor(logs) {
        super("6149: The user's token account has changed its balance in an unexpected way");
        this.logs = logs;
    }
}
exports.UserTokenBalanceMismatch = UserTokenBalanceMismatch;
class WithdrawQueuedLiquidityValueTooSmall extends Error {
    logs;
    static code = 6150;
    code = 6150;
    name = "WithdrawQueuedLiquidityValueTooSmall";
    msg = "Available liquidity could not satisfy the minimum required ticketed withdrawal value";
    constructor(logs) {
        super("6150: Available liquidity could not satisfy the minimum required ticketed withdrawal value");
        this.logs = logs;
    }
}
exports.WithdrawQueuedLiquidityValueTooSmall = WithdrawQueuedLiquidityValueTooSmall;
class InvalidTokenAccountState extends Error {
    logs;
    static code = 6151;
    code = 6151;
    name = "InvalidTokenAccountState";
    msg = "Token account is in a state preventing the handler's operation (e.g. frozen or delegate)";
    constructor(logs) {
        super("6151: Token account is in a state preventing the handler's operation (e.g. frozen or delegate)");
        this.logs = logs;
    }
}
exports.InvalidTokenAccountState = InvalidTokenAccountState;
class WithdrawTicketInvalid extends Error {
    logs;
    static code = 6152;
    code = 6152;
    name = "WithdrawTicketInvalid";
    msg = "Cannot use ticket that was already marked invalid";
    constructor(logs) {
        super("6152: Cannot use ticket that was already marked invalid");
        this.logs = logs;
    }
}
exports.WithdrawTicketInvalid = WithdrawTicketInvalid;
class BorrowOrderValueTooSmall extends Error {
    logs;
    static code = 6153;
    code = 6153;
    name = "BorrowOrderValueTooSmall";
    msg = "Borrow order's value would be below the market-configured minimum";
    constructor(logs) {
        super("6153: Borrow order's value would be below the market-configured minimum");
        this.logs = logs;
    }
}
exports.BorrowOrderValueTooSmall = BorrowOrderValueTooSmall;
class WithdrawTicketValueTooSmall extends Error {
    logs;
    static code = 6154;
    code = 6154;
    name = "WithdrawTicketValueTooSmall";
    msg = "Withdraw ticket's value would be below the market-configured minimum";
    constructor(logs) {
        super("6154: Withdraw ticket's value would be below the market-configured minimum");
        this.logs = logs;
    }
}
exports.WithdrawTicketValueTooSmall = WithdrawTicketValueTooSmall;
class InvalidWithdrawTicketProgressCallbackConfig extends Error {
    logs;
    static code = 6155;
    code = 6155;
    name = "InvalidWithdrawTicketProgressCallbackConfig";
    msg = "Invalid configuration or required custom accounts for the requested withdraw ticket callback type";
    constructor(logs) {
        super("6155: Invalid configuration or required custom accounts for the requested withdraw ticket callback type");
        this.logs = logs;
    }
}
exports.InvalidWithdrawTicketProgressCallbackConfig = InvalidWithdrawTicketProgressCallbackConfig;
class WithdrawTicketProgressCallbackAccountsMissing extends Error {
    logs;
    static code = 6156;
    code = 6156;
    name = "WithdrawTicketProgressCallbackAccountsMissing";
    msg = "One or more accounts required by the ticket's configured progress callback are missing";
    constructor(logs) {
        super("6156: One or more accounts required by the ticket's configured progress callback are missing");
        this.logs = logs;
    }
}
exports.WithdrawTicketProgressCallbackAccountsMissing = WithdrawTicketProgressCallbackAccountsMissing;
class BorrowRolloverConfigurationDisabled extends Error {
    logs;
    static code = 6157;
    code = 6157;
    name = "BorrowRolloverConfigurationDisabled";
    msg = "Configuring auto-rollover on loans is disabled by market owner";
    constructor(logs) {
        super("6157: Configuring auto-rollover on loans is disabled by market owner");
        this.logs = logs;
    }
}
exports.BorrowRolloverConfigurationDisabled = BorrowRolloverConfigurationDisabled;
class InvalidObligationConfigUpdateSubject extends Error {
    logs;
    static code = 6158;
    code = 6158;
    name = "InvalidObligationConfigUpdateSubject";
    msg = "Invalid specification of the Obligation's part to be configured";
    constructor(logs) {
        super("6158: Invalid specification of the Obligation's part to be configured");
        this.logs = logs;
    }
}
exports.InvalidObligationConfigUpdateSubject = InvalidObligationConfigUpdateSubject;
class BorrowRolloverLiquidityMintMismatch extends Error {
    logs;
    static code = 6159;
    code = 6159;
    name = "BorrowRolloverLiquidityMintMismatch";
    msg = "Auto-rollover must use a target reserve of the same token";
    constructor(logs) {
        super("6159: Auto-rollover must use a target reserve of the same token");
        this.logs = logs;
    }
}
exports.BorrowRolloverLiquidityMintMismatch = BorrowRolloverLiquidityMintMismatch;
class ObligationBorrowRolloverNotApplicable extends Error {
    logs;
    static code = 6160;
    code = 6160;
    name = "ObligationBorrowRolloverNotApplicable";
    msg = "The given borrow is not fixed-term and does not require rolling over";
    constructor(logs) {
        super("6160: The given borrow is not fixed-term and does not require rolling over");
        this.logs = logs;
    }
}
exports.ObligationBorrowRolloverNotApplicable = ObligationBorrowRolloverNotApplicable;
class ObligationBorrowOutsideRolloverWindow extends Error {
    logs;
    static code = 6161;
    code = 6161;
    name = "ObligationBorrowOutsideRolloverWindow";
    msg = "The given borrow is outside the corresponding market-configured rollover window";
    constructor(logs) {
        super("6161: The given borrow is outside the corresponding market-configured rollover window");
        this.logs = logs;
    }
}
exports.ObligationBorrowOutsideRolloverWindow = ObligationBorrowOutsideRolloverWindow;
class ObligationBorrowRolloverNotEnabledByOwner extends Error {
    logs;
    static code = 6162;
    code = 6162;
    name = "ObligationBorrowRolloverNotEnabledByOwner";
    msg = "Obligation's owner did not opt-in for auto-rollover of the given borrow";
    constructor(logs) {
        super("6162: Obligation's owner did not opt-in for auto-rollover of the given borrow");
        this.logs = logs;
    }
}
exports.ObligationBorrowRolloverNotEnabledByOwner = ObligationBorrowRolloverNotEnabledByOwner;
class ObligationBorrowRolloverTargetReserveMismatch extends Error {
    logs;
    static code = 6163;
    code = 6163;
    name = "ObligationBorrowRolloverTargetReserveMismatch";
    msg = "Obligation's owner did not allow to roll over into terms offered by the given reserve";
    constructor(logs) {
        super("6163: Obligation's owner did not allow to roll over into terms offered by the given reserve");
        this.logs = logs;
    }
}
exports.ObligationBorrowRolloverTargetReserveMismatch = ObligationBorrowRolloverTargetReserveMismatch;
class BorrowRolloverExecutionDisabled extends Error {
    logs;
    static code = 6164;
    code = 6164;
    name = "BorrowRolloverExecutionDisabled";
    msg = "Executing auto-rollover is disabled by market owner";
    constructor(logs) {
        super("6164: Executing auto-rollover is disabled by market owner");
        this.logs = logs;
    }
}
exports.BorrowRolloverExecutionDisabled = BorrowRolloverExecutionDisabled;
class ObligationAccountingMismatch extends Error {
    logs;
    static code = 6165;
    code = 6165;
    name = "ObligationAccountingMismatch";
    msg = "Obligation internal state accounting has been unexpectedly modified";
    constructor(logs) {
        super("6165: Obligation internal state accounting has been unexpectedly modified");
        this.logs = logs;
    }
}
exports.ObligationAccountingMismatch = ObligationAccountingMismatch;
class PartialRolloverValueTooSmall extends Error {
    logs;
    static code = 6166;
    code = 6166;
    name = "PartialRolloverValueTooSmall";
    msg = "Partial rollover amount is below the market-configured minimum value";
    constructor(logs) {
        super("6166: Partial rollover amount is below the market-configured minimum value");
        this.logs = logs;
    }
}
exports.PartialRolloverValueTooSmall = PartialRolloverValueTooSmall;
class ObligationBorrowRolloverConfigMismatch extends Error {
    logs;
    static code = 6167;
    code = 6167;
    name = "ObligationBorrowRolloverConfigMismatch";
    msg = "Pre-existing rollover configuration of the loan cannot be overwritten by the operation";
    constructor(logs) {
        super("6167: Pre-existing rollover configuration of the loan cannot be overwritten by the operation");
        this.logs = logs;
    }
}
exports.ObligationBorrowRolloverConfigMismatch = ObligationBorrowRolloverConfigMismatch;
class ObligationBorrowRolloverMustProlongDebtTerm extends Error {
    logs;
    static code = 6168;
    code = 6168;
    name = "ObligationBorrowRolloverMustProlongDebtTerm";
    msg = "Rollover into existing borrow must prolong the remaining debt term";
    constructor(logs) {
        super("6168: Rollover into existing borrow must prolong the remaining debt term");
        this.logs = logs;
    }
}
exports.ObligationBorrowRolloverMustProlongDebtTerm = ObligationBorrowRolloverMustProlongDebtTerm;
class RolloverNotSupportedInElevationGroup extends Error {
    logs;
    static code = 6169;
    code = 6169;
    name = "RolloverNotSupportedInElevationGroup";
    msg = "Rollover is not supported for obligations in an elevation group";
    constructor(logs) {
        super("6169: Rollover is not supported for obligations in an elevation group");
        this.logs = logs;
    }
}
exports.RolloverNotSupportedInElevationGroup = RolloverNotSupportedInElevationGroup;
class WithdrawTicketCancellationDisabled extends Error {
    logs;
    static code = 6170;
    code = 6170;
    name = "WithdrawTicketCancellationDisabled";
    msg = "Cancelling withdraw tickets is disabled by the market";
    constructor(logs) {
        super("6170: Cancelling withdraw tickets is disabled by the market");
        this.logs = logs;
    }
}
exports.WithdrawTicketCancellationDisabled = WithdrawTicketCancellationDisabled;
class WithdrawTicketFullyCancelled extends Error {
    logs;
    static code = 6171;
    code = 6171;
    name = "WithdrawTicketFullyCancelled";
    msg = "Cannot use ticket that was already fully-cancelled";
    constructor(logs) {
        super("6171: Cannot use ticket that was already fully-cancelled");
        this.logs = logs;
    }
}
exports.WithdrawTicketFullyCancelled = WithdrawTicketFullyCancelled;
class CloneSourceReserveDisabled extends Error {
    logs;
    static code = 6172;
    code = 6172;
    name = "CloneSourceReserveDisabled";
    msg = "Cannot clone config from a reserve that is disabled";
    constructor(logs) {
        super("6172: Cannot clone config from a reserve that is disabled");
        this.logs = logs;
    }
}
exports.CloneSourceReserveDisabled = CloneSourceReserveDisabled;
class CloneTargetReserveAlreadyInUse extends Error {
    logs;
    static code = 6173;
    code = 6173;
    name = "CloneTargetReserveAlreadyInUse";
    msg = "Cannot clone config into a reserve that has been in use";
    constructor(logs) {
        super("6173: Cannot clone config into a reserve that has been in use");
        this.logs = logs;
    }
}
exports.CloneTargetReserveAlreadyInUse = CloneTargetReserveAlreadyInUse;
class ClonedReserveLiquidityMintMismatch extends Error {
    logs;
    static code = 6174;
    code = 6174;
    name = "ClonedReserveLiquidityMintMismatch";
    msg = "Cannot clone config between reserves of different mints";
    constructor(logs) {
        super("6174: Cannot clone config between reserves of different mints");
        this.logs = logs;
    }
}
exports.ClonedReserveLiquidityMintMismatch = ClonedReserveLiquidityMintMismatch;
class ReserveEmergencyMode extends Error {
    logs;
    static code = 6175;
    code = 6175;
    name = "ReserveEmergencyMode";
    msg = "Reserve emergency mode is enabled";
    constructor(logs) {
        super("6175: Reserve emergency mode is enabled");
        this.logs = logs;
    }
}
exports.ReserveEmergencyMode = ReserveEmergencyMode;
class ObligationOwnershipTransferInProgress extends Error {
    logs;
    static code = 6176;
    code = 6176;
    name = "ObligationOwnershipTransferInProgress";
    msg = "Obligation ownership transfer is in progress";
    constructor(logs) {
        super("6176: Obligation ownership transfer is in progress");
        this.logs = logs;
    }
}
exports.ObligationOwnershipTransferInProgress = ObligationOwnershipTransferInProgress;
class ObligationOwnershipTransferNotInInitiatedState extends Error {
    logs;
    static code = 6177;
    code = 6177;
    name = "ObligationOwnershipTransferNotInInitiatedState";
    msg = "Obligation ownership transfer is not in initiated state";
    constructor(logs) {
        super("6177: Obligation ownership transfer is not in initiated state");
        this.logs = logs;
    }
}
exports.ObligationOwnershipTransferNotInInitiatedState = ObligationOwnershipTransferNotInInitiatedState;
class ObligationPendingOwnerNotSet extends Error {
    logs;
    static code = 6178;
    code = 6178;
    name = "ObligationPendingOwnerNotSet";
    msg = "Obligation pending owner not set";
    constructor(logs) {
        super("6178: Obligation pending owner not set");
        this.logs = logs;
    }
}
exports.ObligationPendingOwnerNotSet = ObligationPendingOwnerNotSet;
class ObligationInvalidPendingOwner extends Error {
    logs;
    static code = 6179;
    code = 6179;
    name = "ObligationInvalidPendingOwner";
    msg = "Invalid pending owner address";
    constructor(logs) {
        super("6179: Invalid pending owner address");
        this.logs = logs;
    }
}
exports.ObligationInvalidPendingOwner = ObligationInvalidPendingOwner;
class ObligationOwnershipTransferNotApproved extends Error {
    logs;
    static code = 6180;
    code = 6180;
    name = "ObligationOwnershipTransferNotApproved";
    msg = "Obligation ownership transfer not approved by admin";
    constructor(logs) {
        super("6180: Obligation ownership transfer not approved by admin");
        this.logs = logs;
    }
}
exports.ObligationOwnershipTransferNotApproved = ObligationOwnershipTransferNotApproved;
class ObligationHasActiveBorrowOrders extends Error {
    logs;
    static code = 6181;
    code = 6181;
    name = "ObligationHasActiveBorrowOrders";
    msg = "Obligation has active borrow orders";
    constructor(logs) {
        super("6181: Obligation has active borrow orders");
        this.logs = logs;
    }
}
exports.ObligationHasActiveBorrowOrders = ObligationHasActiveBorrowOrders;
class OnlyComputeBudgetCompanionIxsAllowed extends Error {
    logs;
    static code = 6182;
    code = 6182;
    name = "OnlyComputeBudgetCompanionIxsAllowed";
    msg = "Only ComputeBudget instructions may accompany this instruction";
    constructor(logs) {
        super("6182: Only ComputeBudget instructions may accompany this instruction");
        this.logs = logs;
    }
}
exports.OnlyComputeBudgetCompanionIxsAllowed = OnlyComputeBudgetCompanionIxsAllowed;
class MissingPermissioner extends Error {
    logs;
    static code = 6183;
    code = 6183;
    name = "MissingPermissioner";
    msg = "Required permissioning account is missing";
    constructor(logs) {
        super("6183: Required permissioning account is missing");
        this.logs = logs;
    }
}
exports.MissingPermissioner = MissingPermissioner;
class ReserveRewardsDisabled extends Error {
    logs;
    static code = 6184;
    code = 6184;
    name = "ReserveRewardsDisabled";
    msg = "Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)";
    constructor(logs) {
        super("6184: Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)");
        this.logs = logs;
    }
}
exports.ReserveRewardsDisabled = ReserveRewardsDisabled;
function fromCode(code, logs) {
    switch (code) {
        case 6000:
            return new InvalidMarketAuthority(logs);
        case 6001:
            return new InvalidMarketOwner(logs);
        case 6002:
            return new InvalidAccountOwner(logs);
        case 6003:
            return new InvalidAmount(logs);
        case 6004:
            return new InvalidConfig(logs);
        case 6005:
            return new InvalidSigner(logs);
        case 6006:
            return new InvalidAccountInput(logs);
        case 6007:
            return new MathOverflow(logs);
        case 6008:
            return new InsufficientLiquidity(logs);
        case 6009:
            return new ReserveStale(logs);
        case 6010:
            return new WithdrawTooSmall(logs);
        case 6011:
            return new WithdrawTooLarge(logs);
        case 6012:
            return new BorrowTooSmall(logs);
        case 6013:
            return new BorrowTooLarge(logs);
        case 6014:
            return new RepayTooSmall(logs);
        case 6015:
            return new LiquidationTooSmall(logs);
        case 6016:
            return new ObligationHealthy(logs);
        case 6017:
            return new ObligationStale(logs);
        case 6018:
            return new ObligationReserveLimit(logs);
        case 6019:
            return new InvalidObligationOwner(logs);
        case 6020:
            return new ObligationDepositsEmpty(logs);
        case 6021:
            return new ObligationBorrowsEmpty(logs);
        case 6022:
            return new ObligationDepositsZero(logs);
        case 6023:
            return new ObligationBorrowsZero(logs);
        case 6024:
            return new InvalidObligationCollateral(logs);
        case 6025:
            return new InvalidObligationLiquidity(logs);
        case 6026:
            return new ObligationCollateralEmpty(logs);
        case 6027:
            return new ObligationLiquidityEmpty(logs);
        case 6028:
            return new NegativeInterestRate(logs);
        case 6029:
            return new InvalidOracleConfig(logs);
        case 6030:
            return new InsufficientProtocolFeesToRedeem(logs);
        case 6031:
            return new FlashBorrowCpi(logs);
        case 6032:
            return new NoFlashRepayFound(logs);
        case 6033:
            return new InvalidFlashRepay(logs);
        case 6034:
            return new FlashRepayCpi(logs);
        case 6035:
            return new MultipleFlashBorrows(logs);
        case 6036:
            return new FlashLoansDisabled(logs);
        case 6037:
            return new SwitchboardV2Error(logs);
        case 6038:
            return new CouldNotDeserializeScope(logs);
        case 6039:
            return new PriceTooOld(logs);
        case 6040:
            return new PriceTooDivergentFromTwap(logs);
        case 6041:
            return new InvalidTwapPrice(logs);
        case 6042:
            return new GlobalEmergencyMode(logs);
        case 6043:
            return new InvalidFlag(logs);
        case 6044:
            return new PriceNotValid(logs);
        case 6045:
            return new PriceIsBiggerThanHeuristic(logs);
        case 6046:
            return new PriceIsLowerThanHeuristic(logs);
        case 6047:
            return new PriceIsZero(logs);
        case 6048:
            return new PriceConfidenceTooWide(logs);
        case 6049:
            return new IntegerOverflow(logs);
        case 6050:
            return new NoFarmForReserve(logs);
        case 6051:
            return new IncorrectInstructionInPosition(logs);
        case 6052:
            return new NoPriceFound(logs);
        case 6053:
            return new InvalidTwapConfig(logs);
        case 6054:
            return new InvalidPythPriceAccount(logs);
        case 6055:
            return new InvalidSwitchboardAccount(logs);
        case 6056:
            return new InvalidScopePriceAccount(logs);
        case 6057:
            return new ObligationCollateralLtvZero(logs);
        case 6058:
            return new InvalidObligationSeedsValue(logs);
        case 6059:
            return new DeprecatedInvalidObligationId(logs);
        case 6060:
            return new InvalidBorrowRateCurvePoint(logs);
        case 6061:
            return new InvalidUtilizationRate(logs);
        case 6062:
            return new CannotSocializeObligationWithCollateral(logs);
        case 6063:
            return new ObligationEmpty(logs);
        case 6064:
            return new WithdrawalCapReached(logs);
        case 6065:
            return new LastTimestampGreaterThanCurrent(logs);
        case 6066:
            return new LiquidationRewardTooSmall(logs);
        case 6067:
            return new IsolatedAssetTierViolation(logs);
        case 6068:
            return new InconsistentElevationGroup(logs);
        case 6069:
            return new InvalidElevationGroup(logs);
        case 6070:
            return new InvalidElevationGroupConfig(logs);
        case 6071:
            return new UnhealthyElevationGroupLtv(logs);
        case 6072:
            return new ElevationGroupNewLoansDisabled(logs);
        case 6073:
            return new ReserveDeprecated(logs);
        case 6074:
            return new ReferrerAccountNotInitialized(logs);
        case 6075:
            return new ReferrerAccountMintMissmatch(logs);
        case 6076:
            return new ReferrerAccountWrongAddress(logs);
        case 6077:
            return new ReferrerAccountReferrerMissmatch(logs);
        case 6078:
            return new ReferrerAccountMissing(logs);
        case 6079:
            return new InsufficientReferralFeesToRedeem(logs);
        case 6080:
            return new CpiDisabled(logs);
        case 6081:
            return new ShortUrlNotAsciiAlphanumeric(logs);
        case 6082:
            return new ReserveObsolete(logs);
        case 6083:
            return new ElevationGroupAlreadyActivated(logs);
        case 6084:
            return new ObligationInObsoleteReserve(logs);
        case 6085:
            return new ReferrerStateOwnerMismatch(logs);
        case 6086:
            return new UserMetadataOwnerAlreadySet(logs);
        case 6087:
            return new CollateralNonLiquidatable(logs);
        case 6088:
            return new BorrowingDisabled(logs);
        case 6089:
            return new BorrowLimitExceeded(logs);
        case 6090:
            return new DepositLimitExceeded(logs);
        case 6091:
            return new BorrowingDisabledOutsideElevationGroup(logs);
        case 6092:
            return new NetValueRemainingTooSmall(logs);
        case 6093:
            return new WorseLtvBlocked(logs);
        case 6094:
            return new LiabilitiesBiggerThanAssets(logs);
        case 6095:
            return new ReserveTokenBalanceMismatch(logs);
        case 6096:
            return new ReserveVaultBalanceMismatch(logs);
        case 6097:
            return new ReserveAccountingMismatch(logs);
        case 6098:
            return new BorrowingAboveUtilizationRateDisabled(logs);
        case 6099:
            return new LiquidationBorrowFactorPriority(logs);
        case 6100:
            return new LiquidationLowestLiquidationLtvPriority(logs);
        case 6101:
            return new ElevationGroupBorrowLimitExceeded(logs);
        case 6102:
            return new ElevationGroupWithoutDebtReserve(logs);
        case 6103:
            return new ElevationGroupMaxCollateralReserveZero(logs);
        case 6104:
            return new ElevationGroupHasAnotherDebtReserve(logs);
        case 6105:
            return new ElevationGroupDebtReserveAsCollateral(logs);
        case 6106:
            return new ObligationCollateralExceedsElevationGroupLimit(logs);
        case 6107:
            return new ObligationElevationGroupMultipleDebtReserve(logs);
        case 6108:
            return new UnsupportedTokenExtension(logs);
        case 6109:
            return new InvalidTokenAccount(logs);
        case 6110:
            return new DepositDisabledOutsideElevationGroup(logs);
        case 6111:
            return new CannotCalculateReferralAmountDueToSlotsMismatch(logs);
        case 6112:
            return new ObligationOwnersMustMatch(logs);
        case 6113:
            return new ObligationsMustMatch(logs);
        case 6114:
            return new LendingMarketsMustMatch(logs);
        case 6115:
            return new ObligationCurrentlyMarkedForDeleveraging(logs);
        case 6116:
            return new MaximumWithdrawValueZero(logs);
        case 6117:
            return new ZeroMaxLtvAssetsInDeposits(logs);
        case 6118:
            return new LowestLtvAssetsPriority(logs);
        case 6119:
            return new WorseLtvThanUnhealthyLtv(logs);
        case 6120:
            return new FarmAccountsMissing(logs);
        case 6121:
            return new RepayTooSmallForFullLiquidation(logs);
        case 6122:
            return new InsufficientRepayAmount(logs);
        case 6123:
            return new OrderIndexOutOfBounds(logs);
        case 6124:
            return new InvalidOrderConfiguration(logs);
        case 6125:
            return new OrderConfigurationNotSupportedByObligation(logs);
        case 6126:
            return new OperationNotPermittedWithCurrentObligationOrders(logs);
        case 6127:
            return new OperationNotPermittedMarketImmutable(logs);
        case 6128:
            return new OrderCreationDisabled(logs);
        case 6129:
            return new NoUpgradeAuthority(logs);
        case 6130:
            return new InitialAdminDepositExecuted(logs);
        case 6131:
            return new ReserveHasNotReceivedInitialDeposit(logs);
        case 6132:
            return new CTokenUsageBlocked(logs);
        case 6133:
            return new CannotUseSameReserve(logs);
        case 6134:
            return new TransactionIncludesRestrictedPrograms(logs);
        case 6135:
            return new BorrowOrderDebtLiquidityMintMismatch(logs);
        case 6136:
            return new BorrowOrderMaxBorrowRateExceeded(logs);
        case 6137:
            return new BorrowOrderMinDebtTermInsufficient(logs);
        case 6138:
            return new BorrowOrderFillTimeLimitExceeded(logs);
        case 6139:
            return new ReserveDebtMaturityReached(logs);
        case 6140:
            return new NonUpdatableOrderConfiguration(logs);
        case 6141:
            return new BorrowOrderExecutionDisabled(logs);
        case 6142:
            return new DebtReachedReserveDebtTerm(logs);
        case 6143:
            return new ExpectationNotMet(logs);
        case 6144:
            return new BorrowOrderFillValueTooSmall(logs);
        case 6145:
            return new WithdrawTicketIssuanceDisabled(logs);
        case 6146:
            return new WithdrawTicketRedemptionDisabled(logs);
        case 6147:
            return new WithdrawTicketStillValid(logs);
        case 6148:
            return new WithdrawTicketRequiresFullRedemption(logs);
        case 6149:
            return new UserTokenBalanceMismatch(logs);
        case 6150:
            return new WithdrawQueuedLiquidityValueTooSmall(logs);
        case 6151:
            return new InvalidTokenAccountState(logs);
        case 6152:
            return new WithdrawTicketInvalid(logs);
        case 6153:
            return new BorrowOrderValueTooSmall(logs);
        case 6154:
            return new WithdrawTicketValueTooSmall(logs);
        case 6155:
            return new InvalidWithdrawTicketProgressCallbackConfig(logs);
        case 6156:
            return new WithdrawTicketProgressCallbackAccountsMissing(logs);
        case 6157:
            return new BorrowRolloverConfigurationDisabled(logs);
        case 6158:
            return new InvalidObligationConfigUpdateSubject(logs);
        case 6159:
            return new BorrowRolloverLiquidityMintMismatch(logs);
        case 6160:
            return new ObligationBorrowRolloverNotApplicable(logs);
        case 6161:
            return new ObligationBorrowOutsideRolloverWindow(logs);
        case 6162:
            return new ObligationBorrowRolloverNotEnabledByOwner(logs);
        case 6163:
            return new ObligationBorrowRolloverTargetReserveMismatch(logs);
        case 6164:
            return new BorrowRolloverExecutionDisabled(logs);
        case 6165:
            return new ObligationAccountingMismatch(logs);
        case 6166:
            return new PartialRolloverValueTooSmall(logs);
        case 6167:
            return new ObligationBorrowRolloverConfigMismatch(logs);
        case 6168:
            return new ObligationBorrowRolloverMustProlongDebtTerm(logs);
        case 6169:
            return new RolloverNotSupportedInElevationGroup(logs);
        case 6170:
            return new WithdrawTicketCancellationDisabled(logs);
        case 6171:
            return new WithdrawTicketFullyCancelled(logs);
        case 6172:
            return new CloneSourceReserveDisabled(logs);
        case 6173:
            return new CloneTargetReserveAlreadyInUse(logs);
        case 6174:
            return new ClonedReserveLiquidityMintMismatch(logs);
        case 6175:
            return new ReserveEmergencyMode(logs);
        case 6176:
            return new ObligationOwnershipTransferInProgress(logs);
        case 6177:
            return new ObligationOwnershipTransferNotInInitiatedState(logs);
        case 6178:
            return new ObligationPendingOwnerNotSet(logs);
        case 6179:
            return new ObligationInvalidPendingOwner(logs);
        case 6180:
            return new ObligationOwnershipTransferNotApproved(logs);
        case 6181:
            return new ObligationHasActiveBorrowOrders(logs);
        case 6182:
            return new OnlyComputeBudgetCompanionIxsAllowed(logs);
        case 6183:
            return new MissingPermissioner(logs);
        case 6184:
            return new ReserveRewardsDisabled(logs);
    }
    return null;
}
//# sourceMappingURL=custom.js.map