"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WithdrawAmountLessThanWithdrawalPenalty = exports.DepositAmountGreaterThanRequestedAmount = exports.ReserveHasNonZeroAllocationOrCTokens = exports.WrongAdminOrAllocationAdmin = exports.InvestTooSoon = exports.MinWithdrawAmountTooBig = exports.MissingReserveForBatchRefresh = exports.VaultAUMZero = exports.ManagementFeeGreaterThanMaxAllowed = exports.CannotWithdrawZeroShares = exports.WithdrawResultsInZeroShares = exports.DepositAmountsZeroShares = exports.AUMBelowPendingFees = exports.AUMDecreasedAfterInvest = exports.SharesMintedAmountDoesNotMatch = exports.DisinvestedLiquidityAmountDoesNotMatch = exports.SharesBurnedAmountDoesNotMatch = exports.UserReceivedAmountDoesNotMatch = exports.LiquidityToWithdrawDoesNotMatch = exports.AmountToWithdrawDoesNotMatch = exports.TokensDepositedAmountDoesNotMatch = exports.CannotWithdrawFromEmptyVault = exports.ReserveSpaceExhausted = exports.DepositAmountBelowMinimum = exports.BPSValueTooBig = exports.NotEnoughLiquidityDisinvestedToSendToUser = exports.ReserveIsStale = exports.InitialAccountingIncorrect = exports.SharesMintIncorrect = exports.SharesMintDecimalsIncorrect = exports.TokenVaultIncorrect = exports.TokenMintDecimalsIncorrect = exports.TokenMintIncorrect = exports.BaseVaultAuthorityBumpIncorrect = exports.BaseVaultAuthorityIncorrect = exports.AdminAuthorityIncorrect = exports.InvestAmountBelowMinimum = exports.CannotFindReserveInAllocations = exports.OutOfRangeOfReserveIndex = exports.ReserveAccountAndKeyMismatch = exports.ReserveNotProvidedInTheAccounts = exports.CouldNotDeserializeAccountAsReserve = exports.ReserveNotPartOfAllocations = exports.ReserveAlreadyExists = exports.TooMuchLiquidityToWithdraw = exports.WithdrawAmountBelowMinimum = exports.IntegerOverflow = exports.MathOverflow = exports.SharesIssuedAmountDoesNotMatch = exports.DepositAmountsZero = void 0;
exports.MaxInvestAmountMustBeGreaterThanZero = exports.VaultDepositCapReached = exports.RewardsStaleForFeeUpdate = exports.RewardWithdrawAmountNotExpected = exports.RewardWithdrawAmountZero = exports.RewardTopupAmountNotExpected = exports.RewardTopupAmountZero = exports.AUMDecreasedMoreThanExpected = exports.InvalidBoolLikeValue = exports.ReserveNotWhitelisted = exports.WithdrawalFeeLamportsGreaterThanMaxAllowed = exports.WithdrawalFeeBPSGreaterThanMaxAllowed = exports.NoUpgradeAuthority = exports.CannotWithdrawZeroLamports = void 0;
exports.fromCode = fromCode;
class DepositAmountsZero extends Error {
    logs;
    static code = 7000;
    code = 7000;
    name = "DepositAmountsZero";
    msg = "Cannot deposit zero tokens";
    constructor(logs) {
        super("7000: Cannot deposit zero tokens");
        this.logs = logs;
    }
}
exports.DepositAmountsZero = DepositAmountsZero;
class SharesIssuedAmountDoesNotMatch extends Error {
    logs;
    static code = 7001;
    code = 7001;
    name = "SharesIssuedAmountDoesNotMatch";
    msg = "Post check failed on share issued";
    constructor(logs) {
        super("7001: Post check failed on share issued");
        this.logs = logs;
    }
}
exports.SharesIssuedAmountDoesNotMatch = SharesIssuedAmountDoesNotMatch;
class MathOverflow extends Error {
    logs;
    static code = 7002;
    code = 7002;
    name = "MathOverflow";
    msg = "Math operation overflowed";
    constructor(logs) {
        super("7002: Math operation overflowed");
        this.logs = logs;
    }
}
exports.MathOverflow = MathOverflow;
class IntegerOverflow extends Error {
    logs;
    static code = 7003;
    code = 7003;
    name = "IntegerOverflow";
    msg = "Integer conversion overflowed";
    constructor(logs) {
        super("7003: Integer conversion overflowed");
        this.logs = logs;
    }
}
exports.IntegerOverflow = IntegerOverflow;
class WithdrawAmountBelowMinimum extends Error {
    logs;
    static code = 7004;
    code = 7004;
    name = "WithdrawAmountBelowMinimum";
    msg = "Withdrawn amount is below minimum";
    constructor(logs) {
        super("7004: Withdrawn amount is below minimum");
        this.logs = logs;
    }
}
exports.WithdrawAmountBelowMinimum = WithdrawAmountBelowMinimum;
class TooMuchLiquidityToWithdraw extends Error {
    logs;
    static code = 7005;
    code = 7005;
    name = "TooMuchLiquidityToWithdraw";
    msg = "TooMuchLiquidityToWithdraw";
    constructor(logs) {
        super("7005: TooMuchLiquidityToWithdraw");
        this.logs = logs;
    }
}
exports.TooMuchLiquidityToWithdraw = TooMuchLiquidityToWithdraw;
class ReserveAlreadyExists extends Error {
    logs;
    static code = 7006;
    code = 7006;
    name = "ReserveAlreadyExists";
    msg = "ReserveAlreadyExists";
    constructor(logs) {
        super("7006: ReserveAlreadyExists");
        this.logs = logs;
    }
}
exports.ReserveAlreadyExists = ReserveAlreadyExists;
class ReserveNotPartOfAllocations extends Error {
    logs;
    static code = 7007;
    code = 7007;
    name = "ReserveNotPartOfAllocations";
    msg = "ReserveNotPartOfAllocations";
    constructor(logs) {
        super("7007: ReserveNotPartOfAllocations");
        this.logs = logs;
    }
}
exports.ReserveNotPartOfAllocations = ReserveNotPartOfAllocations;
class CouldNotDeserializeAccountAsReserve extends Error {
    logs;
    static code = 7008;
    code = 7008;
    name = "CouldNotDeserializeAccountAsReserve";
    msg = "CouldNotDeserializeAccountAsReserve";
    constructor(logs) {
        super("7008: CouldNotDeserializeAccountAsReserve");
        this.logs = logs;
    }
}
exports.CouldNotDeserializeAccountAsReserve = CouldNotDeserializeAccountAsReserve;
class ReserveNotProvidedInTheAccounts extends Error {
    logs;
    static code = 7009;
    code = 7009;
    name = "ReserveNotProvidedInTheAccounts";
    msg = "ReserveNotProvidedInTheAccounts";
    constructor(logs) {
        super("7009: ReserveNotProvidedInTheAccounts");
        this.logs = logs;
    }
}
exports.ReserveNotProvidedInTheAccounts = ReserveNotProvidedInTheAccounts;
class ReserveAccountAndKeyMismatch extends Error {
    logs;
    static code = 7010;
    code = 7010;
    name = "ReserveAccountAndKeyMismatch";
    msg = "ReserveAccountAndKeyMismatch";
    constructor(logs) {
        super("7010: ReserveAccountAndKeyMismatch");
        this.logs = logs;
    }
}
exports.ReserveAccountAndKeyMismatch = ReserveAccountAndKeyMismatch;
class OutOfRangeOfReserveIndex extends Error {
    logs;
    static code = 7011;
    code = 7011;
    name = "OutOfRangeOfReserveIndex";
    msg = "OutOfRangeOfReserveIndex";
    constructor(logs) {
        super("7011: OutOfRangeOfReserveIndex");
        this.logs = logs;
    }
}
exports.OutOfRangeOfReserveIndex = OutOfRangeOfReserveIndex;
class CannotFindReserveInAllocations extends Error {
    logs;
    static code = 7012;
    code = 7012;
    name = "CannotFindReserveInAllocations";
    msg = "OutOfRangeOfReserveIndex";
    constructor(logs) {
        super("7012: OutOfRangeOfReserveIndex");
        this.logs = logs;
    }
}
exports.CannotFindReserveInAllocations = CannotFindReserveInAllocations;
class InvestAmountBelowMinimum extends Error {
    logs;
    static code = 7013;
    code = 7013;
    name = "InvestAmountBelowMinimum";
    msg = "Invested amount is below minimum";
    constructor(logs) {
        super("7013: Invested amount is below minimum");
        this.logs = logs;
    }
}
exports.InvestAmountBelowMinimum = InvestAmountBelowMinimum;
class AdminAuthorityIncorrect extends Error {
    logs;
    static code = 7014;
    code = 7014;
    name = "AdminAuthorityIncorrect";
    msg = "AdminAuthorityIncorrect";
    constructor(logs) {
        super("7014: AdminAuthorityIncorrect");
        this.logs = logs;
    }
}
exports.AdminAuthorityIncorrect = AdminAuthorityIncorrect;
class BaseVaultAuthorityIncorrect extends Error {
    logs;
    static code = 7015;
    code = 7015;
    name = "BaseVaultAuthorityIncorrect";
    msg = "BaseVaultAuthorityIncorrect";
    constructor(logs) {
        super("7015: BaseVaultAuthorityIncorrect");
        this.logs = logs;
    }
}
exports.BaseVaultAuthorityIncorrect = BaseVaultAuthorityIncorrect;
class BaseVaultAuthorityBumpIncorrect extends Error {
    logs;
    static code = 7016;
    code = 7016;
    name = "BaseVaultAuthorityBumpIncorrect";
    msg = "BaseVaultAuthorityBumpIncorrect";
    constructor(logs) {
        super("7016: BaseVaultAuthorityBumpIncorrect");
        this.logs = logs;
    }
}
exports.BaseVaultAuthorityBumpIncorrect = BaseVaultAuthorityBumpIncorrect;
class TokenMintIncorrect extends Error {
    logs;
    static code = 7017;
    code = 7017;
    name = "TokenMintIncorrect";
    msg = "TokenMintIncorrect";
    constructor(logs) {
        super("7017: TokenMintIncorrect");
        this.logs = logs;
    }
}
exports.TokenMintIncorrect = TokenMintIncorrect;
class TokenMintDecimalsIncorrect extends Error {
    logs;
    static code = 7018;
    code = 7018;
    name = "TokenMintDecimalsIncorrect";
    msg = "TokenMintDecimalsIncorrect";
    constructor(logs) {
        super("7018: TokenMintDecimalsIncorrect");
        this.logs = logs;
    }
}
exports.TokenMintDecimalsIncorrect = TokenMintDecimalsIncorrect;
class TokenVaultIncorrect extends Error {
    logs;
    static code = 7019;
    code = 7019;
    name = "TokenVaultIncorrect";
    msg = "TokenVaultIncorrect";
    constructor(logs) {
        super("7019: TokenVaultIncorrect");
        this.logs = logs;
    }
}
exports.TokenVaultIncorrect = TokenVaultIncorrect;
class SharesMintDecimalsIncorrect extends Error {
    logs;
    static code = 7020;
    code = 7020;
    name = "SharesMintDecimalsIncorrect";
    msg = "SharesMintDecimalsIncorrect";
    constructor(logs) {
        super("7020: SharesMintDecimalsIncorrect");
        this.logs = logs;
    }
}
exports.SharesMintDecimalsIncorrect = SharesMintDecimalsIncorrect;
class SharesMintIncorrect extends Error {
    logs;
    static code = 7021;
    code = 7021;
    name = "SharesMintIncorrect";
    msg = "SharesMintIncorrect";
    constructor(logs) {
        super("7021: SharesMintIncorrect");
        this.logs = logs;
    }
}
exports.SharesMintIncorrect = SharesMintIncorrect;
class InitialAccountingIncorrect extends Error {
    logs;
    static code = 7022;
    code = 7022;
    name = "InitialAccountingIncorrect";
    msg = "InitialAccountingIncorrect";
    constructor(logs) {
        super("7022: InitialAccountingIncorrect");
        this.logs = logs;
    }
}
exports.InitialAccountingIncorrect = InitialAccountingIncorrect;
class ReserveIsStale extends Error {
    logs;
    static code = 7023;
    code = 7023;
    name = "ReserveIsStale";
    msg = "Reserve is stale and must be refreshed before any operation";
    constructor(logs) {
        super("7023: Reserve is stale and must be refreshed before any operation");
        this.logs = logs;
    }
}
exports.ReserveIsStale = ReserveIsStale;
class NotEnoughLiquidityDisinvestedToSendToUser extends Error {
    logs;
    static code = 7024;
    code = 7024;
    name = "NotEnoughLiquidityDisinvestedToSendToUser";
    msg = "Not enough liquidity disinvested to send to user";
    constructor(logs) {
        super("7024: Not enough liquidity disinvested to send to user");
        this.logs = logs;
    }
}
exports.NotEnoughLiquidityDisinvestedToSendToUser = NotEnoughLiquidityDisinvestedToSendToUser;
class BPSValueTooBig extends Error {
    logs;
    static code = 7025;
    code = 7025;
    name = "BPSValueTooBig";
    msg = "BPS value is greater than 10000";
    constructor(logs) {
        super("7025: BPS value is greater than 10000");
        this.logs = logs;
    }
}
exports.BPSValueTooBig = BPSValueTooBig;
class DepositAmountBelowMinimum extends Error {
    logs;
    static code = 7026;
    code = 7026;
    name = "DepositAmountBelowMinimum";
    msg = "Deposited amount is below minimum";
    constructor(logs) {
        super("7026: Deposited amount is below minimum");
        this.logs = logs;
    }
}
exports.DepositAmountBelowMinimum = DepositAmountBelowMinimum;
class ReserveSpaceExhausted extends Error {
    logs;
    static code = 7027;
    code = 7027;
    name = "ReserveSpaceExhausted";
    msg = "Vault have no space for new reserves";
    constructor(logs) {
        super("7027: Vault have no space for new reserves");
        this.logs = logs;
    }
}
exports.ReserveSpaceExhausted = ReserveSpaceExhausted;
class CannotWithdrawFromEmptyVault extends Error {
    logs;
    static code = 7028;
    code = 7028;
    name = "CannotWithdrawFromEmptyVault";
    msg = "Cannot withdraw from empty vault";
    constructor(logs) {
        super("7028: Cannot withdraw from empty vault");
        this.logs = logs;
    }
}
exports.CannotWithdrawFromEmptyVault = CannotWithdrawFromEmptyVault;
class TokensDepositedAmountDoesNotMatch extends Error {
    logs;
    static code = 7029;
    code = 7029;
    name = "TokensDepositedAmountDoesNotMatch";
    msg = "TokensDepositedAmountDoesNotMatch";
    constructor(logs) {
        super("7029: TokensDepositedAmountDoesNotMatch");
        this.logs = logs;
    }
}
exports.TokensDepositedAmountDoesNotMatch = TokensDepositedAmountDoesNotMatch;
class AmountToWithdrawDoesNotMatch extends Error {
    logs;
    static code = 7030;
    code = 7030;
    name = "AmountToWithdrawDoesNotMatch";
    msg = "Amount to withdraw does not match";
    constructor(logs) {
        super("7030: Amount to withdraw does not match");
        this.logs = logs;
    }
}
exports.AmountToWithdrawDoesNotMatch = AmountToWithdrawDoesNotMatch;
class LiquidityToWithdrawDoesNotMatch extends Error {
    logs;
    static code = 7031;
    code = 7031;
    name = "LiquidityToWithdrawDoesNotMatch";
    msg = "Liquidity to withdraw does not match";
    constructor(logs) {
        super("7031: Liquidity to withdraw does not match");
        this.logs = logs;
    }
}
exports.LiquidityToWithdrawDoesNotMatch = LiquidityToWithdrawDoesNotMatch;
class UserReceivedAmountDoesNotMatch extends Error {
    logs;
    static code = 7032;
    code = 7032;
    name = "UserReceivedAmountDoesNotMatch";
    msg = "User received amount does not match";
    constructor(logs) {
        super("7032: User received amount does not match");
        this.logs = logs;
    }
}
exports.UserReceivedAmountDoesNotMatch = UserReceivedAmountDoesNotMatch;
class SharesBurnedAmountDoesNotMatch extends Error {
    logs;
    static code = 7033;
    code = 7033;
    name = "SharesBurnedAmountDoesNotMatch";
    msg = "Shares burned amount does not match";
    constructor(logs) {
        super("7033: Shares burned amount does not match");
        this.logs = logs;
    }
}
exports.SharesBurnedAmountDoesNotMatch = SharesBurnedAmountDoesNotMatch;
class DisinvestedLiquidityAmountDoesNotMatch extends Error {
    logs;
    static code = 7034;
    code = 7034;
    name = "DisinvestedLiquidityAmountDoesNotMatch";
    msg = "Disinvested liquidity amount does not match";
    constructor(logs) {
        super("7034: Disinvested liquidity amount does not match");
        this.logs = logs;
    }
}
exports.DisinvestedLiquidityAmountDoesNotMatch = DisinvestedLiquidityAmountDoesNotMatch;
class SharesMintedAmountDoesNotMatch extends Error {
    logs;
    static code = 7035;
    code = 7035;
    name = "SharesMintedAmountDoesNotMatch";
    msg = "SharesMintedAmountDoesNotMatch";
    constructor(logs) {
        super("7035: SharesMintedAmountDoesNotMatch");
        this.logs = logs;
    }
}
exports.SharesMintedAmountDoesNotMatch = SharesMintedAmountDoesNotMatch;
class AUMDecreasedAfterInvest extends Error {
    logs;
    static code = 7036;
    code = 7036;
    name = "AUMDecreasedAfterInvest";
    msg = "AUM decreased after invest";
    constructor(logs) {
        super("7036: AUM decreased after invest");
        this.logs = logs;
    }
}
exports.AUMDecreasedAfterInvest = AUMDecreasedAfterInvest;
class AUMBelowPendingFees extends Error {
    logs;
    static code = 7037;
    code = 7037;
    name = "AUMBelowPendingFees";
    msg = "AUM is below pending fees";
    constructor(logs) {
        super("7037: AUM is below pending fees");
        this.logs = logs;
    }
}
exports.AUMBelowPendingFees = AUMBelowPendingFees;
class DepositAmountsZeroShares extends Error {
    logs;
    static code = 7038;
    code = 7038;
    name = "DepositAmountsZeroShares";
    msg = "Deposit amount results in 0 shares";
    constructor(logs) {
        super("7038: Deposit amount results in 0 shares");
        this.logs = logs;
    }
}
exports.DepositAmountsZeroShares = DepositAmountsZeroShares;
class WithdrawResultsInZeroShares extends Error {
    logs;
    static code = 7039;
    code = 7039;
    name = "WithdrawResultsInZeroShares";
    msg = "Withdraw amount results in 0 shares";
    constructor(logs) {
        super("7039: Withdraw amount results in 0 shares");
        this.logs = logs;
    }
}
exports.WithdrawResultsInZeroShares = WithdrawResultsInZeroShares;
class CannotWithdrawZeroShares extends Error {
    logs;
    static code = 7040;
    code = 7040;
    name = "CannotWithdrawZeroShares";
    msg = "Cannot withdraw zero shares";
    constructor(logs) {
        super("7040: Cannot withdraw zero shares");
        this.logs = logs;
    }
}
exports.CannotWithdrawZeroShares = CannotWithdrawZeroShares;
class ManagementFeeGreaterThanMaxAllowed extends Error {
    logs;
    static code = 7041;
    code = 7041;
    name = "ManagementFeeGreaterThanMaxAllowed";
    msg = "Management fee is greater than maximum allowed";
    constructor(logs) {
        super("7041: Management fee is greater than maximum allowed");
        this.logs = logs;
    }
}
exports.ManagementFeeGreaterThanMaxAllowed = ManagementFeeGreaterThanMaxAllowed;
class VaultAUMZero extends Error {
    logs;
    static code = 7042;
    code = 7042;
    name = "VaultAUMZero";
    msg = "Vault assets under management are empty";
    constructor(logs) {
        super("7042: Vault assets under management are empty");
        this.logs = logs;
    }
}
exports.VaultAUMZero = VaultAUMZero;
class MissingReserveForBatchRefresh extends Error {
    logs;
    static code = 7043;
    code = 7043;
    name = "MissingReserveForBatchRefresh";
    msg = "Missing reserve for batch refresh";
    constructor(logs) {
        super("7043: Missing reserve for batch refresh");
        this.logs = logs;
    }
}
exports.MissingReserveForBatchRefresh = MissingReserveForBatchRefresh;
class MinWithdrawAmountTooBig extends Error {
    logs;
    static code = 7044;
    code = 7044;
    name = "MinWithdrawAmountTooBig";
    msg = "Min withdraw amount is too big";
    constructor(logs) {
        super("7044: Min withdraw amount is too big");
        this.logs = logs;
    }
}
exports.MinWithdrawAmountTooBig = MinWithdrawAmountTooBig;
class InvestTooSoon extends Error {
    logs;
    static code = 7045;
    code = 7045;
    name = "InvestTooSoon";
    msg = "Invest is called too soon after last invest";
    constructor(logs) {
        super("7045: Invest is called too soon after last invest");
        this.logs = logs;
    }
}
exports.InvestTooSoon = InvestTooSoon;
class WrongAdminOrAllocationAdmin extends Error {
    logs;
    static code = 7046;
    code = 7046;
    name = "WrongAdminOrAllocationAdmin";
    msg = "Wrong admin or allocation admin";
    constructor(logs) {
        super("7046: Wrong admin or allocation admin");
        this.logs = logs;
    }
}
exports.WrongAdminOrAllocationAdmin = WrongAdminOrAllocationAdmin;
class ReserveHasNonZeroAllocationOrCTokens extends Error {
    logs;
    static code = 7047;
    code = 7047;
    name = "ReserveHasNonZeroAllocationOrCTokens";
    msg = "Reserve has non-zero allocation or ctokens so cannot be removed";
    constructor(logs) {
        super("7047: Reserve has non-zero allocation or ctokens so cannot be removed");
        this.logs = logs;
    }
}
exports.ReserveHasNonZeroAllocationOrCTokens = ReserveHasNonZeroAllocationOrCTokens;
class DepositAmountGreaterThanRequestedAmount extends Error {
    logs;
    static code = 7048;
    code = 7048;
    name = "DepositAmountGreaterThanRequestedAmount";
    msg = "Deposit amount is greater than requested amount";
    constructor(logs) {
        super("7048: Deposit amount is greater than requested amount");
        this.logs = logs;
    }
}
exports.DepositAmountGreaterThanRequestedAmount = DepositAmountGreaterThanRequestedAmount;
class WithdrawAmountLessThanWithdrawalPenalty extends Error {
    logs;
    static code = 7049;
    code = 7049;
    name = "WithdrawAmountLessThanWithdrawalPenalty";
    msg = "Withdraw amount is less than withdrawal penalty";
    constructor(logs) {
        super("7049: Withdraw amount is less than withdrawal penalty");
        this.logs = logs;
    }
}
exports.WithdrawAmountLessThanWithdrawalPenalty = WithdrawAmountLessThanWithdrawalPenalty;
class CannotWithdrawZeroLamports extends Error {
    logs;
    static code = 7050;
    code = 7050;
    name = "CannotWithdrawZeroLamports";
    msg = "Cannot withdraw 0 lamports";
    constructor(logs) {
        super("7050: Cannot withdraw 0 lamports");
        this.logs = logs;
    }
}
exports.CannotWithdrawZeroLamports = CannotWithdrawZeroLamports;
class NoUpgradeAuthority extends Error {
    logs;
    static code = 7051;
    code = 7051;
    name = "NoUpgradeAuthority";
    msg = "Cannot initialize global config because there is no upgrade authority to the program";
    constructor(logs) {
        super("7051: Cannot initialize global config because there is no upgrade authority to the program");
        this.logs = logs;
    }
}
exports.NoUpgradeAuthority = NoUpgradeAuthority;
class WithdrawalFeeBPSGreaterThanMaxAllowed extends Error {
    logs;
    static code = 7052;
    code = 7052;
    name = "WithdrawalFeeBPSGreaterThanMaxAllowed";
    msg = "Withdrawal fee BPS is greater than maximum allowed";
    constructor(logs) {
        super("7052: Withdrawal fee BPS is greater than maximum allowed");
        this.logs = logs;
    }
}
exports.WithdrawalFeeBPSGreaterThanMaxAllowed = WithdrawalFeeBPSGreaterThanMaxAllowed;
class WithdrawalFeeLamportsGreaterThanMaxAllowed extends Error {
    logs;
    static code = 7053;
    code = 7053;
    name = "WithdrawalFeeLamportsGreaterThanMaxAllowed";
    msg = "Withdrawal fee lamports is greater than maximum allowed";
    constructor(logs) {
        super("7053: Withdrawal fee lamports is greater than maximum allowed");
        this.logs = logs;
    }
}
exports.WithdrawalFeeLamportsGreaterThanMaxAllowed = WithdrawalFeeLamportsGreaterThanMaxAllowed;
class ReserveNotWhitelisted extends Error {
    logs;
    static code = 7054;
    code = 7054;
    name = "ReserveNotWhitelisted";
    msg = "Reserve is not whitelisted";
    constructor(logs) {
        super("7054: Reserve is not whitelisted");
        this.logs = logs;
    }
}
exports.ReserveNotWhitelisted = ReserveNotWhitelisted;
class InvalidBoolLikeValue extends Error {
    logs;
    static code = 7055;
    code = 7055;
    name = "InvalidBoolLikeValue";
    msg = "Invalid bool-like value passed in (should be 0 or 1)";
    constructor(logs) {
        super("7055: Invalid bool-like value passed in (should be 0 or 1)");
        this.logs = logs;
    }
}
exports.InvalidBoolLikeValue = InvalidBoolLikeValue;
class AUMDecreasedMoreThanExpected extends Error {
    logs;
    static code = 7056;
    code = 7056;
    name = "AUMDecreasedMoreThanExpected";
    msg = "AUM decreased more than expected during redeem in kind";
    constructor(logs) {
        super("7056: AUM decreased more than expected during redeem in kind");
        this.logs = logs;
    }
}
exports.AUMDecreasedMoreThanExpected = AUMDecreasedMoreThanExpected;
class RewardTopupAmountZero extends Error {
    logs;
    static code = 7057;
    code = 7057;
    name = "RewardTopupAmountZero";
    msg = "Reward topup amount is zero";
    constructor(logs) {
        super("7057: Reward topup amount is zero");
        this.logs = logs;
    }
}
exports.RewardTopupAmountZero = RewardTopupAmountZero;
class RewardTopupAmountNotExpected extends Error {
    logs;
    static code = 7058;
    code = 7058;
    name = "RewardTopupAmountNotExpected";
    msg = "Reward topup is not as expected after transfer";
    constructor(logs) {
        super("7058: Reward topup is not as expected after transfer");
        this.logs = logs;
    }
}
exports.RewardTopupAmountNotExpected = RewardTopupAmountNotExpected;
class RewardWithdrawAmountZero extends Error {
    logs;
    static code = 7059;
    code = 7059;
    name = "RewardWithdrawAmountZero";
    msg = "Reward withdraw amount is zero";
    constructor(logs) {
        super("7059: Reward withdraw amount is zero");
        this.logs = logs;
    }
}
exports.RewardWithdrawAmountZero = RewardWithdrawAmountZero;
class RewardWithdrawAmountNotExpected extends Error {
    logs;
    static code = 7060;
    code = 7060;
    name = "RewardWithdrawAmountNotExpected";
    msg = "Reward withdraw is not as expected after transfer";
    constructor(logs) {
        super("7060: Reward withdraw is not as expected after transfer");
        this.logs = logs;
    }
}
exports.RewardWithdrawAmountNotExpected = RewardWithdrawAmountNotExpected;
class RewardsStaleForFeeUpdate extends Error {
    logs;
    static code = 7061;
    code = 7061;
    name = "RewardsStaleForFeeUpdate";
    msg = "Rewards are stale - must be refreshed before updating fees";
    constructor(logs) {
        super("7061: Rewards are stale - must be refreshed before updating fees");
        this.logs = logs;
    }
}
exports.RewardsStaleForFeeUpdate = RewardsStaleForFeeUpdate;
class VaultDepositCapReached extends Error {
    logs;
    static code = 7062;
    code = 7062;
    name = "VaultDepositCapReached";
    msg = "Vault deposit cap reached";
    constructor(logs) {
        super("7062: Vault deposit cap reached");
        this.logs = logs;
    }
}
exports.VaultDepositCapReached = VaultDepositCapReached;
class MaxInvestAmountMustBeGreaterThanZero extends Error {
    logs;
    static code = 7063;
    code = 7063;
    name = "MaxInvestAmountMustBeGreaterThanZero";
    msg = "max_amount must be greater than 0";
    constructor(logs) {
        super("7063: max_amount must be greater than 0");
        this.logs = logs;
    }
}
exports.MaxInvestAmountMustBeGreaterThanZero = MaxInvestAmountMustBeGreaterThanZero;
function fromCode(code, logs) {
    switch (code) {
        case 7000:
            return new DepositAmountsZero(logs);
        case 7001:
            return new SharesIssuedAmountDoesNotMatch(logs);
        case 7002:
            return new MathOverflow(logs);
        case 7003:
            return new IntegerOverflow(logs);
        case 7004:
            return new WithdrawAmountBelowMinimum(logs);
        case 7005:
            return new TooMuchLiquidityToWithdraw(logs);
        case 7006:
            return new ReserveAlreadyExists(logs);
        case 7007:
            return new ReserveNotPartOfAllocations(logs);
        case 7008:
            return new CouldNotDeserializeAccountAsReserve(logs);
        case 7009:
            return new ReserveNotProvidedInTheAccounts(logs);
        case 7010:
            return new ReserveAccountAndKeyMismatch(logs);
        case 7011:
            return new OutOfRangeOfReserveIndex(logs);
        case 7012:
            return new CannotFindReserveInAllocations(logs);
        case 7013:
            return new InvestAmountBelowMinimum(logs);
        case 7014:
            return new AdminAuthorityIncorrect(logs);
        case 7015:
            return new BaseVaultAuthorityIncorrect(logs);
        case 7016:
            return new BaseVaultAuthorityBumpIncorrect(logs);
        case 7017:
            return new TokenMintIncorrect(logs);
        case 7018:
            return new TokenMintDecimalsIncorrect(logs);
        case 7019:
            return new TokenVaultIncorrect(logs);
        case 7020:
            return new SharesMintDecimalsIncorrect(logs);
        case 7021:
            return new SharesMintIncorrect(logs);
        case 7022:
            return new InitialAccountingIncorrect(logs);
        case 7023:
            return new ReserveIsStale(logs);
        case 7024:
            return new NotEnoughLiquidityDisinvestedToSendToUser(logs);
        case 7025:
            return new BPSValueTooBig(logs);
        case 7026:
            return new DepositAmountBelowMinimum(logs);
        case 7027:
            return new ReserveSpaceExhausted(logs);
        case 7028:
            return new CannotWithdrawFromEmptyVault(logs);
        case 7029:
            return new TokensDepositedAmountDoesNotMatch(logs);
        case 7030:
            return new AmountToWithdrawDoesNotMatch(logs);
        case 7031:
            return new LiquidityToWithdrawDoesNotMatch(logs);
        case 7032:
            return new UserReceivedAmountDoesNotMatch(logs);
        case 7033:
            return new SharesBurnedAmountDoesNotMatch(logs);
        case 7034:
            return new DisinvestedLiquidityAmountDoesNotMatch(logs);
        case 7035:
            return new SharesMintedAmountDoesNotMatch(logs);
        case 7036:
            return new AUMDecreasedAfterInvest(logs);
        case 7037:
            return new AUMBelowPendingFees(logs);
        case 7038:
            return new DepositAmountsZeroShares(logs);
        case 7039:
            return new WithdrawResultsInZeroShares(logs);
        case 7040:
            return new CannotWithdrawZeroShares(logs);
        case 7041:
            return new ManagementFeeGreaterThanMaxAllowed(logs);
        case 7042:
            return new VaultAUMZero(logs);
        case 7043:
            return new MissingReserveForBatchRefresh(logs);
        case 7044:
            return new MinWithdrawAmountTooBig(logs);
        case 7045:
            return new InvestTooSoon(logs);
        case 7046:
            return new WrongAdminOrAllocationAdmin(logs);
        case 7047:
            return new ReserveHasNonZeroAllocationOrCTokens(logs);
        case 7048:
            return new DepositAmountGreaterThanRequestedAmount(logs);
        case 7049:
            return new WithdrawAmountLessThanWithdrawalPenalty(logs);
        case 7050:
            return new CannotWithdrawZeroLamports(logs);
        case 7051:
            return new NoUpgradeAuthority(logs);
        case 7052:
            return new WithdrawalFeeBPSGreaterThanMaxAllowed(logs);
        case 7053:
            return new WithdrawalFeeLamportsGreaterThanMaxAllowed(logs);
        case 7054:
            return new ReserveNotWhitelisted(logs);
        case 7055:
            return new InvalidBoolLikeValue(logs);
        case 7056:
            return new AUMDecreasedMoreThanExpected(logs);
        case 7057:
            return new RewardTopupAmountZero(logs);
        case 7058:
            return new RewardTopupAmountNotExpected(logs);
        case 7059:
            return new RewardWithdrawAmountZero(logs);
        case 7060:
            return new RewardWithdrawAmountNotExpected(logs);
        case 7061:
            return new RewardsStaleForFeeUpdate(logs);
        case 7062:
            return new VaultDepositCapReached(logs);
        case 7063:
            return new MaxInvestAmountMustBeGreaterThanZero(logs);
    }
    return null;
}
//# sourceMappingURL=custom.js.map