UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

1,464 lines 75.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CannotWithdrawZeroAmount = exports.CannotExecutiveWithdrawZeroAmount = exports.DeltaBTooLarge = exports.DeltaATooLarge = exports.DivideByZero = exports.CannotSwapUnevenOutOfRange = exports.VaultsAreAlreadyBalanced = exports.SwapUnevenVaultsBlocked = exports.CollateralTokensExceedDepositCap = exports.WrongCollateralID = exports.CouldNotDeserializeScope = exports.InvalidPositionAccount = exports.WrongRewardCollateralID = exports.SwapRewardsBlocked = exports.CollectRewardsBlocked = exports.CollectFeesBlocked = exports.MaxInvestableZero = exports.CannotInvestZeroAmount = exports.PriceTooOld = exports.SwapAmountsZero = exports.WrongVault = exports.WrongMint = exports.WrongDiscriminator = exports.SwapRewardLessThanMinimum = exports.SwapRewardLessThanRequested = exports.SwapRewardTooSmall = exports.SwapRewardImbalanced = exports.PriceNotValid = exports.OwnRewardUninitialized = exports.InvalidRewardIndex = exports.InvalidRewardMapping = exports.UnharvestedAmounts = exports.StrategyNotActive = exports.SharesZero = exports.DepositAmountsZero = exports.TooMuchLiquidityToWithdraw = exports.MathOverflow = exports.OutOfRangeIntegralConversion = exports.GlobalInvestBlocked = exports.GlobalWithdrawBlocked = exports.GlobalDepositBlocked = exports.SystemInEmergencyMode = exports.GlobalConfigKeyError = exports.SharesIssuedAmountDoesNotMatch = exports.VaultBalanceDoesNotMatchTokenB = exports.VaultBalanceDoesNotMatchTokenA = exports.UnableToDeserializeAccount = exports.ZeroAmount = exports.OperationForbidden = exports.IntegerOverflow = void 0; exports.FlashVaultSwapBlocked = exports.FlashIxsIncludeScope = exports.FlashIxsAccountMismatch = exports.FlashTxWithUnexpectedIxs = exports.FlashIxsNotEnded = exports.SwapVaultsCashOutputBelowMinimum = exports.SwapVaultsTooBig = exports.WrongSwapVaultDirection = exports.StrategyWithdrawBlocked = exports.StrategyInvestBlocked = exports.StrategyDepositBlocked = exports.InvalidDexProgramId = exports.SwapAmountsTooSmall = exports.AccountDifferentThanExpected = exports.PriceIsLowerThanHeuristic = exports.PriceIsBiggerThanHeuristic = exports.InvalidAdminAuthority = exports.OrcaRewardUninitialized = exports.WrongDEXProgramID = exports.AccountNotBelongToDEX = exports.UnexpectedTokenAmountsPostSwap = exports.StrategyNotFrozen = exports.EmergencySwapBlocked = exports.BpsNotInRange = exports.SwapUnevenVaultsOvershoot = exports.KaminoRewardExceedsAvailableAmount = exports.KaminoCollateralNotValid = exports.KaminoRewardAlreadyExists = exports.KaminoRewardNotExist = exports.WrongKaminoRewardId = exports.ExistingRewardOverride = exports.PriceTooDivergentFromTwap = exports.ScopeChainUpdateFailed = exports.CannotResizeAccount = exports.CannotChangeAdminAuthority = exports.UpperTickNotMultipleOfTickSpacing = exports.LowerTickNotMultipleOfTickSpacing = exports.UpperTickTooLarge = exports.LowerTickTooLow = exports.LowerTickLargerThanUpperTick = exports.OrcaPriceTooDifferentFromScope = exports.CPINotAllowed = exports.TimestampDecrease = exports.WithdrawalCapReached = exports.CannotInvestOutOfRange = exports.CannotDepositOutOfRange = exports.CollateralTokensExceedDepositCapPerIxn = exports.StrategyNotActiveWhenOpeningPosition = exports.StrategyNotActiveWhenDepositing = exports.CannotCollectFeesOnZeroLiquidityPosition = void 0; exports.RewardVaultOverrideNotAllowed = exports.InvalidBPSValue = exports.UnsupportedDex = exports.StrategyFieldUpdateNotAllowed = exports.WrongEventAuthority = exports.StrategyTickArrayNotValid = exports.MeteoraMathOverflow = exports.InvalidTick = exports.SwapUnevenInvalidAuthority = exports.RebalancesCapReached = exports.FlashSwapTooEarly = exports.SwapUnevenTooEarly = exports.InvestTooEarly = exports.CollateralInfoAlreadyExists = exports.WrongRewardCollateralId = exports.DriftingOppositeDirection = exports.DecimalNegativeSqrtRoot = exports.DecimalToU128ConversionFailed = exports.StakingRateNotValid = exports.InvalidScopeStakingRateChain = exports.SharesNotZero = exports.ComputeFeesAndRewardsUpdateError = exports.UnexpectedProgramIdForPrerequisiteIx = exports.TokenAccountBalanceMismatch = exports.TokenToSwapNotEnough = exports.InvalidReferencePriceType = exports.TokenDisabled = exports.VaultBalancesCausesWrongSharesIssuance = exports.DecimalOperationFailed = exports.DecimalToU64ConversionFailed = exports.RewardNotStrategyToken = exports.MaxLossExceeded = exports.AmountsRepresentZeroShares = exports.NotEnoughTokensForRatio = exports.CouldNotDeserializeRebalanceParams = exports.CouldNotSerializeRebalanceState = exports.CouldNotDeserializeRebalanceState = exports.StrategyPositionNotValid = exports.TickArraysDoNotMatchRebalance = exports.NoRebalanceNecessary = exports.InvalidRebalanceType = exports.ManualRebalanceInvalidOwner = exports.PermissionlessRebalancingDisabled = exports.PoolRebalancing = exports.PositionHasRemainingLiquidity = exports.InvalidScopeTWAPChain = exports.InvalidScopeChain = exports.DepositWithoutInvestDisallowed = exports.DepositLessThanMinimum = exports.FlashVaultSwapWrongAmountToLeave = void 0; exports.UnsupportedDexForToken22 = exports.UnsupportedTokenExtension = exports.RepeatedMint = exports.ProvidedRewardVaultMismatch = exports.ChangingPoolRewardMintMismatch = exports.EmptyTreasury = exports.ComputeFeesAndRewardsInvalidReward = void 0; exports.fromCode = fromCode; class IntegerOverflow extends Error { logs; static code = 6000; code = 6000; name = "IntegerOverflow"; msg = "Integer overflow"; constructor(logs) { super("6000: Integer overflow"); this.logs = logs; } } exports.IntegerOverflow = IntegerOverflow; class OperationForbidden extends Error { logs; static code = 6001; code = 6001; name = "OperationForbidden"; msg = "Operation Forbidden"; constructor(logs) { super("6001: Operation Forbidden"); this.logs = logs; } } exports.OperationForbidden = OperationForbidden; class ZeroAmount extends Error { logs; static code = 6002; code = 6002; name = "ZeroAmount"; msg = "[DEPRECATED] Zero amount"; constructor(logs) { super("6002: [DEPRECATED] Zero amount"); this.logs = logs; } } exports.ZeroAmount = ZeroAmount; class UnableToDeserializeAccount extends Error { logs; static code = 6003; code = 6003; name = "UnableToDeserializeAccount"; msg = "Unable to deserialize account"; constructor(logs) { super("6003: Unable to deserialize account"); this.logs = logs; } } exports.UnableToDeserializeAccount = UnableToDeserializeAccount; class VaultBalanceDoesNotMatchTokenA extends Error { logs; static code = 6004; code = 6004; name = "VaultBalanceDoesNotMatchTokenA"; msg = "[DEPRECATED] Vault balance does not match for token A"; constructor(logs) { super("6004: [DEPRECATED] Vault balance does not match for token A"); this.logs = logs; } } exports.VaultBalanceDoesNotMatchTokenA = VaultBalanceDoesNotMatchTokenA; class VaultBalanceDoesNotMatchTokenB extends Error { logs; static code = 6005; code = 6005; name = "VaultBalanceDoesNotMatchTokenB"; msg = "[DEPRECATED] Vault balance does not match for token B"; constructor(logs) { super("6005: [DEPRECATED] Vault balance does not match for token B"); this.logs = logs; } } exports.VaultBalanceDoesNotMatchTokenB = VaultBalanceDoesNotMatchTokenB; class SharesIssuedAmountDoesNotMatch extends Error { logs; static code = 6006; code = 6006; name = "SharesIssuedAmountDoesNotMatch"; msg = "[DEPRECATED] Shares issued amount does not match"; constructor(logs) { super("6006: [DEPRECATED] Shares issued amount does not match"); this.logs = logs; } } exports.SharesIssuedAmountDoesNotMatch = SharesIssuedAmountDoesNotMatch; class GlobalConfigKeyError extends Error { logs; static code = 6007; code = 6007; name = "GlobalConfigKeyError"; msg = "Key is not present in global config"; constructor(logs) { super("6007: Key is not present in global config"); this.logs = logs; } } exports.GlobalConfigKeyError = GlobalConfigKeyError; class SystemInEmergencyMode extends Error { logs; static code = 6008; code = 6008; name = "SystemInEmergencyMode"; msg = "[DEPRECATED] System is in emergency mode"; constructor(logs) { super("6008: [DEPRECATED] System is in emergency mode"); this.logs = logs; } } exports.SystemInEmergencyMode = SystemInEmergencyMode; class GlobalDepositBlocked extends Error { logs; static code = 6009; code = 6009; name = "GlobalDepositBlocked"; msg = "Global deposit is currently blocked"; constructor(logs) { super("6009: Global deposit is currently blocked"); this.logs = logs; } } exports.GlobalDepositBlocked = GlobalDepositBlocked; class GlobalWithdrawBlocked extends Error { logs; static code = 6010; code = 6010; name = "GlobalWithdrawBlocked"; msg = "Global withdraw is currently blocked"; constructor(logs) { super("6010: Global withdraw is currently blocked"); this.logs = logs; } } exports.GlobalWithdrawBlocked = GlobalWithdrawBlocked; class GlobalInvestBlocked extends Error { logs; static code = 6011; code = 6011; name = "GlobalInvestBlocked"; msg = "Global invest is currently blocked"; constructor(logs) { super("6011: Global invest is currently blocked"); this.logs = logs; } } exports.GlobalInvestBlocked = GlobalInvestBlocked; class OutOfRangeIntegralConversion extends Error { logs; static code = 6012; code = 6012; name = "OutOfRangeIntegralConversion"; msg = "Out of range integral conversion attempted"; constructor(logs) { super("6012: Out of range integral conversion attempted"); this.logs = logs; } } exports.OutOfRangeIntegralConversion = OutOfRangeIntegralConversion; class MathOverflow extends Error { logs; static code = 6013; code = 6013; name = "MathOverflow"; msg = "[DEPRECATED] Mathematical operation with overflow"; constructor(logs) { super("6013: [DEPRECATED] Mathematical operation with overflow"); this.logs = logs; } } exports.MathOverflow = MathOverflow; class TooMuchLiquidityToWithdraw extends Error { logs; static code = 6014; code = 6014; name = "TooMuchLiquidityToWithdraw"; msg = "Unable to withdraw more liquidity than available in position"; constructor(logs) { super("6014: Unable to withdraw more liquidity than available in position"); this.logs = logs; } } exports.TooMuchLiquidityToWithdraw = TooMuchLiquidityToWithdraw; class DepositAmountsZero extends Error { logs; static code = 6015; code = 6015; name = "DepositAmountsZero"; msg = "Deposit amounts must be greater than zero"; constructor(logs) { super("6015: Deposit amounts must be greater than zero"); this.logs = logs; } } exports.DepositAmountsZero = DepositAmountsZero; class SharesZero extends Error { logs; static code = 6016; code = 6016; name = "SharesZero"; msg = "Number of shares to withdraw must be greater than zero"; constructor(logs) { super("6016: Number of shares to withdraw must be greater than zero"); this.logs = logs; } } exports.SharesZero = SharesZero; class StrategyNotActive extends Error { logs; static code = 6017; code = 6017; name = "StrategyNotActive"; msg = "Strategy not active"; constructor(logs) { super("6017: Strategy not active"); this.logs = logs; } } exports.StrategyNotActive = StrategyNotActive; class UnharvestedAmounts extends Error { logs; static code = 6018; code = 6018; name = "UnharvestedAmounts"; msg = "There are unharvested gains"; constructor(logs) { super("6018: There are unharvested gains"); this.logs = logs; } } exports.UnharvestedAmounts = UnharvestedAmounts; class InvalidRewardMapping extends Error { logs; static code = 6019; code = 6019; name = "InvalidRewardMapping"; msg = "Reward mapping incorrect"; constructor(logs) { super("6019: Reward mapping incorrect"); this.logs = logs; } } exports.InvalidRewardMapping = InvalidRewardMapping; class InvalidRewardIndex extends Error { logs; static code = 6020; code = 6020; name = "InvalidRewardIndex"; msg = "Reward index incorrect"; constructor(logs) { super("6020: Reward index incorrect"); this.logs = logs; } } exports.InvalidRewardIndex = InvalidRewardIndex; class OwnRewardUninitialized extends Error { logs; static code = 6021; code = 6021; name = "OwnRewardUninitialized"; msg = "Cannot use uninitialized reward vault"; constructor(logs) { super("6021: Cannot use uninitialized reward vault"); this.logs = logs; } } exports.OwnRewardUninitialized = OwnRewardUninitialized; class PriceNotValid extends Error { logs; static code = 6022; code = 6022; name = "PriceNotValid"; msg = "Price is not valid"; constructor(logs) { super("6022: Price is not valid"); this.logs = logs; } } exports.PriceNotValid = PriceNotValid; class SwapRewardImbalanced extends Error { logs; static code = 6023; code = 6023; name = "SwapRewardImbalanced"; msg = "Must provide almost equal amounts of tokens"; constructor(logs) { super("6023: Must provide almost equal amounts of tokens"); this.logs = logs; } } exports.SwapRewardImbalanced = SwapRewardImbalanced; class SwapRewardTooSmall extends Error { logs; static code = 6024; code = 6024; name = "SwapRewardTooSmall"; msg = "Swap reward is zero or less than requested"; constructor(logs) { super("6024: Swap reward is zero or less than requested"); this.logs = logs; } } exports.SwapRewardTooSmall = SwapRewardTooSmall; class SwapRewardLessThanRequested extends Error { logs; static code = 6025; code = 6025; name = "SwapRewardLessThanRequested"; msg = "Swap reward is less than what user requested as minimum"; constructor(logs) { super("6025: Swap reward is less than what user requested as minimum"); this.logs = logs; } } exports.SwapRewardLessThanRequested = SwapRewardLessThanRequested; class SwapRewardLessThanMinimum extends Error { logs; static code = 6026; code = 6026; name = "SwapRewardLessThanMinimum"; msg = "Swap reward is less than minimum acceptable"; constructor(logs) { super("6026: Swap reward is less than minimum acceptable"); this.logs = logs; } } exports.SwapRewardLessThanMinimum = SwapRewardLessThanMinimum; class WrongDiscriminator extends Error { logs; static code = 6027; code = 6027; name = "WrongDiscriminator"; msg = "Wrong discriminator"; constructor(logs) { super("6027: Wrong discriminator"); this.logs = logs; } } exports.WrongDiscriminator = WrongDiscriminator; class WrongMint extends Error { logs; static code = 6028; code = 6028; name = "WrongMint"; msg = "Wrong mint"; constructor(logs) { super("6028: Wrong mint"); this.logs = logs; } } exports.WrongMint = WrongMint; class WrongVault extends Error { logs; static code = 6029; code = 6029; name = "WrongVault"; msg = "Wrong vault"; constructor(logs) { super("6029: Wrong vault"); this.logs = logs; } } exports.WrongVault = WrongVault; class SwapAmountsZero extends Error { logs; static code = 6030; code = 6030; name = "SwapAmountsZero"; msg = "Swap amounts must be greater than zero"; constructor(logs) { super("6030: Swap amounts must be greater than zero"); this.logs = logs; } } exports.SwapAmountsZero = SwapAmountsZero; class PriceTooOld extends Error { logs; static code = 6031; code = 6031; name = "PriceTooOld"; msg = "Price too old"; constructor(logs) { super("6031: Price too old"); this.logs = logs; } } exports.PriceTooOld = PriceTooOld; class CannotInvestZeroAmount extends Error { logs; static code = 6032; code = 6032; name = "CannotInvestZeroAmount"; msg = "Cannot invest zero amount"; constructor(logs) { super("6032: Cannot invest zero amount"); this.logs = logs; } } exports.CannotInvestZeroAmount = CannotInvestZeroAmount; class MaxInvestableZero extends Error { logs; static code = 6033; code = 6033; name = "MaxInvestableZero"; msg = "Cannot have zero investable amount"; constructor(logs) { super("6033: Cannot have zero investable amount"); this.logs = logs; } } exports.MaxInvestableZero = MaxInvestableZero; class CollectFeesBlocked extends Error { logs; static code = 6034; code = 6034; name = "CollectFeesBlocked"; msg = "Collect fees is blocked"; constructor(logs) { super("6034: Collect fees is blocked"); this.logs = logs; } } exports.CollectFeesBlocked = CollectFeesBlocked; class CollectRewardsBlocked extends Error { logs; static code = 6035; code = 6035; name = "CollectRewardsBlocked"; msg = "Collect rewards is blocked"; constructor(logs) { super("6035: Collect rewards is blocked"); this.logs = logs; } } exports.CollectRewardsBlocked = CollectRewardsBlocked; class SwapRewardsBlocked extends Error { logs; static code = 6036; code = 6036; name = "SwapRewardsBlocked"; msg = "Swap rewards is blocked"; constructor(logs) { super("6036: Swap rewards is blocked"); this.logs = logs; } } exports.SwapRewardsBlocked = SwapRewardsBlocked; class WrongRewardCollateralID extends Error { logs; static code = 6037; code = 6037; name = "WrongRewardCollateralID"; msg = "Reward collateral ID is incorrect for strategy"; constructor(logs) { super("6037: Reward collateral ID is incorrect for strategy"); this.logs = logs; } } exports.WrongRewardCollateralID = WrongRewardCollateralID; class InvalidPositionAccount extends Error { logs; static code = 6038; code = 6038; name = "InvalidPositionAccount"; msg = "Position account doesn't match internal records"; constructor(logs) { super("6038: Position account doesn't match internal records"); this.logs = logs; } } exports.InvalidPositionAccount = InvalidPositionAccount; class CouldNotDeserializeScope extends Error { logs; static code = 6039; code = 6039; name = "CouldNotDeserializeScope"; msg = "Scope account could not be deserialized"; constructor(logs) { super("6039: Scope account could not be deserialized"); this.logs = logs; } } exports.CouldNotDeserializeScope = CouldNotDeserializeScope; class WrongCollateralID extends Error { logs; static code = 6040; code = 6040; name = "WrongCollateralID"; msg = "[DEPRECATED] Collateral ID invalid for strategy"; constructor(logs) { super("6040: [DEPRECATED] Collateral ID invalid for strategy"); this.logs = logs; } } exports.WrongCollateralID = WrongCollateralID; class CollateralTokensExceedDepositCap extends Error { logs; static code = 6041; code = 6041; name = "CollateralTokensExceedDepositCap"; msg = "Collaterals exceed deposit cap"; constructor(logs) { super("6041: Collaterals exceed deposit cap"); this.logs = logs; } } exports.CollateralTokensExceedDepositCap = CollateralTokensExceedDepositCap; class SwapUnevenVaultsBlocked extends Error { logs; static code = 6042; code = 6042; name = "SwapUnevenVaultsBlocked"; msg = "Swap uneven vaults is blocked"; constructor(logs) { super("6042: Swap uneven vaults is blocked"); this.logs = logs; } } exports.SwapUnevenVaultsBlocked = SwapUnevenVaultsBlocked; class VaultsAreAlreadyBalanced extends Error { logs; static code = 6043; code = 6043; name = "VaultsAreAlreadyBalanced"; msg = "Cannot swap as vaults are already balanced"; constructor(logs) { super("6043: Cannot swap as vaults are already balanced"); this.logs = logs; } } exports.VaultsAreAlreadyBalanced = VaultsAreAlreadyBalanced; class CannotSwapUnevenOutOfRange extends Error { logs; static code = 6044; code = 6044; name = "CannotSwapUnevenOutOfRange"; msg = "Cannot swap uneven vaults when position is out of range"; constructor(logs) { super("6044: Cannot swap uneven vaults when position is out of range"); this.logs = logs; } } exports.CannotSwapUnevenOutOfRange = CannotSwapUnevenOutOfRange; class DivideByZero extends Error { logs; static code = 6045; code = 6045; name = "DivideByZero"; msg = "Cannot divide by zero"; constructor(logs) { super("6045: Cannot divide by zero"); this.logs = logs; } } exports.DivideByZero = DivideByZero; class DeltaATooLarge extends Error { logs; static code = 6046; code = 6046; name = "DeltaATooLarge"; msg = "[DEPRECATED] Delta A too large"; constructor(logs) { super("6046: [DEPRECATED] Delta A too large"); this.logs = logs; } } exports.DeltaATooLarge = DeltaATooLarge; class DeltaBTooLarge extends Error { logs; static code = 6047; code = 6047; name = "DeltaBTooLarge"; msg = "[DEPRECATED] Delta B too large"; constructor(logs) { super("6047: [DEPRECATED] Delta B too large"); this.logs = logs; } } exports.DeltaBTooLarge = DeltaBTooLarge; class CannotExecutiveWithdrawZeroAmount extends Error { logs; static code = 6048; code = 6048; name = "CannotExecutiveWithdrawZeroAmount"; msg = "[DEPRECATED] Cannot executive withdraw zero amount"; constructor(logs) { super("6048: [DEPRECATED] Cannot executive withdraw zero amount"); this.logs = logs; } } exports.CannotExecutiveWithdrawZeroAmount = CannotExecutiveWithdrawZeroAmount; class CannotWithdrawZeroAmount extends Error { logs; static code = 6049; code = 6049; name = "CannotWithdrawZeroAmount"; msg = "Cannot withdraw zero amount"; constructor(logs) { super("6049: Cannot withdraw zero amount"); this.logs = logs; } } exports.CannotWithdrawZeroAmount = CannotWithdrawZeroAmount; class CannotCollectFeesOnZeroLiquidityPosition extends Error { logs; static code = 6050; code = 6050; name = "CannotCollectFeesOnZeroLiquidityPosition"; msg = "[DEPRECATED] Cannot collect fees on zero liquidity position"; constructor(logs) { super("6050: [DEPRECATED] Cannot collect fees on zero liquidity position"); this.logs = logs; } } exports.CannotCollectFeesOnZeroLiquidityPosition = CannotCollectFeesOnZeroLiquidityPosition; class StrategyNotActiveWhenDepositing extends Error { logs; static code = 6051; code = 6051; name = "StrategyNotActiveWhenDepositing"; msg = "Cannot deposit inactive position"; constructor(logs) { super("6051: Cannot deposit inactive position"); this.logs = logs; } } exports.StrategyNotActiveWhenDepositing = StrategyNotActiveWhenDepositing; class StrategyNotActiveWhenOpeningPosition extends Error { logs; static code = 6052; code = 6052; name = "StrategyNotActiveWhenOpeningPosition"; msg = "Cannot open position with existing opened position"; constructor(logs) { super("6052: Cannot open position with existing opened position"); this.logs = logs; } } exports.StrategyNotActiveWhenOpeningPosition = StrategyNotActiveWhenOpeningPosition; class CollateralTokensExceedDepositCapPerIxn extends Error { logs; static code = 6053; code = 6053; name = "CollateralTokensExceedDepositCapPerIxn"; msg = "Collaterals exceed deposit ixn cap"; constructor(logs) { super("6053: Collaterals exceed deposit ixn cap"); this.logs = logs; } } exports.CollateralTokensExceedDepositCapPerIxn = CollateralTokensExceedDepositCapPerIxn; class CannotDepositOutOfRange extends Error { logs; static code = 6054; code = 6054; name = "CannotDepositOutOfRange"; msg = "Cannot deposit when strategy out of range"; constructor(logs) { super("6054: Cannot deposit when strategy out of range"); this.logs = logs; } } exports.CannotDepositOutOfRange = CannotDepositOutOfRange; class CannotInvestOutOfRange extends Error { logs; static code = 6055; code = 6055; name = "CannotInvestOutOfRange"; msg = "Cannot invest when strategy out of range"; constructor(logs) { super("6055: Cannot invest when strategy out of range"); this.logs = logs; } } exports.CannotInvestOutOfRange = CannotInvestOutOfRange; class WithdrawalCapReached extends Error { logs; static code = 6056; code = 6056; name = "WithdrawalCapReached"; msg = "Withdrawal cap is reached"; constructor(logs) { super("6056: Withdrawal cap is reached"); this.logs = logs; } } exports.WithdrawalCapReached = WithdrawalCapReached; class TimestampDecrease extends Error { logs; static code = 6057; code = 6057; name = "TimestampDecrease"; msg = "Timestamp decrease"; constructor(logs) { super("6057: Timestamp decrease"); this.logs = logs; } } exports.TimestampDecrease = TimestampDecrease; class CPINotAllowed extends Error { logs; static code = 6058; code = 6058; name = "CPINotAllowed"; msg = "CPI not allowed"; constructor(logs) { super("6058: CPI not allowed"); this.logs = logs; } } exports.CPINotAllowed = CPINotAllowed; class OrcaPriceTooDifferentFromScope extends Error { logs; static code = 6059; code = 6059; name = "OrcaPriceTooDifferentFromScope"; msg = "Cannot use orca price as it is too different from scope price"; constructor(logs) { super("6059: Cannot use orca price as it is too different from scope price"); this.logs = logs; } } exports.OrcaPriceTooDifferentFromScope = OrcaPriceTooDifferentFromScope; class LowerTickLargerThanUpperTick extends Error { logs; static code = 6060; code = 6060; name = "LowerTickLargerThanUpperTick"; msg = "Lower tick larger than upper tick"; constructor(logs) { super("6060: Lower tick larger than upper tick"); this.logs = logs; } } exports.LowerTickLargerThanUpperTick = LowerTickLargerThanUpperTick; class LowerTickTooLow extends Error { logs; static code = 6061; code = 6061; name = "LowerTickTooLow"; msg = "Lower tick is lower than the minimal supported low tick"; constructor(logs) { super("6061: Lower tick is lower than the minimal supported low tick"); this.logs = logs; } } exports.LowerTickTooLow = LowerTickTooLow; class UpperTickTooLarge extends Error { logs; static code = 6062; code = 6062; name = "UpperTickTooLarge"; msg = "Upper tick is larger than the maximum supported tick"; constructor(logs) { super("6062: Upper tick is larger than the maximum supported tick"); this.logs = logs; } } exports.UpperTickTooLarge = UpperTickTooLarge; class LowerTickNotMultipleOfTickSpacing extends Error { logs; static code = 6063; code = 6063; name = "LowerTickNotMultipleOfTickSpacing"; msg = "Lower tick is not a multiple of tick spacing"; constructor(logs) { super("6063: Lower tick is not a multiple of tick spacing"); this.logs = logs; } } exports.LowerTickNotMultipleOfTickSpacing = LowerTickNotMultipleOfTickSpacing; class UpperTickNotMultipleOfTickSpacing extends Error { logs; static code = 6064; code = 6064; name = "UpperTickNotMultipleOfTickSpacing"; msg = "Upper tick is not a multiple of tick spacing"; constructor(logs) { super("6064: Upper tick is not a multiple of tick spacing"); this.logs = logs; } } exports.UpperTickNotMultipleOfTickSpacing = UpperTickNotMultipleOfTickSpacing; class CannotChangeAdminAuthority extends Error { logs; static code = 6065; code = 6065; name = "CannotChangeAdminAuthority"; msg = "Cannot change admin authority"; constructor(logs) { super("6065: Cannot change admin authority"); this.logs = logs; } } exports.CannotChangeAdminAuthority = CannotChangeAdminAuthority; class CannotResizeAccount extends Error { logs; static code = 6066; code = 6066; name = "CannotResizeAccount"; msg = "Cannot resize with smaller new size"; constructor(logs) { super("6066: Cannot resize with smaller new size"); this.logs = logs; } } exports.CannotResizeAccount = CannotResizeAccount; class ScopeChainUpdateFailed extends Error { logs; static code = 6067; code = 6067; name = "ScopeChainUpdateFailed"; msg = "Scope chain update failed"; constructor(logs) { super("6067: Scope chain update failed"); this.logs = logs; } } exports.ScopeChainUpdateFailed = ScopeChainUpdateFailed; class PriceTooDivergentFromTwap extends Error { logs; static code = 6068; code = 6068; name = "PriceTooDivergentFromTwap"; msg = "Price too divergent from twap"; constructor(logs) { super("6068: Price too divergent from twap"); this.logs = logs; } } exports.PriceTooDivergentFromTwap = PriceTooDivergentFromTwap; class ExistingRewardOverride extends Error { logs; static code = 6069; code = 6069; name = "ExistingRewardOverride"; msg = "[DEPRECATED] Can not override the existing reward"; constructor(logs) { super("6069: [DEPRECATED] Can not override the existing reward"); this.logs = logs; } } exports.ExistingRewardOverride = ExistingRewardOverride; class WrongKaminoRewardId extends Error { logs; static code = 6070; code = 6070; name = "WrongKaminoRewardId"; msg = "Kamino reward id exceeds the available slots"; constructor(logs) { super("6070: Kamino reward id exceeds the available slots"); this.logs = logs; } } exports.WrongKaminoRewardId = WrongKaminoRewardId; class KaminoRewardNotExist extends Error { logs; static code = 6071; code = 6071; name = "KaminoRewardNotExist"; msg = "Kamino reward is not initialized"; constructor(logs) { super("6071: Kamino reward is not initialized"); this.logs = logs; } } exports.KaminoRewardNotExist = KaminoRewardNotExist; class KaminoRewardAlreadyExists extends Error { logs; static code = 6072; code = 6072; name = "KaminoRewardAlreadyExists"; msg = "Kamino reward is already initialized"; constructor(logs) { super("6072: Kamino reward is already initialized"); this.logs = logs; } } exports.KaminoRewardAlreadyExists = KaminoRewardAlreadyExists; class KaminoCollateralNotValid extends Error { logs; static code = 6073; code = 6073; name = "KaminoCollateralNotValid"; msg = "Kamino collateral is not valid"; constructor(logs) { super("6073: Kamino collateral is not valid"); this.logs = logs; } } exports.KaminoCollateralNotValid = KaminoCollateralNotValid; class KaminoRewardExceedsAvailableAmount extends Error { logs; static code = 6074; code = 6074; name = "KaminoRewardExceedsAvailableAmount"; msg = "[DEPRECATED] Expected kamino reward is bigger then the available amount within the vault"; constructor(logs) { super("6074: [DEPRECATED] Expected kamino reward is bigger then the available amount within the vault"); this.logs = logs; } } exports.KaminoRewardExceedsAvailableAmount = KaminoRewardExceedsAvailableAmount; class SwapUnevenVaultsOvershoot extends Error { logs; static code = 6075; code = 6075; name = "SwapUnevenVaultsOvershoot"; msg = "Swap uneven vaults result in the opposite unbalance of the vaults"; constructor(logs) { super("6075: Swap uneven vaults result in the opposite unbalance of the vaults"); this.logs = logs; } } exports.SwapUnevenVaultsOvershoot = SwapUnevenVaultsOvershoot; class BpsNotInRange extends Error { logs; static code = 6076; code = 6076; name = "BpsNotInRange"; msg = "Bps parameter passed to instruction is not in range"; constructor(logs) { super("6076: Bps parameter passed to instruction is not in range"); this.logs = logs; } } exports.BpsNotInRange = BpsNotInRange; class EmergencySwapBlocked extends Error { logs; static code = 6077; code = 6077; name = "EmergencySwapBlocked"; msg = "Emergency Swap is blocked"; constructor(logs) { super("6077: Emergency Swap is blocked"); this.logs = logs; } } exports.EmergencySwapBlocked = EmergencySwapBlocked; class StrategyNotFrozen extends Error { logs; static code = 6078; code = 6078; name = "StrategyNotFrozen"; msg = "Strategy is expected to be frozen for this operation"; constructor(logs) { super("6078: Strategy is expected to be frozen for this operation"); this.logs = logs; } } exports.StrategyNotFrozen = StrategyNotFrozen; class UnexpectedTokenAmountsPostSwap extends Error { logs; static code = 6079; code = 6079; name = "UnexpectedTokenAmountsPostSwap"; msg = "Token left in vault post swap are lower than expected"; constructor(logs) { super("6079: Token left in vault post swap are lower than expected"); this.logs = logs; } } exports.UnexpectedTokenAmountsPostSwap = UnexpectedTokenAmountsPostSwap; class AccountNotBelongToDEX extends Error { logs; static code = 6080; code = 6080; name = "AccountNotBelongToDEX"; msg = "Account doesn't belong to the DEX"; constructor(logs) { super("6080: Account doesn't belong to the DEX"); this.logs = logs; } } exports.AccountNotBelongToDEX = AccountNotBelongToDEX; class WrongDEXProgramID extends Error { logs; static code = 6081; code = 6081; name = "WrongDEXProgramID"; msg = "Wrong DEX program ID"; constructor(logs) { super("6081: Wrong DEX program ID"); this.logs = logs; } } exports.WrongDEXProgramID = WrongDEXProgramID; class OrcaRewardUninitialized extends Error { logs; static code = 6082; code = 6082; name = "OrcaRewardUninitialized"; msg = "Cannot use uninitialized orca reward vault"; constructor(logs) { super("6082: Cannot use uninitialized orca reward vault"); this.logs = logs; } } exports.OrcaRewardUninitialized = OrcaRewardUninitialized; class InvalidAdminAuthority extends Error { logs; static code = 6083; code = 6083; name = "InvalidAdminAuthority"; msg = "Invalid admin authority"; constructor(logs) { super("6083: Invalid admin authority"); this.logs = logs; } } exports.InvalidAdminAuthority = InvalidAdminAuthority; class PriceIsBiggerThanHeuristic extends Error { logs; static code = 6084; code = 6084; name = "PriceIsBiggerThanHeuristic"; msg = "Token price is bigger than heuristic"; constructor(logs) { super("6084: Token price is bigger than heuristic"); this.logs = logs; } } exports.PriceIsBiggerThanHeuristic = PriceIsBiggerThanHeuristic; class PriceIsLowerThanHeuristic extends Error { logs; static code = 6085; code = 6085; name = "PriceIsLowerThanHeuristic"; msg = "Token price is lower than heuristic"; constructor(logs) { super("6085: Token price is lower than heuristic"); this.logs = logs; } } exports.PriceIsLowerThanHeuristic = PriceIsLowerThanHeuristic; class AccountDifferentThanExpected extends Error { logs; static code = 6086; code = 6086; name = "AccountDifferentThanExpected"; msg = "Account different than expected"; constructor(logs) { super("6086: Account different than expected"); this.logs = logs; } } exports.AccountDifferentThanExpected = AccountDifferentThanExpected; class SwapAmountsTooSmall extends Error { logs; static code = 6087; code = 6087; name = "SwapAmountsTooSmall"; msg = "Swap amount below the minimum value"; constructor(logs) { super("6087: Swap amount below the minimum value"); this.logs = logs; } } exports.SwapAmountsTooSmall = SwapAmountsTooSmall; class InvalidDexProgramId extends Error { logs; static code = 6088; code = 6088; name = "InvalidDexProgramId"; msg = "Invalid dex program id"; constructor(logs) { super("6088: Invalid dex program id"); this.logs = logs; } } exports.InvalidDexProgramId = InvalidDexProgramId; class StrategyDepositBlocked extends Error { logs; static code = 6089; code = 6089; name = "StrategyDepositBlocked"; msg = "Strategy deposit is currently blocked"; constructor(logs) { super("6089: Strategy deposit is currently blocked"); this.logs = logs; } } exports.StrategyDepositBlocked = StrategyDepositBlocked; class StrategyInvestBlocked extends Error { logs; static code = 6090; code = 6090; name = "StrategyInvestBlocked"; msg = "Strategy invest is currently blocked"; constructor(logs) { super("6090: Strategy invest is currently blocked"); this.logs = logs; } } exports.StrategyInvestBlocked = StrategyInvestBlocked; class StrategyWithdrawBlocked extends Error { logs; static code = 6091; code = 6091; name = "StrategyWithdrawBlocked"; msg = "Strategy withdraw is currently blocked"; constructor(logs) { super("6091: Strategy withdraw is currently blocked"); this.logs = logs; } } exports.StrategyWithdrawBlocked = StrategyWithdrawBlocked; class WrongSwapVaultDirection extends Error { logs; static code = 6092; code = 6092; name = "WrongSwapVaultDirection"; msg = "Vault swap can't be performed in the required direction"; constructor(logs) { super("6092: Vault swap can't be performed in the required direction"); this.logs = logs; } } exports.WrongSwapVaultDirection = WrongSwapVaultDirection; class SwapVaultsTooBig extends Error { logs; static code = 6093; code = 6093; name = "SwapVaultsTooBig"; msg = "Provided amount for vault swap is over the limit"; constructor(logs) { super("6093: Provided amount for vault swap is over the limit"); this.logs = logs; } } exports.SwapVaultsTooBig = SwapVaultsTooBig; class SwapVaultsCashOutputBelowMinimum extends Error { logs; static code = 6094; code = 6094; name = "SwapVaultsCashOutputBelowMinimum"; msg = "Token out for cash based vault swap is below minimum expected"; constructor(logs) { super("6094: Token out for cash based vault swap is below minimum expected"); this.logs = logs; } } exports.SwapVaultsCashOutputBelowMinimum = SwapVaultsCashOutputBelowMinimum; class FlashIxsNotEnded extends Error { logs; static code = 6095; code = 6095; name = "FlashIxsNotEnded"; msg = "Flash ixs initiated without the closing ix in the transaction"; constructor(logs) { super("6095: Flash ixs initiated without the closing ix in the transaction"); this.logs = logs; } } exports.FlashIxsNotEnded = FlashIxsNotEnded; class FlashTxWithUnexpectedIxs extends Error { logs; static code = 6096; code = 6096; name = "FlashTxWithUnexpectedIxs"; msg = "Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between"; constructor(logs) { super("6096: Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between"); this.logs = logs; } } exports.FlashTxWithUnexpectedIxs = FlashTxWithUnexpectedIxs; class FlashIxsAccountMismatch extends Error { logs; static code = 6097; code = 6097; name = "FlashIxsAccountMismatch"; msg = "Some accounts differ between the two flash ixs"; constructor(logs) { super("6097: Some accounts differ between the two flash ixs"); this.logs = logs; } } exports.FlashIxsAccountMismatch = FlashIxsAccountMismatch; class FlashIxsIncludeScope extends Error { logs; static code = 6098; code = 6098; name = "FlashIxsIncludeScope"; msg = "A scope ix is present in a flash tx"; constructor(logs) { super("6098: A scope ix is present in a flash tx"); this.logs = logs; } } exports.FlashIxsIncludeScope = FlashIxsIncludeScope; class FlashVaultSwapBlocked extends Error { logs; static code = 6099; code = 6099; name = "FlashVaultSwapBlocked"; msg = "Flash vault swap is blocked on this strategy"; constructor(logs) { super("6099: Flash vault swap is blocked on this strategy"); this.logs = logs; } } exports.FlashVaultSwapBlocked = FlashVaultSwapBlocked; class FlashVaultSwapWrongAmountToLeave extends Error { logs; static code = 6100; code = 6100; name = "FlashVaultSwapWrongAmountToLeave"; msg = "Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user)"; constructor(logs) { super("6100: Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user)"); this.logs = logs; } } exports.FlashVaultSwapWrongAmountToLeave = FlashVaultSwapWrongAmountToLeave; class DepositLessThanMinimum extends Error { logs; static code = 6101; code = 6101; name = "DepositLessThanMinimum"; msg = "Deposit amount less than minimal allowed"; constructor(logs) { super("6101: Deposit amount less than minimal allowed"); this.logs = logs; } } exports.DepositLessThanMinimum = DepositLessThanMinimum; class DepositWithoutInvestDisallowed extends Error { logs; static code = 6102; code = 6102; name = "DepositWithoutInvestDisallowed"; msg = "Cannot deposit without invest"; constructor(logs) { super("6102: Cannot deposit without invest"); this.logs = logs; } } exports.DepositWithoutInvestDisallowed = DepositWithoutInvestDisallowed; class InvalidScopeChain extends Error { logs; static code = 6103; code = 6103; name = "InvalidScopeChain"; msg = "Invalid Scope Chain"; constructor(logs) { super("6103: Invalid Scope Chain"); this.logs = logs; } } exports.InvalidScopeChain = InvalidScopeChain; class InvalidScopeTWAPChain extends Error { logs; static code = 6104; code = 6104; name = "InvalidScopeTWAPChain"; msg = "Invalid Scope TWAP Chain"; constructor(logs) { super("6104: Invalid Scope TWAP Chain"); this.logs = logs; } } exports.InvalidScopeTWAPChain = InvalidScopeTWAPChain; class PositionHasRemainingLiquidity extends Error { logs; static code = 6105; code = 6105; name = "PositionHasRemainingLiquidity"; msg = "Existent position has liquidity, new position creation is forbidden"; constructor(logs) { super("6105: Existent position has liquidity, new position creation is forbidden"); this.logs = logs; } } exports.PositionHasRemainingLiquidity = PositionHasRemainingLiquidity; class PoolRebalancing extends Error { logs; static code = 6106; code = 6106; name = "PoolRebalancing"; msg = "Deposit is not allowed as pool is rebalancing"; constructor(logs) { super("6106: Deposit is not allowed as pool is rebalancing"); this.logs = logs; } } exports.PoolRebalancing = PoolRebalancing; class PermissionlessRebalancingDisabled extends Error { logs; static code = 6107; code = 6107; name = "PermissionlessRebalancingDisabled"; msg = "Permissionless rebalancing is disabled"; constructor(logs) { super("6107: Permissionless rebalancing is disabled"); this.logs = logs; } } exports.PermissionlessRebalancingDisabled = PermissionlessRebalancingDisabled; class ManualRebalanceInvalidOwner extends Error { logs; static code = 6108; code = 6108; name = "ManualRebalanceInvalidOwner"; msg = "Only the owner of the strategy can manually rebalance it"; constructor(logs) { super("6108: Only the owner of the strategy can manually rebalance it"); this.logs = logs; } } exports.ManualRebalanceInvalidOwner = ManualRebalanceInvalidOwner; class InvalidRebalanceType extends Error { logs; static code = 6109; code = 6109; name = "InvalidRebalanceType"; msg = "Invalid rebalance type for the strategy"; constructor(logs) { super("6109: Invalid rebalance type for the strategy"); this.logs = logs; } } exports.InvalidRebalanceType = InvalidRebalanceType; class NoRebalanceNecessary extends Error { logs; static code = 6110; code = 6110; name = "NoRebalanceNecessary"; msg = "No rebalance necessary based on current rebalance type/parameters"; constructor(logs) { super("6110: No rebalance necessary based on current rebalance type/parameters"); this.logs = logs; } } exports.NoRebalanceNecessary = NoRebalanceNecessary; class TickArraysDoNotMatchRebalance extends Error { logs; static code = 6111; code = 6111; name = "TickArraysDoNotMatchRebalance"; msg = "The given tick arrays do not match the rebalance result"; constructor(logs) { super("6111: The given tick arrays do not match the rebalance result"); this.logs = logs; } } exports.TickArraysDoNotMatchRebalance = TickArraysDoNotMatchRebalance; class StrategyPositionNotValid extends Error { logs; static code = 6112; code = 6112; name = "StrategyPositionNotValid"; msg = "Expected strategy position to be initialized"; constructor(logs) { super("6112: Expected strategy position to be initialized"); this.logs = logs; } } exports.StrategyPositionNotValid = StrategyPositionNotValid; class CouldNotDeserializeRebalanceState extends Error { logs; static code = 6113; code = 6113; name = "CouldNotDeserializeRebalanceState"; msg = "Rebalance state could not be deserialized"; constructor(logs) { super("6113: Rebalance state could not be deserialized"); this.logs = logs; } } exports.CouldNotDeserializeRebalanceState = CouldNotDeserializeRebalanceState; class CouldNotSerializeRebalanceState extends Error { logs; static code = 6114; code = 6114; name = "CouldNotSerializeRebalanceState"; msg = "Rebalance state could not be serialized"; constructor(logs) { super("6114: Rebalance state could not be serialized"); this.logs = logs; } } exports.CouldNotSerializeRebalanceState = CouldNotSerializeRebalanceState; class CouldNotDeserializeRebalanceParams extends Error { logs; static code = 6115; code = 6115; name = "CouldNotDeserializeRebalanceParams"; msg = "Rebalance params could not be deserialized"; constructor(logs) { super("6115: Rebalance params could not be deserialized"); this.logs = logs; } } exports.CouldNotDeserializeRebalanceParams = CouldNotDeserializeRebalanceParams; class NotEnoughTokensForRatio extends Error { logs; static code = 6116; code = 6116; name = "NotEnoughTokensForRatio"; msg = "Deposit is not allowed as token amounts are not enough to match our holdings ratio"; constructor(logs) { super("6116: Deposit is not allowed as token amounts are not enough to match our holdings ratio"); this.logs = logs; } } exports.NotEnoughTokensForRatio = NotEnoughTokensForRatio; class AmountsRepresentZeroShares extends Error { logs; static code = 6117; code = 6117; name = "AmountsRepresentZeroShares"; msg = "The provided amounts are too small"; constructor(logs) { super("6117: The provided amounts are too small"); this.logs = logs; } } exports.AmountsRepresentZeroShares = AmountsRepresentZeroShares; class MaxLossExceeded extends Error { logs; static code = 6118; code = 6118; name = "MaxLossExceeded"; msg = "Rouding errors exceed the maximal loss tolerance"; constructor(logs) { super("6118: Rouding errors exceed the maximal loss tolerance"); this.logs = logs; } } exports.MaxLossExceeded = MaxLossExceeded; class RewardNotStrategyToken extends Error { logs; static code = 6119; code = 6119; name = "RewardNotStrategyToken"; msg = "Reward does not match strategy token"; constructor(logs) { super("6119: Reward does not match strategy token"); this.logs = logs; } } exports.RewardNotStrategyToken = RewardNotStrategyToken; class DecimalToU64ConversionFailed extends Error { logs; static code = 6120; code = 6120; name = "DecimalToU64ConversionFailed"; msg = "Decimal to u64 conversion failed"; constructor(logs) { super("6120: Decimal to u64 conversion failed"); this.logs = logs; } } exports.DecimalToU64ConversionFailed = DecimalToU64ConversionFailed; class DecimalOperationFailed extends Error { logs; static code = 6121; code = 6121; name = "Decima