@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
360 lines (359 loc) • 50.3 kB
JavaScript
"use strict";
/**
* This code was AUTOGENERATED using the Codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun Codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.YVAULTS_ERROR__CANNOT_WITHDRAW_ZERO_AMOUNT = exports.YVAULTS_ERROR__CANNOT_EXECUTIVE_WITHDRAW_ZERO_AMOUNT = exports.YVAULTS_ERROR__DELTA_B_TOO_LARGE = exports.YVAULTS_ERROR__DELTA_A_TOO_LARGE = exports.YVAULTS_ERROR__DIVIDE_BY_ZERO = exports.YVAULTS_ERROR__CANNOT_SWAP_UNEVEN_OUT_OF_RANGE = exports.YVAULTS_ERROR__VAULTS_ARE_ALREADY_BALANCED = exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_BLOCKED = exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP = exports.YVAULTS_ERROR__WRONG_COLLATERAL_I_D = exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_SCOPE = exports.YVAULTS_ERROR__INVALID_POSITION_ACCOUNT = exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_I_D = exports.YVAULTS_ERROR__SWAP_REWARDS_BLOCKED = exports.YVAULTS_ERROR__COLLECT_REWARDS_BLOCKED = exports.YVAULTS_ERROR__COLLECT_FEES_BLOCKED = exports.YVAULTS_ERROR__MAX_INVESTABLE_ZERO = exports.YVAULTS_ERROR__CANNOT_INVEST_ZERO_AMOUNT = exports.YVAULTS_ERROR__PRICE_TOO_OLD = exports.YVAULTS_ERROR__SWAP_AMOUNTS_ZERO = exports.YVAULTS_ERROR__WRONG_VAULT = exports.YVAULTS_ERROR__WRONG_MINT = exports.YVAULTS_ERROR__WRONG_DISCRIMINATOR = exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_MINIMUM = exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_REQUESTED = exports.YVAULTS_ERROR__SWAP_REWARD_TOO_SMALL = exports.YVAULTS_ERROR__SWAP_REWARD_IMBALANCED = exports.YVAULTS_ERROR__PRICE_NOT_VALID = exports.YVAULTS_ERROR__OWN_REWARD_UNINITIALIZED = exports.YVAULTS_ERROR__INVALID_REWARD_INDEX = exports.YVAULTS_ERROR__INVALID_REWARD_MAPPING = exports.YVAULTS_ERROR__UNHARVESTED_AMOUNTS = exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE = exports.YVAULTS_ERROR__SHARES_ZERO = exports.YVAULTS_ERROR__DEPOSIT_AMOUNTS_ZERO = exports.YVAULTS_ERROR__TOO_MUCH_LIQUIDITY_TO_WITHDRAW = exports.YVAULTS_ERROR__MATH_OVERFLOW = exports.YVAULTS_ERROR__OUT_OF_RANGE_INTEGRAL_CONVERSION = exports.YVAULTS_ERROR__GLOBAL_INVEST_BLOCKED = exports.YVAULTS_ERROR__GLOBAL_WITHDRAW_BLOCKED = exports.YVAULTS_ERROR__GLOBAL_DEPOSIT_BLOCKED = exports.YVAULTS_ERROR__SYSTEM_IN_EMERGENCY_MODE = exports.YVAULTS_ERROR__GLOBAL_CONFIG_KEY_ERROR = exports.YVAULTS_ERROR__SHARES_ISSUED_AMOUNT_DOES_NOT_MATCH = exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_B = exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_A = exports.YVAULTS_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT = exports.YVAULTS_ERROR__ZERO_AMOUNT = exports.YVAULTS_ERROR__OPERATION_FORBIDDEN = exports.YVAULTS_ERROR__INTEGER_OVERFLOW = void 0;
exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_BLOCKED = exports.YVAULTS_ERROR__FLASH_IXS_INCLUDE_SCOPE = exports.YVAULTS_ERROR__FLASH_IXS_ACCOUNT_MISMATCH = exports.YVAULTS_ERROR__FLASH_TX_WITH_UNEXPECTED_IXS = exports.YVAULTS_ERROR__FLASH_IXS_NOT_ENDED = exports.YVAULTS_ERROR__SWAP_VAULTS_CASH_OUTPUT_BELOW_MINIMUM = exports.YVAULTS_ERROR__SWAP_VAULTS_TOO_BIG = exports.YVAULTS_ERROR__WRONG_SWAP_VAULT_DIRECTION = exports.YVAULTS_ERROR__STRATEGY_WITHDRAW_BLOCKED = exports.YVAULTS_ERROR__STRATEGY_INVEST_BLOCKED = exports.YVAULTS_ERROR__STRATEGY_DEPOSIT_BLOCKED = exports.YVAULTS_ERROR__INVALID_DEX_PROGRAM_ID = exports.YVAULTS_ERROR__SWAP_AMOUNTS_TOO_SMALL = exports.YVAULTS_ERROR__ACCOUNT_DIFFERENT_THAN_EXPECTED = exports.YVAULTS_ERROR__PRICE_IS_LOWER_THAN_HEURISTIC = exports.YVAULTS_ERROR__PRICE_IS_BIGGER_THAN_HEURISTIC = exports.YVAULTS_ERROR__INVALID_ADMIN_AUTHORITY = exports.YVAULTS_ERROR__ORCA_REWARD_UNINITIALIZED = exports.YVAULTS_ERROR__WRONG_D_E_X_PROGRAM_I_D = exports.YVAULTS_ERROR__ACCOUNT_NOT_BELONG_TO_D_E_X = exports.YVAULTS_ERROR__UNEXPECTED_TOKEN_AMOUNTS_POST_SWAP = exports.YVAULTS_ERROR__STRATEGY_NOT_FROZEN = exports.YVAULTS_ERROR__EMERGENCY_SWAP_BLOCKED = exports.YVAULTS_ERROR__BPS_NOT_IN_RANGE = exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_OVERSHOOT = exports.YVAULTS_ERROR__KAMINO_REWARD_EXCEEDS_AVAILABLE_AMOUNT = exports.YVAULTS_ERROR__KAMINO_COLLATERAL_NOT_VALID = exports.YVAULTS_ERROR__KAMINO_REWARD_ALREADY_EXISTS = exports.YVAULTS_ERROR__KAMINO_REWARD_NOT_EXIST = exports.YVAULTS_ERROR__WRONG_KAMINO_REWARD_ID = exports.YVAULTS_ERROR__EXISTING_REWARD_OVERRIDE = exports.YVAULTS_ERROR__PRICE_TOO_DIVERGENT_FROM_TWAP = exports.YVAULTS_ERROR__SCOPE_CHAIN_UPDATE_FAILED = exports.YVAULTS_ERROR__CANNOT_RESIZE_ACCOUNT = exports.YVAULTS_ERROR__CANNOT_CHANGE_ADMIN_AUTHORITY = exports.YVAULTS_ERROR__UPPER_TICK_NOT_MULTIPLE_OF_TICK_SPACING = exports.YVAULTS_ERROR__LOWER_TICK_NOT_MULTIPLE_OF_TICK_SPACING = exports.YVAULTS_ERROR__UPPER_TICK_TOO_LARGE = exports.YVAULTS_ERROR__LOWER_TICK_TOO_LOW = exports.YVAULTS_ERROR__LOWER_TICK_LARGER_THAN_UPPER_TICK = exports.YVAULTS_ERROR__ORCA_PRICE_TOO_DIFFERENT_FROM_SCOPE = exports.YVAULTS_ERROR__C_P_I_NOT_ALLOWED = exports.YVAULTS_ERROR__TIMESTAMP_DECREASE = exports.YVAULTS_ERROR__WITHDRAWAL_CAP_REACHED = exports.YVAULTS_ERROR__CANNOT_INVEST_OUT_OF_RANGE = exports.YVAULTS_ERROR__CANNOT_DEPOSIT_OUT_OF_RANGE = exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP_PER_IXN = exports.YVAULTS_ERROR__CANNOT_OPEN_POSITION_WITH_EXISTING_POSITION = exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE_WHEN_DEPOSITING = exports.YVAULTS_ERROR__CANNOT_COLLECT_FEES_ON_ZERO_LIQUIDITY_POSITION = void 0;
exports.YVAULTS_ERROR__REWARD_VAULT_OVERRIDE_NOT_ALLOWED = exports.YVAULTS_ERROR__INVALID_B_P_S_VALUE = exports.YVAULTS_ERROR__UNSUPPORTED_DEX = exports.YVAULTS_ERROR__STRATEGY_FIELD_UPDATE_NOT_ALLOWED = exports.YVAULTS_ERROR__WRONG_EVENT_AUTHORITY = exports.YVAULTS_ERROR__STRATEGY_TICK_ARRAY_NOT_VALID = exports.YVAULTS_ERROR__METEORA_MATH_OVERFLOW = exports.YVAULTS_ERROR__INVALID_TICK = exports.YVAULTS_ERROR__SWAP_UNEVEN_INVALID_AUTHORITY = exports.YVAULTS_ERROR__REBALANCES_CAP_REACHED = exports.YVAULTS_ERROR__FLASH_SWAP_TOO_EARLY = exports.YVAULTS_ERROR__SWAP_UNEVEN_TOO_EARLY = exports.YVAULTS_ERROR__INVEST_TOO_EARLY = exports.YVAULTS_ERROR__COLLATERAL_INFO_ALREADY_EXISTS = exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_ID = exports.YVAULTS_ERROR__DRIFTING_OPPOSITE_DIRECTION = exports.YVAULTS_ERROR__DECIMAL_NEGATIVE_SQRT_ROOT = exports.YVAULTS_ERROR__DECIMAL_TO_U128_CONVERSION_FAILED = exports.YVAULTS_ERROR__STAKING_RATE_NOT_VALID = exports.YVAULTS_ERROR__INVALID_SCOPE_STAKING_RATE_CHAIN = exports.YVAULTS_ERROR__SHARES_NOT_ZERO = exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_UPDATE_ERROR = exports.YVAULTS_ERROR__UNEXPECTED_PROGRAM_ID_FOR_PREREQUISITE_IX = exports.YVAULTS_ERROR__TOKEN_ACCOUNT_BALANCE_MISMATCH = exports.YVAULTS_ERROR__TOKEN_TO_SWAP_NOT_ENOUGH = exports.YVAULTS_ERROR__INVALID_REFERENCE_PRICE_TYPE = exports.YVAULTS_ERROR__TOKEN_DISABLED = exports.YVAULTS_ERROR__VAULT_BALANCES_CAUSES_WRONG_SHARES_ISSUANCE = exports.YVAULTS_ERROR__DECIMAL_OPERATION_FAILED = exports.YVAULTS_ERROR__DECIMAL_TO_U64_CONVERSION_FAILED = exports.YVAULTS_ERROR__REWARD_NOT_STRATEGY_TOKEN = exports.YVAULTS_ERROR__MAX_LOSS_EXCEEDED = exports.YVAULTS_ERROR__AMOUNTS_REPRESENT_ZERO_SHARES = exports.YVAULTS_ERROR__NOT_ENOUGH_TOKENS_FOR_RATIO = exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_PARAMS = exports.YVAULTS_ERROR__COULD_NOT_SERIALIZE_REBALANCE_STATE = exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_STATE = exports.YVAULTS_ERROR__STRATEGY_POSITION_NOT_VALID = exports.YVAULTS_ERROR__TICK_ARRAYS_DO_NOT_MATCH_REBALANCE = exports.YVAULTS_ERROR__NO_REBALANCE_NECESSARY = exports.YVAULTS_ERROR__INVALID_REBALANCE_TYPE = exports.YVAULTS_ERROR__MANUAL_REBALANCE_INVALID_OWNER = exports.YVAULTS_ERROR__PERMISSIONLESS_REBALANCING_DISABLED = exports.YVAULTS_ERROR__POOL_REBALANCING = exports.YVAULTS_ERROR__POSITION_HAS_REMAINING_LIQUIDITY = exports.YVAULTS_ERROR__INVALID_SCOPE_T_W_A_P_CHAIN = exports.YVAULTS_ERROR__INVALID_SCOPE_CHAIN = exports.YVAULTS_ERROR__DEPOSIT_WITHOUT_INVEST_DISALLOWED = exports.YVAULTS_ERROR__DEPOSIT_LESS_THAN_MINIMUM = exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_WRONG_AMOUNT_TO_LEAVE = void 0;
exports.YVAULTS_ERROR__INVEST_AMOUNT_BELOW_MINIMUM = exports.YVAULTS_ERROR__INVEST_COOLDOWN_NOT_ELAPSED = exports.YVAULTS_ERROR__REFERENCE_PRICE_TOO_FAR_FROM_POOL_PRICE = exports.YVAULTS_ERROR__COULD_NOT_CALCULATE_PRICE_TWAP = exports.YVAULTS_ERROR__INCORRECT_SCOPE_PRICES_ACCOUNT_I_D = exports.YVAULTS_ERROR__REWARD_SCOPE_PRICE_ACCOUNT_NOT_PRESENT = exports.YVAULTS_ERROR__GLOBAL_CONFIG_EXPECTED_SCOPE_PRICES_ACCOUNT = exports.YVAULTS_ERROR__GLOBAL_CONFIG_ALREADY_CONTAINS_SCOPE_PRICE_ID = exports.YVAULTS_ERROR__GLOBAL_CONFIG_SCOPE_PRICES_IDS_FULL = exports.YVAULTS_ERROR__GLOBAL_CONFIG_INVALID_SCOPE_PRICE_INDEX = exports.YVAULTS_ERROR__UNSUPPORTED_DEX_FOR_TOKEN22 = exports.YVAULTS_ERROR__UNSUPPORTED_TOKEN_EXTENSION = exports.YVAULTS_ERROR__REPEATED_MINT = exports.YVAULTS_ERROR__PROVIDED_REWARD_VAULT_MISMATCH = exports.YVAULTS_ERROR__CHANGING_POOL_REWARD_MINT_MISMATCH = exports.YVAULTS_ERROR__EMPTY_TREASURY = exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_INVALID_REWARD = void 0;
exports.getYvaultsErrorMessage = getYvaultsErrorMessage;
exports.isYvaultsError = isYvaultsError;
const kit_1 = require("@solana/kit");
const programs_1 = require("../programs");
/** IntegerOverflow: Integer overflow */
exports.YVAULTS_ERROR__INTEGER_OVERFLOW = 0x1770; // 6000
/** OperationForbidden: Operation Forbidden */
exports.YVAULTS_ERROR__OPERATION_FORBIDDEN = 0x1771; // 6001
/** ZeroAmount: [DEPRECATED] Zero amount */
exports.YVAULTS_ERROR__ZERO_AMOUNT = 0x1772; // 6002
/** UnableToDeserializeAccount: Unable to deserialize account */
exports.YVAULTS_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT = 0x1773; // 6003
/** VaultBalanceDoesNotMatchTokenA: [DEPRECATED] Vault balance does not match for token A */
exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_A = 0x1774; // 6004
/** VaultBalanceDoesNotMatchTokenB: [DEPRECATED] Vault balance does not match for token B */
exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_B = 0x1775; // 6005
/** SharesIssuedAmountDoesNotMatch: [DEPRECATED] Shares issued amount does not match */
exports.YVAULTS_ERROR__SHARES_ISSUED_AMOUNT_DOES_NOT_MATCH = 0x1776; // 6006
/** GlobalConfigKeyError: Key is not present in global config */
exports.YVAULTS_ERROR__GLOBAL_CONFIG_KEY_ERROR = 0x1777; // 6007
/** SystemInEmergencyMode: [DEPRECATED] System is in emergency mode */
exports.YVAULTS_ERROR__SYSTEM_IN_EMERGENCY_MODE = 0x1778; // 6008
/** GlobalDepositBlocked: Global deposit is currently blocked */
exports.YVAULTS_ERROR__GLOBAL_DEPOSIT_BLOCKED = 0x1779; // 6009
/** GlobalWithdrawBlocked: Global withdraw is currently blocked */
exports.YVAULTS_ERROR__GLOBAL_WITHDRAW_BLOCKED = 0x177a; // 6010
/** GlobalInvestBlocked: Global invest is currently blocked */
exports.YVAULTS_ERROR__GLOBAL_INVEST_BLOCKED = 0x177b; // 6011
/** OutOfRangeIntegralConversion: Out of range integral conversion attempted */
exports.YVAULTS_ERROR__OUT_OF_RANGE_INTEGRAL_CONVERSION = 0x177c; // 6012
/** MathOverflow: [DEPRECATED] Mathematical operation with overflow */
exports.YVAULTS_ERROR__MATH_OVERFLOW = 0x177d; // 6013
/** TooMuchLiquidityToWithdraw: Unable to withdraw more liquidity than available in position */
exports.YVAULTS_ERROR__TOO_MUCH_LIQUIDITY_TO_WITHDRAW = 0x177e; // 6014
/** DepositAmountsZero: Deposit amounts must be greater than zero */
exports.YVAULTS_ERROR__DEPOSIT_AMOUNTS_ZERO = 0x177f; // 6015
/** SharesZero: Number of shares to withdraw must be greater than zero */
exports.YVAULTS_ERROR__SHARES_ZERO = 0x1780; // 6016
/** StrategyNotActive: Strategy not active */
exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE = 0x1781; // 6017
/** UnharvestedAmounts: There are unharvested gains */
exports.YVAULTS_ERROR__UNHARVESTED_AMOUNTS = 0x1782; // 6018
/** InvalidRewardMapping: Reward mapping incorrect */
exports.YVAULTS_ERROR__INVALID_REWARD_MAPPING = 0x1783; // 6019
/** InvalidRewardIndex: Reward index incorrect */
exports.YVAULTS_ERROR__INVALID_REWARD_INDEX = 0x1784; // 6020
/** OwnRewardUninitialized: Cannot use uninitialized reward vault */
exports.YVAULTS_ERROR__OWN_REWARD_UNINITIALIZED = 0x1785; // 6021
/** PriceNotValid: Price is not valid */
exports.YVAULTS_ERROR__PRICE_NOT_VALID = 0x1786; // 6022
/** SwapRewardImbalanced: Must provide almost equal amounts of tokens */
exports.YVAULTS_ERROR__SWAP_REWARD_IMBALANCED = 0x1787; // 6023
/** SwapRewardTooSmall: Swap reward is zero or less than requested */
exports.YVAULTS_ERROR__SWAP_REWARD_TOO_SMALL = 0x1788; // 6024
/** SwapRewardLessThanRequested: Swap reward is less than what user requested as minimum */
exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_REQUESTED = 0x1789; // 6025
/** SwapRewardLessThanMinimum: Swap reward is less than minimum acceptable */
exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_MINIMUM = 0x178a; // 6026
/** WrongDiscriminator: Wrong discriminator */
exports.YVAULTS_ERROR__WRONG_DISCRIMINATOR = 0x178b; // 6027
/** WrongMint: Wrong mint */
exports.YVAULTS_ERROR__WRONG_MINT = 0x178c; // 6028
/** WrongVault: Wrong vault */
exports.YVAULTS_ERROR__WRONG_VAULT = 0x178d; // 6029
/** SwapAmountsZero: Swap amounts must be greater than zero */
exports.YVAULTS_ERROR__SWAP_AMOUNTS_ZERO = 0x178e; // 6030
/** PriceTooOld: Price too old */
exports.YVAULTS_ERROR__PRICE_TOO_OLD = 0x178f; // 6031
/** CannotInvestZeroAmount: Cannot invest zero amount */
exports.YVAULTS_ERROR__CANNOT_INVEST_ZERO_AMOUNT = 0x1790; // 6032
/** MaxInvestableZero: Cannot have zero investable amount */
exports.YVAULTS_ERROR__MAX_INVESTABLE_ZERO = 0x1791; // 6033
/** CollectFeesBlocked: Collect fees is blocked */
exports.YVAULTS_ERROR__COLLECT_FEES_BLOCKED = 0x1792; // 6034
/** CollectRewardsBlocked: Collect rewards is blocked */
exports.YVAULTS_ERROR__COLLECT_REWARDS_BLOCKED = 0x1793; // 6035
/** SwapRewardsBlocked: Swap rewards is blocked */
exports.YVAULTS_ERROR__SWAP_REWARDS_BLOCKED = 0x1794; // 6036
/** WrongRewardCollateralID: Reward collateral ID is incorrect for strategy */
exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_I_D = 0x1795; // 6037
/** InvalidPositionAccount: Position account doesn't match internal records */
exports.YVAULTS_ERROR__INVALID_POSITION_ACCOUNT = 0x1796; // 6038
/** CouldNotDeserializeScope: Scope account could not be deserialized */
exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_SCOPE = 0x1797; // 6039
/** WrongCollateralID: [DEPRECATED] Collateral ID invalid for strategy */
exports.YVAULTS_ERROR__WRONG_COLLATERAL_I_D = 0x1798; // 6040
/** CollateralTokensExceedDepositCap: Collaterals exceed deposit cap */
exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP = 0x1799; // 6041
/** SwapUnevenVaultsBlocked: Swap uneven vaults is blocked */
exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_BLOCKED = 0x179a; // 6042
/** VaultsAreAlreadyBalanced: Cannot swap as vaults are already balanced */
exports.YVAULTS_ERROR__VAULTS_ARE_ALREADY_BALANCED = 0x179b; // 6043
/** CannotSwapUnevenOutOfRange: Cannot swap uneven vaults when position is out of range */
exports.YVAULTS_ERROR__CANNOT_SWAP_UNEVEN_OUT_OF_RANGE = 0x179c; // 6044
/** DivideByZero: Cannot divide by zero */
exports.YVAULTS_ERROR__DIVIDE_BY_ZERO = 0x179d; // 6045
/** DeltaATooLarge: [DEPRECATED] Delta A too large */
exports.YVAULTS_ERROR__DELTA_A_TOO_LARGE = 0x179e; // 6046
/** DeltaBTooLarge: [DEPRECATED] Delta B too large */
exports.YVAULTS_ERROR__DELTA_B_TOO_LARGE = 0x179f; // 6047
/** CannotExecutiveWithdrawZeroAmount: [DEPRECATED] Cannot executive withdraw zero amount */
exports.YVAULTS_ERROR__CANNOT_EXECUTIVE_WITHDRAW_ZERO_AMOUNT = 0x17a0; // 6048
/** CannotWithdrawZeroAmount: Cannot withdraw zero amount */
exports.YVAULTS_ERROR__CANNOT_WITHDRAW_ZERO_AMOUNT = 0x17a1; // 6049
/** CannotCollectFeesOnZeroLiquidityPosition: [DEPRECATED] Cannot collect fees on zero liquidity position */
exports.YVAULTS_ERROR__CANNOT_COLLECT_FEES_ON_ZERO_LIQUIDITY_POSITION = 0x17a2; // 6050
/** StrategyNotActiveWhenDepositing: Cannot deposit inactive position */
exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE_WHEN_DEPOSITING = 0x17a3; // 6051
/** CannotOpenPositionWithExistingPosition: Cannot open position with existing opened position */
exports.YVAULTS_ERROR__CANNOT_OPEN_POSITION_WITH_EXISTING_POSITION = 0x17a4; // 6052
/** CollateralTokensExceedDepositCapPerIxn: Collaterals exceed deposit ixn cap */
exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP_PER_IXN = 0x17a5; // 6053
/** CannotDepositOutOfRange: Cannot deposit when strategy out of range */
exports.YVAULTS_ERROR__CANNOT_DEPOSIT_OUT_OF_RANGE = 0x17a6; // 6054
/** CannotInvestOutOfRange: Cannot invest when strategy out of range */
exports.YVAULTS_ERROR__CANNOT_INVEST_OUT_OF_RANGE = 0x17a7; // 6055
/** WithdrawalCapReached: Withdrawal cap is reached */
exports.YVAULTS_ERROR__WITHDRAWAL_CAP_REACHED = 0x17a8; // 6056
/** TimestampDecrease: Timestamp decrease */
exports.YVAULTS_ERROR__TIMESTAMP_DECREASE = 0x17a9; // 6057
/** CPINotAllowed: CPI not allowed */
exports.YVAULTS_ERROR__C_P_I_NOT_ALLOWED = 0x17aa; // 6058
/** OrcaPriceTooDifferentFromScope: Cannot use orca price as it is too different from scope price */
exports.YVAULTS_ERROR__ORCA_PRICE_TOO_DIFFERENT_FROM_SCOPE = 0x17ab; // 6059
/** LowerTickLargerThanUpperTick: Lower tick larger than upper tick */
exports.YVAULTS_ERROR__LOWER_TICK_LARGER_THAN_UPPER_TICK = 0x17ac; // 6060
/** LowerTickTooLow: Lower tick is lower than the minimal supported low tick */
exports.YVAULTS_ERROR__LOWER_TICK_TOO_LOW = 0x17ad; // 6061
/** UpperTickTooLarge: Upper tick is larger than the maximum supported tick */
exports.YVAULTS_ERROR__UPPER_TICK_TOO_LARGE = 0x17ae; // 6062
/** LowerTickNotMultipleOfTickSpacing: Lower tick is not a multiple of tick spacing */
exports.YVAULTS_ERROR__LOWER_TICK_NOT_MULTIPLE_OF_TICK_SPACING = 0x17af; // 6063
/** UpperTickNotMultipleOfTickSpacing: Upper tick is not a multiple of tick spacing */
exports.YVAULTS_ERROR__UPPER_TICK_NOT_MULTIPLE_OF_TICK_SPACING = 0x17b0; // 6064
/** CannotChangeAdminAuthority: Cannot change admin authority */
exports.YVAULTS_ERROR__CANNOT_CHANGE_ADMIN_AUTHORITY = 0x17b1; // 6065
/** CannotResizeAccount: Cannot resize with smaller new size */
exports.YVAULTS_ERROR__CANNOT_RESIZE_ACCOUNT = 0x17b2; // 6066
/** ScopeChainUpdateFailed: Scope chain update failed */
exports.YVAULTS_ERROR__SCOPE_CHAIN_UPDATE_FAILED = 0x17b3; // 6067
/** PriceTooDivergentFromTwap: Price too divergent from twap */
exports.YVAULTS_ERROR__PRICE_TOO_DIVERGENT_FROM_TWAP = 0x17b4; // 6068
/** ExistingRewardOverride: [DEPRECATED] Can not override the existing reward */
exports.YVAULTS_ERROR__EXISTING_REWARD_OVERRIDE = 0x17b5; // 6069
/** WrongKaminoRewardId: Kamino reward id exceeds the available slots */
exports.YVAULTS_ERROR__WRONG_KAMINO_REWARD_ID = 0x17b6; // 6070
/** KaminoRewardNotExist: Kamino reward is not initialized */
exports.YVAULTS_ERROR__KAMINO_REWARD_NOT_EXIST = 0x17b7; // 6071
/** KaminoRewardAlreadyExists: Kamino reward is already initialized */
exports.YVAULTS_ERROR__KAMINO_REWARD_ALREADY_EXISTS = 0x17b8; // 6072
/** KaminoCollateralNotValid: Kamino collateral is not valid */
exports.YVAULTS_ERROR__KAMINO_COLLATERAL_NOT_VALID = 0x17b9; // 6073
/** KaminoRewardExceedsAvailableAmount: [DEPRECATED] Expected kamino reward is bigger then the available amount within the vault */
exports.YVAULTS_ERROR__KAMINO_REWARD_EXCEEDS_AVAILABLE_AMOUNT = 0x17ba; // 6074
/** SwapUnevenVaultsOvershoot: Swap uneven vaults result in the opposite unbalance of the vaults */
exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_OVERSHOOT = 0x17bb; // 6075
/** BpsNotInRange: Bps parameter passed to instruction is not in range */
exports.YVAULTS_ERROR__BPS_NOT_IN_RANGE = 0x17bc; // 6076
/** EmergencySwapBlocked: Emergency Swap is blocked */
exports.YVAULTS_ERROR__EMERGENCY_SWAP_BLOCKED = 0x17bd; // 6077
/** StrategyNotFrozen: Strategy is expected to be frozen for this operation */
exports.YVAULTS_ERROR__STRATEGY_NOT_FROZEN = 0x17be; // 6078
/** UnexpectedTokenAmountsPostSwap: Token left in vault post swap are lower than expected */
exports.YVAULTS_ERROR__UNEXPECTED_TOKEN_AMOUNTS_POST_SWAP = 0x17bf; // 6079
/** AccountNotBelongToDEX: Account doesn't belong to the DEX */
exports.YVAULTS_ERROR__ACCOUNT_NOT_BELONG_TO_D_E_X = 0x17c0; // 6080
/** WrongDEXProgramID: Wrong DEX program ID */
exports.YVAULTS_ERROR__WRONG_D_E_X_PROGRAM_I_D = 0x17c1; // 6081
/** OrcaRewardUninitialized: Cannot use uninitialized orca reward vault */
exports.YVAULTS_ERROR__ORCA_REWARD_UNINITIALIZED = 0x17c2; // 6082
/** InvalidAdminAuthority: Invalid admin authority */
exports.YVAULTS_ERROR__INVALID_ADMIN_AUTHORITY = 0x17c3; // 6083
/** PriceIsBiggerThanHeuristic: Token price is bigger than heuristic */
exports.YVAULTS_ERROR__PRICE_IS_BIGGER_THAN_HEURISTIC = 0x17c4; // 6084
/** PriceIsLowerThanHeuristic: Token price is lower than heuristic */
exports.YVAULTS_ERROR__PRICE_IS_LOWER_THAN_HEURISTIC = 0x17c5; // 6085
/** AccountDifferentThanExpected: Account different than expected */
exports.YVAULTS_ERROR__ACCOUNT_DIFFERENT_THAN_EXPECTED = 0x17c6; // 6086
/** SwapAmountsTooSmall: Swap amount below the minimum value */
exports.YVAULTS_ERROR__SWAP_AMOUNTS_TOO_SMALL = 0x17c7; // 6087
/** InvalidDexProgramId: Invalid dex program id */
exports.YVAULTS_ERROR__INVALID_DEX_PROGRAM_ID = 0x17c8; // 6088
/** StrategyDepositBlocked: Strategy deposit is currently blocked */
exports.YVAULTS_ERROR__STRATEGY_DEPOSIT_BLOCKED = 0x17c9; // 6089
/** StrategyInvestBlocked: Strategy invest is currently blocked */
exports.YVAULTS_ERROR__STRATEGY_INVEST_BLOCKED = 0x17ca; // 6090
/** StrategyWithdrawBlocked: Strategy withdraw is currently blocked */
exports.YVAULTS_ERROR__STRATEGY_WITHDRAW_BLOCKED = 0x17cb; // 6091
/** WrongSwapVaultDirection: Vault swap can't be performed in the required direction */
exports.YVAULTS_ERROR__WRONG_SWAP_VAULT_DIRECTION = 0x17cc; // 6092
/** SwapVaultsTooBig: Provided amount for vault swap is over the limit */
exports.YVAULTS_ERROR__SWAP_VAULTS_TOO_BIG = 0x17cd; // 6093
/** SwapVaultsCashOutputBelowMinimum: Token out for cash based vault swap is below minimum expected */
exports.YVAULTS_ERROR__SWAP_VAULTS_CASH_OUTPUT_BELOW_MINIMUM = 0x17ce; // 6094
/** FlashIxsNotEnded: Flash ixs initiated without the closing ix in the transaction */
exports.YVAULTS_ERROR__FLASH_IXS_NOT_ENDED = 0x17cf; // 6095
/** FlashTxWithUnexpectedIxs: Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between */
exports.YVAULTS_ERROR__FLASH_TX_WITH_UNEXPECTED_IXS = 0x17d0; // 6096
/** FlashIxsAccountMismatch: Some accounts differ between the two flash ixs */
exports.YVAULTS_ERROR__FLASH_IXS_ACCOUNT_MISMATCH = 0x17d1; // 6097
/** FlashIxsIncludeScope: A scope ix is present in a flash tx */
exports.YVAULTS_ERROR__FLASH_IXS_INCLUDE_SCOPE = 0x17d2; // 6098
/** FlashVaultSwapBlocked: Flash vault swap is blocked on this strategy */
exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_BLOCKED = 0x17d3; // 6099
/** FlashVaultSwapWrongAmountToLeave: Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user) */
exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_WRONG_AMOUNT_TO_LEAVE = 0x17d4; // 6100
/** DepositLessThanMinimum: Deposit amount less than minimal allowed */
exports.YVAULTS_ERROR__DEPOSIT_LESS_THAN_MINIMUM = 0x17d5; // 6101
/** DepositWithoutInvestDisallowed: Cannot deposit without invest */
exports.YVAULTS_ERROR__DEPOSIT_WITHOUT_INVEST_DISALLOWED = 0x17d6; // 6102
/** InvalidScopeChain: Invalid Scope Chain */
exports.YVAULTS_ERROR__INVALID_SCOPE_CHAIN = 0x17d7; // 6103
/** InvalidScopeTWAPChain: Invalid Scope TWAP Chain */
exports.YVAULTS_ERROR__INVALID_SCOPE_T_W_A_P_CHAIN = 0x17d8; // 6104
/** PositionHasRemainingLiquidity: Existent position has liquidity, new position creation is forbidden */
exports.YVAULTS_ERROR__POSITION_HAS_REMAINING_LIQUIDITY = 0x17d9; // 6105
/** PoolRebalancing: Deposit is not allowed as pool is rebalancing */
exports.YVAULTS_ERROR__POOL_REBALANCING = 0x17da; // 6106
/** PermissionlessRebalancingDisabled: Permissionless rebalancing is disabled */
exports.YVAULTS_ERROR__PERMISSIONLESS_REBALANCING_DISABLED = 0x17db; // 6107
/** ManualRebalanceInvalidOwner: Only the owner of the strategy can manually rebalance it */
exports.YVAULTS_ERROR__MANUAL_REBALANCE_INVALID_OWNER = 0x17dc; // 6108
/** InvalidRebalanceType: Invalid rebalance type for the strategy */
exports.YVAULTS_ERROR__INVALID_REBALANCE_TYPE = 0x17dd; // 6109
/** NoRebalanceNecessary: No rebalance necessary based on current rebalance type/parameters */
exports.YVAULTS_ERROR__NO_REBALANCE_NECESSARY = 0x17de; // 6110
/** TickArraysDoNotMatchRebalance: The given tick arrays do not match the rebalance result */
exports.YVAULTS_ERROR__TICK_ARRAYS_DO_NOT_MATCH_REBALANCE = 0x17df; // 6111
/** StrategyPositionNotValid: Expected strategy position to be initialized */
exports.YVAULTS_ERROR__STRATEGY_POSITION_NOT_VALID = 0x17e0; // 6112
/** CouldNotDeserializeRebalanceState: Rebalance state could not be deserialized */
exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_STATE = 0x17e1; // 6113
/** CouldNotSerializeRebalanceState: Rebalance state could not be serialized */
exports.YVAULTS_ERROR__COULD_NOT_SERIALIZE_REBALANCE_STATE = 0x17e2; // 6114
/** CouldNotDeserializeRebalanceParams: Rebalance params could not be deserialized */
exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_PARAMS = 0x17e3; // 6115
/** NotEnoughTokensForRatio: Deposit is not allowed as token amounts are not enough to match our holdings ratio */
exports.YVAULTS_ERROR__NOT_ENOUGH_TOKENS_FOR_RATIO = 0x17e4; // 6116
/** AmountsRepresentZeroShares: The provided amounts are too small */
exports.YVAULTS_ERROR__AMOUNTS_REPRESENT_ZERO_SHARES = 0x17e5; // 6117
/** MaxLossExceeded: Rouding errors exceed the maximal loss tolerance */
exports.YVAULTS_ERROR__MAX_LOSS_EXCEEDED = 0x17e6; // 6118
/** RewardNotStrategyToken: Reward does not match strategy token */
exports.YVAULTS_ERROR__REWARD_NOT_STRATEGY_TOKEN = 0x17e7; // 6119
/** DecimalToU64ConversionFailed: Decimal to u64 conversion failed */
exports.YVAULTS_ERROR__DECIMAL_TO_U64_CONVERSION_FAILED = 0x17e8; // 6120
/** DecimalOperationFailed: Decimal operation failed */
exports.YVAULTS_ERROR__DECIMAL_OPERATION_FAILED = 0x17e9; // 6121
/** VaultBalancesCausesWrongSharesIssuance: Deposit is not allowed as the strategy is not fully invested in the pool */
exports.YVAULTS_ERROR__VAULT_BALANCES_CAUSES_WRONG_SHARES_ISSUANCE = 0x17ea; // 6122
/** TokenDisabled: Token cannot be used in strategy creation */
exports.YVAULTS_ERROR__TOKEN_DISABLED = 0x17eb; // 6123
/** InvalidReferencePriceType: Invalid reference price type */
exports.YVAULTS_ERROR__INVALID_REFERENCE_PRICE_TYPE = 0x17ec; // 6124
/** TokenToSwapNotEnough: Token amount to be swapped is not enough */
exports.YVAULTS_ERROR__TOKEN_TO_SWAP_NOT_ENOUGH = 0x17ed; // 6125
/** TokenAccountBalanceMismatch: Token amount in ata is different than the expected amount */
exports.YVAULTS_ERROR__TOKEN_ACCOUNT_BALANCE_MISMATCH = 0x17ee; // 6126
/** UnexpectedProgramIdForPrerequisiteIx: Unexpected programID for prerequisite ix */
exports.YVAULTS_ERROR__UNEXPECTED_PROGRAM_ID_FOR_PREREQUISITE_IX = 0x17ef; // 6127
/** ComputeFeesAndRewardsUpdateError: Got an error from the dex specific function while computing the fees/rewards update */
exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_UPDATE_ERROR = 0x17f0; // 6128
/** SharesNotZero: There must be no shares issued when closing a strategy */
exports.YVAULTS_ERROR__SHARES_NOT_ZERO = 0x17f1; // 6129
/** InvalidScopeStakingRateChain: Invalid Scope staking rate Chain */
exports.YVAULTS_ERROR__INVALID_SCOPE_STAKING_RATE_CHAIN = 0x17f2; // 6130
/** StakingRateNotValid: Staking rate (provided by Scope) is not valid */
exports.YVAULTS_ERROR__STAKING_RATE_NOT_VALID = 0x17f3; // 6131
/** DecimalToU128ConversionFailed: Decimal to u128 conversion failed */
exports.YVAULTS_ERROR__DECIMAL_TO_U128_CONVERSION_FAILED = 0x17f4; // 6132
/** DecimalNegativeSqrtRoot: Decimal sqrt on negative number */
exports.YVAULTS_ERROR__DECIMAL_NEGATIVE_SQRT_ROOT = 0x17f5; // 6133
/** DriftingOppositeDirection: Drifting strategy is moving in the opposite direction */
exports.YVAULTS_ERROR__DRIFTING_OPPOSITE_DIRECTION = 0x17f6; // 6134
/** WrongRewardCollateralId: Wrong reward collateral_id */
exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_ID = 0x17f7; // 6135
/** CollateralInfoAlreadyExists: Collateral info already exists for given index */
exports.YVAULTS_ERROR__COLLATERAL_INFO_ALREADY_EXISTS = 0x17f8; // 6136
/** InvestTooEarly: Invest is too early after the position was opened */
exports.YVAULTS_ERROR__INVEST_TOO_EARLY = 0x17f9; // 6137
/** SwapUnevenTooEarly: Swap uneven is too early after the position was opened */
exports.YVAULTS_ERROR__SWAP_UNEVEN_TOO_EARLY = 0x17fa; // 6138
/** FlashSwapTooEarly: Flash swap is too early after the position was opened */
exports.YVAULTS_ERROR__FLASH_SWAP_TOO_EARLY = 0x17fb; // 6139
/** RebalancesCapReached: Rebalance caps reached, no rebalances are allowed until the end of the current interval */
exports.YVAULTS_ERROR__REBALANCES_CAP_REACHED = 0x17fc; // 6140
/** SwapUnevenInvalidAuthority: Cannot swap uneven because authority is set and the given signer does not correspond */
exports.YVAULTS_ERROR__SWAP_UNEVEN_INVALID_AUTHORITY = 0x17fd; // 6141
/** InvalidTick: Invalid tick requested */
exports.YVAULTS_ERROR__INVALID_TICK = 0x17fe; // 6142
/** MeteoraMathOverflow: Meteora math overflowed */
exports.YVAULTS_ERROR__METEORA_MATH_OVERFLOW = 0x17ff; // 6143
/** StrategyTickArrayNotValid: Expected strategy tick arrays to be initialized */
exports.YVAULTS_ERROR__STRATEGY_TICK_ARRAY_NOT_VALID = 0x1800; // 6144
/** WrongEventAuthority: Wrong event authority */
exports.YVAULTS_ERROR__WRONG_EVENT_AUTHORITY = 0x1801; // 6145
/** StrategyFieldUpdateNotAllowed: Strategy field update is not allowed */
exports.YVAULTS_ERROR__STRATEGY_FIELD_UPDATE_NOT_ALLOWED = 0x1802; // 6146
/** UnsupportedDex: DEX is not supported for this operation */
exports.YVAULTS_ERROR__UNSUPPORTED_DEX = 0x1803; // 6147
/** InvalidBPSValue: Invalid BPS value provided */
exports.YVAULTS_ERROR__INVALID_B_P_S_VALUE = 0x1804; // 6148
/** RewardVaultOverrideNotAllowed: Reward vault override not allowed */
exports.YVAULTS_ERROR__REWARD_VAULT_OVERRIDE_NOT_ALLOWED = 0x1805; // 6149
/** ComputeFeesAndRewardsInvalidReward: Got invalid reward from the dex specific function while computing the fees/rewards update */
exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_INVALID_REWARD = 0x1806; // 6150
/** EmptyTreasury: No tokens to withdraw from treasury fee vault */
exports.YVAULTS_ERROR__EMPTY_TREASURY = 0x1807; // 6151
/** ChangingPoolRewardMintMismatch: New pool reward mint does not match the old pool reward mint */
exports.YVAULTS_ERROR__CHANGING_POOL_REWARD_MINT_MISMATCH = 0x1808; // 6152
/** ProvidedRewardVaultMismatch: The provided reward vault does not match the strategy state */
exports.YVAULTS_ERROR__PROVIDED_REWARD_VAULT_MISMATCH = 0x1809; // 6153
/** RepeatedMint: The provided reward vault does not match the strategy state */
exports.YVAULTS_ERROR__REPEATED_MINT = 0x180a; // 6154
/** UnsupportedTokenExtension: The token extension is not supported by the program */
exports.YVAULTS_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 0x180b; // 6155
/** UnsupportedDexForToken22: Cannot initialize strategy with this dex while having a mint with token22 */
exports.YVAULTS_ERROR__UNSUPPORTED_DEX_FOR_TOKEN22 = 0x180c; // 6156
/** GlobalConfigInvalidScopePriceIndex: Scope price index is not present in global config */
exports.YVAULTS_ERROR__GLOBAL_CONFIG_INVALID_SCOPE_PRICE_INDEX = 0x180d; // 6157
/** GlobalConfigScopePricesIdsFull: Scope prices ids array in global config is full */
exports.YVAULTS_ERROR__GLOBAL_CONFIG_SCOPE_PRICES_IDS_FULL = 0x180e; // 6158
/** GlobalConfigAlreadyContainsScopePriceId: Scope prices ids array already contains given scope price id */
exports.YVAULTS_ERROR__GLOBAL_CONFIG_ALREADY_CONTAINS_SCOPE_PRICE_ID = 0x180f; // 6159
/** GlobalConfigExpectedScopePricesAccount: Expected scope prices account being passed in when adding or updating a scope prices feed */
exports.YVAULTS_ERROR__GLOBAL_CONFIG_EXPECTED_SCOPE_PRICES_ACCOUNT = 0x1810; // 6160
/** RewardScopePriceAccountNotPresent: A reward scope price account should have been passed in, but it is missing */
exports.YVAULTS_ERROR__REWARD_SCOPE_PRICE_ACCOUNT_NOT_PRESENT = 0x1811; // 6161
/** IncorrectScopePricesAccountID: Incorrect scope prices account id passed in */
exports.YVAULTS_ERROR__INCORRECT_SCOPE_PRICES_ACCOUNT_I_D = 0x1812; // 6162
/** CouldNotCalculatePriceTwap: Could not calculate get_price_usd_unchecked() */
exports.YVAULTS_ERROR__COULD_NOT_CALCULATE_PRICE_TWAP = 0x1813; // 6163
/** ReferencePriceTooFarFromPoolPrice: Reference price is too far from the current pool price */
exports.YVAULTS_ERROR__REFERENCE_PRICE_TOO_FAR_FROM_POOL_PRICE = 0x1814; // 6164
/** InvestCooldownNotElapsed: Invest cooldown has not elapsed */
exports.YVAULTS_ERROR__INVEST_COOLDOWN_NOT_ELAPSED = 0x1815; // 6165
/** InvestAmountBelowMinimum: Uninvested value is below the minimum invest trigger */
exports.YVAULTS_ERROR__INVEST_AMOUNT_BELOW_MINIMUM = 0x1816; // 6166
let yvaultsErrorMessages;
if (process.env.NODE_ENV !== 'production') {
yvaultsErrorMessages = { [exports.YVAULTS_ERROR__ACCOUNT_DIFFERENT_THAN_EXPECTED]: `Account different than expected`, [exports.YVAULTS_ERROR__ACCOUNT_NOT_BELONG_TO_D_E_X]: `Account doesn't belong to the DEX`, [exports.YVAULTS_ERROR__AMOUNTS_REPRESENT_ZERO_SHARES]: `The provided amounts are too small`, [exports.YVAULTS_ERROR__BPS_NOT_IN_RANGE]: `Bps parameter passed to instruction is not in range`, [exports.YVAULTS_ERROR__CANNOT_CHANGE_ADMIN_AUTHORITY]: `Cannot change admin authority`, [exports.YVAULTS_ERROR__CANNOT_COLLECT_FEES_ON_ZERO_LIQUIDITY_POSITION]: `[DEPRECATED] Cannot collect fees on zero liquidity position`, [exports.YVAULTS_ERROR__CANNOT_DEPOSIT_OUT_OF_RANGE]: `Cannot deposit when strategy out of range`, [exports.YVAULTS_ERROR__CANNOT_EXECUTIVE_WITHDRAW_ZERO_AMOUNT]: `[DEPRECATED] Cannot executive withdraw zero amount`, [exports.YVAULTS_ERROR__CANNOT_INVEST_OUT_OF_RANGE]: `Cannot invest when strategy out of range`, [exports.YVAULTS_ERROR__CANNOT_INVEST_ZERO_AMOUNT]: `Cannot invest zero amount`, [exports.YVAULTS_ERROR__CANNOT_OPEN_POSITION_WITH_EXISTING_POSITION]: `Cannot open position with existing opened position`, [exports.YVAULTS_ERROR__CANNOT_RESIZE_ACCOUNT]: `Cannot resize with smaller new size`, [exports.YVAULTS_ERROR__CANNOT_SWAP_UNEVEN_OUT_OF_RANGE]: `Cannot swap uneven vaults when position is out of range`, [exports.YVAULTS_ERROR__CANNOT_WITHDRAW_ZERO_AMOUNT]: `Cannot withdraw zero amount`, [exports.YVAULTS_ERROR__CHANGING_POOL_REWARD_MINT_MISMATCH]: `New pool reward mint does not match the old pool reward mint`, [exports.YVAULTS_ERROR__COLLATERAL_INFO_ALREADY_EXISTS]: `Collateral info already exists for given index`, [exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP]: `Collaterals exceed deposit cap`, [exports.YVAULTS_ERROR__COLLATERAL_TOKENS_EXCEED_DEPOSIT_CAP_PER_IXN]: `Collaterals exceed deposit ixn cap`, [exports.YVAULTS_ERROR__COLLECT_FEES_BLOCKED]: `Collect fees is blocked`, [exports.YVAULTS_ERROR__COLLECT_REWARDS_BLOCKED]: `Collect rewards is blocked`, [exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_INVALID_REWARD]: `Got invalid reward from the dex specific function while computing the fees/rewards update`, [exports.YVAULTS_ERROR__COMPUTE_FEES_AND_REWARDS_UPDATE_ERROR]: `Got an error from the dex specific function while computing the fees/rewards update`, [exports.YVAULTS_ERROR__COULD_NOT_CALCULATE_PRICE_TWAP]: `Could not calculate get_price_usd_unchecked()`, [exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_PARAMS]: `Rebalance params could not be deserialized`, [exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_REBALANCE_STATE]: `Rebalance state could not be deserialized`, [exports.YVAULTS_ERROR__COULD_NOT_DESERIALIZE_SCOPE]: `Scope account could not be deserialized`, [exports.YVAULTS_ERROR__COULD_NOT_SERIALIZE_REBALANCE_STATE]: `Rebalance state could not be serialized`, [exports.YVAULTS_ERROR__C_P_I_NOT_ALLOWED]: `CPI not allowed`, [exports.YVAULTS_ERROR__DECIMAL_NEGATIVE_SQRT_ROOT]: `Decimal sqrt on negative number`, [exports.YVAULTS_ERROR__DECIMAL_OPERATION_FAILED]: `Decimal operation failed`, [exports.YVAULTS_ERROR__DECIMAL_TO_U128_CONVERSION_FAILED]: `Decimal to u128 conversion failed`, [exports.YVAULTS_ERROR__DECIMAL_TO_U64_CONVERSION_FAILED]: `Decimal to u64 conversion failed`, [exports.YVAULTS_ERROR__DELTA_A_TOO_LARGE]: `[DEPRECATED] Delta A too large`, [exports.YVAULTS_ERROR__DELTA_B_TOO_LARGE]: `[DEPRECATED] Delta B too large`, [exports.YVAULTS_ERROR__DEPOSIT_AMOUNTS_ZERO]: `Deposit amounts must be greater than zero`, [exports.YVAULTS_ERROR__DEPOSIT_LESS_THAN_MINIMUM]: `Deposit amount less than minimal allowed`, [exports.YVAULTS_ERROR__DEPOSIT_WITHOUT_INVEST_DISALLOWED]: `Cannot deposit without invest`, [exports.YVAULTS_ERROR__DIVIDE_BY_ZERO]: `Cannot divide by zero`, [exports.YVAULTS_ERROR__DRIFTING_OPPOSITE_DIRECTION]: `Drifting strategy is moving in the opposite direction`, [exports.YVAULTS_ERROR__EMERGENCY_SWAP_BLOCKED]: `Emergency Swap is blocked`, [exports.YVAULTS_ERROR__EMPTY_TREASURY]: `No tokens to withdraw from treasury fee vault`, [exports.YVAULTS_ERROR__EXISTING_REWARD_OVERRIDE]: `[DEPRECATED] Can not override the existing reward`, [exports.YVAULTS_ERROR__FLASH_IXS_ACCOUNT_MISMATCH]: `Some accounts differ between the two flash ixs`, [exports.YVAULTS_ERROR__FLASH_IXS_INCLUDE_SCOPE]: `A scope ix is present in a flash tx`, [exports.YVAULTS_ERROR__FLASH_IXS_NOT_ENDED]: `Flash ixs initiated without the closing ix in the transaction`, [exports.YVAULTS_ERROR__FLASH_SWAP_TOO_EARLY]: `Flash swap is too early after the position was opened`, [exports.YVAULTS_ERROR__FLASH_TX_WITH_UNEXPECTED_IXS]: `Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between`, [exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_BLOCKED]: `Flash vault swap is blocked on this strategy`, [exports.YVAULTS_ERROR__FLASH_VAULT_SWAP_WRONG_AMOUNT_TO_LEAVE]: `Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user)`, [exports.YVAULTS_ERROR__GLOBAL_CONFIG_ALREADY_CONTAINS_SCOPE_PRICE_ID]: `Scope prices ids array already contains given scope price id`, [exports.YVAULTS_ERROR__GLOBAL_CONFIG_EXPECTED_SCOPE_PRICES_ACCOUNT]: `Expected scope prices account being passed in when adding or updating a scope prices feed`, [exports.YVAULTS_ERROR__GLOBAL_CONFIG_INVALID_SCOPE_PRICE_INDEX]: `Scope price index is not present in global config`, [exports.YVAULTS_ERROR__GLOBAL_CONFIG_KEY_ERROR]: `Key is not present in global config`, [exports.YVAULTS_ERROR__GLOBAL_CONFIG_SCOPE_PRICES_IDS_FULL]: `Scope prices ids array in global config is full`, [exports.YVAULTS_ERROR__GLOBAL_DEPOSIT_BLOCKED]: `Global deposit is currently blocked`, [exports.YVAULTS_ERROR__GLOBAL_INVEST_BLOCKED]: `Global invest is currently blocked`, [exports.YVAULTS_ERROR__GLOBAL_WITHDRAW_BLOCKED]: `Global withdraw is currently blocked`, [exports.YVAULTS_ERROR__INCORRECT_SCOPE_PRICES_ACCOUNT_I_D]: `Incorrect scope prices account id passed in`, [exports.YVAULTS_ERROR__INTEGER_OVERFLOW]: `Integer overflow`, [exports.YVAULTS_ERROR__INVALID_ADMIN_AUTHORITY]: `Invalid admin authority`, [exports.YVAULTS_ERROR__INVALID_B_P_S_VALUE]: `Invalid BPS value provided`, [exports.YVAULTS_ERROR__INVALID_DEX_PROGRAM_ID]: `Invalid dex program id`, [exports.YVAULTS_ERROR__INVALID_POSITION_ACCOUNT]: `Position account doesn't match internal records`, [exports.YVAULTS_ERROR__INVALID_REBALANCE_TYPE]: `Invalid rebalance type for the strategy`, [exports.YVAULTS_ERROR__INVALID_REFERENCE_PRICE_TYPE]: `Invalid reference price type`, [exports.YVAULTS_ERROR__INVALID_REWARD_INDEX]: `Reward index incorrect`, [exports.YVAULTS_ERROR__INVALID_REWARD_MAPPING]: `Reward mapping incorrect`, [exports.YVAULTS_ERROR__INVALID_SCOPE_CHAIN]: `Invalid Scope Chain`, [exports.YVAULTS_ERROR__INVALID_SCOPE_STAKING_RATE_CHAIN]: `Invalid Scope staking rate Chain`, [exports.YVAULTS_ERROR__INVALID_SCOPE_T_W_A_P_CHAIN]: `Invalid Scope TWAP Chain`, [exports.YVAULTS_ERROR__INVALID_TICK]: `Invalid tick requested`, [exports.YVAULTS_ERROR__INVEST_AMOUNT_BELOW_MINIMUM]: `Uninvested value is below the minimum invest trigger`, [exports.YVAULTS_ERROR__INVEST_COOLDOWN_NOT_ELAPSED]: `Invest cooldown has not elapsed`, [exports.YVAULTS_ERROR__INVEST_TOO_EARLY]: `Invest is too early after the position was opened`, [exports.YVAULTS_ERROR__KAMINO_COLLATERAL_NOT_VALID]: `Kamino collateral is not valid`, [exports.YVAULTS_ERROR__KAMINO_REWARD_ALREADY_EXISTS]: `Kamino reward is already initialized`, [exports.YVAULTS_ERROR__KAMINO_REWARD_EXCEEDS_AVAILABLE_AMOUNT]: `[DEPRECATED] Expected kamino reward is bigger then the available amount within the vault`, [exports.YVAULTS_ERROR__KAMINO_REWARD_NOT_EXIST]: `Kamino reward is not initialized`, [exports.YVAULTS_ERROR__LOWER_TICK_LARGER_THAN_UPPER_TICK]: `Lower tick larger than upper tick`, [exports.YVAULTS_ERROR__LOWER_TICK_NOT_MULTIPLE_OF_TICK_SPACING]: `Lower tick is not a multiple of tick spacing`, [exports.YVAULTS_ERROR__LOWER_TICK_TOO_LOW]: `Lower tick is lower than the minimal supported low tick`, [exports.YVAULTS_ERROR__MANUAL_REBALANCE_INVALID_OWNER]: `Only the owner of the strategy can manually rebalance it`, [exports.YVAULTS_ERROR__MATH_OVERFLOW]: `[DEPRECATED] Mathematical operation with overflow`, [exports.YVAULTS_ERROR__MAX_INVESTABLE_ZERO]: `Cannot have zero investable amount`, [exports.YVAULTS_ERROR__MAX_LOSS_EXCEEDED]: `Rouding errors exceed the maximal loss tolerance`, [exports.YVAULTS_ERROR__METEORA_MATH_OVERFLOW]: `Meteora math overflowed`, [exports.YVAULTS_ERROR__NO_REBALANCE_NECESSARY]: `No rebalance necessary based on current rebalance type/parameters`, [exports.YVAULTS_ERROR__NOT_ENOUGH_TOKENS_FOR_RATIO]: `Deposit is not allowed as token amounts are not enough to match our holdings ratio`, [exports.YVAULTS_ERROR__OPERATION_FORBIDDEN]: `Operation Forbidden`, [exports.YVAULTS_ERROR__ORCA_PRICE_TOO_DIFFERENT_FROM_SCOPE]: `Cannot use orca price as it is too different from scope price`, [exports.YVAULTS_ERROR__ORCA_REWARD_UNINITIALIZED]: `Cannot use uninitialized orca reward vault`, [exports.YVAULTS_ERROR__OUT_OF_RANGE_INTEGRAL_CONVERSION]: `Out of range integral conversion attempted`, [exports.YVAULTS_ERROR__OWN_REWARD_UNINITIALIZED]: `Cannot use uninitialized reward vault`, [exports.YVAULTS_ERROR__PERMISSIONLESS_REBALANCING_DISABLED]: `Permissionless rebalancing is disabled`, [exports.YVAULTS_ERROR__POOL_REBALANCING]: `Deposit is not allowed as pool is rebalancing`, [exports.YVAULTS_ERROR__POSITION_HAS_REMAINING_LIQUIDITY]: `Existent position has liquidity, new position creation is forbidden`, [exports.YVAULTS_ERROR__PRICE_IS_BIGGER_THAN_HEURISTIC]: `Token price is bigger than heuristic`, [exports.YVAULTS_ERROR__PRICE_IS_LOWER_THAN_HEURISTIC]: `Token price is lower than heuristic`, [exports.YVAULTS_ERROR__PRICE_NOT_VALID]: `Price is not valid`, [exports.YVAULTS_ERROR__PRICE_TOO_DIVERGENT_FROM_TWAP]: `Price too divergent from twap`, [exports.YVAULTS_ERROR__PRICE_TOO_OLD]: `Price too old`, [exports.YVAULTS_ERROR__PROVIDED_REWARD_VAULT_MISMATCH]: `The provided reward vault does not match the strategy state`, [exports.YVAULTS_ERROR__REBALANCES_CAP_REACHED]: `Rebalance caps reached, no rebalances are allowed until the end of the current interval`, [exports.YVAULTS_ERROR__REFERENCE_PRICE_TOO_FAR_FROM_POOL_PRICE]: `Reference price is too far from the current pool price`, [exports.YVAULTS_ERROR__REPEATED_MINT]: `The provided reward vault does not match the strategy state`, [exports.YVAULTS_ERROR__REWARD_NOT_STRATEGY_TOKEN]: `Reward does not match strategy token`, [exports.YVAULTS_ERROR__REWARD_SCOPE_PRICE_ACCOUNT_NOT_PRESENT]: `A reward scope price account should have been passed in, but it is missing`, [exports.YVAULTS_ERROR__REWARD_VAULT_OVERRIDE_NOT_ALLOWED]: `Reward vault override not allowed`, [exports.YVAULTS_ERROR__SCOPE_CHAIN_UPDATE_FAILED]: `Scope chain update failed`, [exports.YVAULTS_ERROR__SHARES_ISSUED_AMOUNT_DOES_NOT_MATCH]: `[DEPRECATED] Shares issued amount does not match`, [exports.YVAULTS_ERROR__SHARES_NOT_ZERO]: `There must be no shares issued when closing a strategy`, [exports.YVAULTS_ERROR__SHARES_ZERO]: `Number of shares to withdraw must be greater than zero`, [exports.YVAULTS_ERROR__STAKING_RATE_NOT_VALID]: `Staking rate (provided by Scope) is not valid`, [exports.YVAULTS_ERROR__STRATEGY_DEPOSIT_BLOCKED]: `Strategy deposit is currently blocked`, [exports.YVAULTS_ERROR__STRATEGY_FIELD_UPDATE_NOT_ALLOWED]: `Strategy field update is not allowed`, [exports.YVAULTS_ERROR__STRATEGY_INVEST_BLOCKED]: `Strategy invest is currently blocked`, [exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE]: `Strategy not active`, [exports.YVAULTS_ERROR__STRATEGY_NOT_ACTIVE_WHEN_DEPOSITING]: `Cannot deposit inactive position`, [exports.YVAULTS_ERROR__STRATEGY_NOT_FROZEN]: `Strategy is expected to be frozen for this operation`, [exports.YVAULTS_ERROR__STRATEGY_POSITION_NOT_VALID]: `Expected strategy position to be initialized`, [exports.YVAULTS_ERROR__STRATEGY_TICK_ARRAY_NOT_VALID]: `Expected strategy tick arrays to be initialized`, [exports.YVAULTS_ERROR__STRATEGY_WITHDRAW_BLOCKED]: `Strategy withdraw is currently blocked`, [exports.YVAULTS_ERROR__SWAP_AMOUNTS_TOO_SMALL]: `Swap amount below the minimum value`, [exports.YVAULTS_ERROR__SWAP_AMOUNTS_ZERO]: `Swap amounts must be greater than zero`, [exports.YVAULTS_ERROR__SWAP_REWARD_IMBALANCED]: `Must provide almost equal amounts of tokens`, [exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_MINIMUM]: `Swap reward is less than minimum acceptable`, [exports.YVAULTS_ERROR__SWAP_REWARD_LESS_THAN_REQUESTED]: `Swap reward is less than what user requested as minimum`, [exports.YVAULTS_ERROR__SWAP_REWARDS_BLOCKED]: `Swap rewards is blocked`, [exports.YVAULTS_ERROR__SWAP_REWARD_TOO_SMALL]: `Swap reward is zero or less than requested`, [exports.YVAULTS_ERROR__SWAP_UNEVEN_INVALID_AUTHORITY]: `Cannot swap uneven because authority is set and the given signer does not correspond`, [exports.YVAULTS_ERROR__SWAP_UNEVEN_TOO_EARLY]: `Swap uneven is too early after the position was opened`, [exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_BLOCKED]: `Swap uneven vaults is blocked`, [exports.YVAULTS_ERROR__SWAP_UNEVEN_VAULTS_OVERSHOOT]: `Swap uneven vaults result in the opposite unbalance of the vaults`, [exports.YVAULTS_ERROR__SWAP_VAULTS_CASH_OUTPUT_BELOW_MINIMUM]: `Token out for cash based vault swap is below minimum expected`, [exports.YVAULTS_ERROR__SWAP_VAULTS_TOO_BIG]: `Provided amount for vault swap is over the limit`, [exports.YVAULTS_ERROR__SYSTEM_IN_EMERGENCY_MODE]: `[DEPRECATED] System is in emergency mode`, [exports.YVAULTS_ERROR__TICK_ARRAYS_DO_NOT_MATCH_REBALANCE]: `The given tick arrays do not match the rebalance result`, [exports.YVAULTS_ERROR__TIMESTAMP_DECREASE]: `Timestamp decrease`, [exports.YVAULTS_ERROR__TOKEN_ACCOUNT_BALANCE_MISMATCH]: `Token amount in ata is different than the expected amount`, [exports.YVAULTS_ERROR__TOKEN_DISABLED]: `Token cannot be used in strategy creation`, [exports.YVAULTS_ERROR__TOKEN_TO_SWAP_NOT_ENOUGH]: `Token amount to be swapped is not enough`, [exports.YVAULTS_ERROR__TOO_MUCH_LIQUIDITY_TO_WITHDRAW]: `Unable to withdraw more liquidity than available in position`, [exports.YVAULTS_ERROR__UNABLE_TO_DESERIALIZE_ACCOUNT]: `Unable to deserialize account`, [exports.YVAULTS_ERROR__UNEXPECTED_PROGRAM_ID_FOR_PREREQUISITE_IX]: `Unexpected programID for prerequisite ix`, [exports.YVAULTS_ERROR__UNEXPECTED_TOKEN_AMOUNTS_POST_SWAP]: `Token left in vault post swap are lower than expected`, [exports.YVAULTS_ERROR__UNHARVESTED_AMOUNTS]: `There are unharvested gains`, [exports.YVAULTS_ERROR__UNSUPPORTED_DEX]: `DEX is not supported for this operation`, [exports.YVAULTS_ERROR__UNSUPPORTED_DEX_FOR_TOKEN22]: `Cannot initialize strategy with this dex while having a mint with token22`, [exports.YVAULTS_ERROR__UNSUPPORTED_TOKEN_EXTENSION]: `The token extension is not supported by the program`, [exports.YVAULTS_ERROR__UPPER_TICK_NOT_MULTIPLE_OF_TICK_SPACING]: `Upper tick is not a multiple of tick spacing`, [exports.YVAULTS_ERROR__UPPER_TICK_TOO_LARGE]: `Upper tick is larger than the maximum supported tick`, [exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_A]: `[DEPRECATED] Vault balance does not match for token A`, [exports.YVAULTS_ERROR__VAULT_BALANCE_DOES_NOT_MATCH_TOKEN_B]: `[DEPRECATED] Vault balance does not match for token B`, [exports.YVAULTS_ERROR__VAULT_BALANCES_CAUSES_WRONG_SHARES_ISSUANCE]: `Deposit is not allowed as the strategy is not fully invested in the pool `, [exports.YVAULTS_ERROR__VAULTS_ARE_ALREADY_BALANCED]: `Cannot swap as vaults are already balanced`, [exports.YVAULTS_ERROR__WITHDRAWAL_CAP_REACHED]: `Withdrawal cap is reached`, [exports.YVAULTS_ERROR__WRONG_COLLATERAL_I_D]: `[DEPRECATED] Collateral ID invalid for strategy`, [exports.YVAULTS_ERROR__WRONG_D_E_X_PROGRAM_I_D]: `Wrong DEX program ID`, [exports.YVAULTS_ERROR__WRONG_DISCRIMINATOR]: `Wrong discriminator`, [exports.YVAULTS_ERROR__WRONG_EVENT_AUTHORITY]: `Wrong event authority`, [exports.YVAULTS_ERROR__WRONG_KAMINO_REWARD_ID]: `Kamino reward id exceeds the available slots`, [exports.YVAULTS_ERROR__WRONG_MINT]: `Wrong mint`, [exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_ID]: `Wrong reward collateral_id`, [exports.YVAULTS_ERROR__WRONG_REWARD_COLLATERAL_I_D]: `Reward collateral ID is incorrect for strategy`, [exports.YVAULTS_ERROR__WRONG_SWAP_VAULT_DIRECTION]: `Vault swap can't be performed in the required direction`, [exports.YVAULTS_ERROR__WRONG_VAULT]: `Wrong vault`, [exports.YVAULTS_ERROR__ZERO_AMOUNT]: `[DEPRECATED] Zero amount` };
}
function getYvaultsErrorMessage(code) {
if (process.env.NODE_ENV !== 'production') {
return yvaultsErrorMessages[code];
}