/** * 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 */ import type { Address, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SolanaError } from "@solana/kit"; /** InvalidEnum: Enum value could not be converted */ export declare const WHIRLPOOL_ERROR__INVALID_ENUM = 6000; /** InvalidStartTick: Invalid start tick index provided. */ export declare const WHIRLPOOL_ERROR__INVALID_START_TICK = 6001; /** TickArrayExistInPool: Tick-array already exists in this whirlpool */ export declare const WHIRLPOOL_ERROR__TICK_ARRAY_EXIST_IN_POOL = 6002; /** TickArrayIndexOutofBounds: Attempt to search for a tick-array failed */ export declare const WHIRLPOOL_ERROR__TICK_ARRAY_INDEX_OUTOF_BOUNDS = 6003; /** InvalidTickSpacing: Tick-spacing is not supported */ export declare const WHIRLPOOL_ERROR__INVALID_TICK_SPACING = 6004; /** ClosePositionNotEmpty: Position is not empty It cannot be closed */ export declare const WHIRLPOOL_ERROR__CLOSE_POSITION_NOT_EMPTY = 6005; /** DivideByZero: Unable to divide by zero */ export declare const WHIRLPOOL_ERROR__DIVIDE_BY_ZERO = 6006; /** NumberCastError: Unable to cast number into BigInt */ export declare const WHIRLPOOL_ERROR__NUMBER_CAST_ERROR = 6007; /** NumberDownCastError: Unable to down cast number */ export declare const WHIRLPOOL_ERROR__NUMBER_DOWN_CAST_ERROR = 6008; /** TickNotFound: Tick not found within tick array */ export declare const WHIRLPOOL_ERROR__TICK_NOT_FOUND = 6009; /** InvalidTickIndex: Provided tick index is either out of bounds or uninitializable */ export declare const WHIRLPOOL_ERROR__INVALID_TICK_INDEX = 6010; /** SqrtPriceOutOfBounds: Provided sqrt price out of bounds */ export declare const WHIRLPOOL_ERROR__SQRT_PRICE_OUT_OF_BOUNDS = 6011; /** LiquidityZero: Liquidity amount must be greater than zero */ export declare const WHIRLPOOL_ERROR__LIQUIDITY_ZERO = 6012; /** LiquidityTooHigh: Liquidity amount must be less than i64::MAX */ export declare const WHIRLPOOL_ERROR__LIQUIDITY_TOO_HIGH = 6013; /** LiquidityOverflow: Liquidity overflow */ export declare const WHIRLPOOL_ERROR__LIQUIDITY_OVERFLOW = 6014; /** LiquidityUnderflow: Liquidity underflow */ export declare const WHIRLPOOL_ERROR__LIQUIDITY_UNDERFLOW = 6015; /** LiquidityNetError: Tick liquidity net underflowed or overflowed */ export declare const WHIRLPOOL_ERROR__LIQUIDITY_NET_ERROR = 6016; /** TokenMaxExceeded: Exceeded token max */ export declare const WHIRLPOOL_ERROR__TOKEN_MAX_EXCEEDED = 6017; /** TokenMinSubceeded: Did not meet token min */ export declare const WHIRLPOOL_ERROR__TOKEN_MIN_SUBCEEDED = 6018; /** MissingOrInvalidDelegate: Position token account has a missing or invalid delegate */ export declare const WHIRLPOOL_ERROR__MISSING_OR_INVALID_DELEGATE = 6019; /** InvalidPositionTokenAmount: Position token amount must be 1 */ export declare const WHIRLPOOL_ERROR__INVALID_POSITION_TOKEN_AMOUNT = 6020; /** InvalidTimestampConversion: Timestamp should be convertible from i64 to u64 */ export declare const WHIRLPOOL_ERROR__INVALID_TIMESTAMP_CONVERSION = 6021; /** InvalidTimestamp: Timestamp should be greater than the last updated timestamp */ export declare const WHIRLPOOL_ERROR__INVALID_TIMESTAMP = 6022; /** InvalidTickArraySequence: Invalid tick array sequence provided for instruction. */ export declare const WHIRLPOOL_ERROR__INVALID_TICK_ARRAY_SEQUENCE = 6023; /** InvalidTokenMintOrder: Token Mint in wrong order */ export declare const WHIRLPOOL_ERROR__INVALID_TOKEN_MINT_ORDER = 6024; /** RewardNotInitialized: Reward not initialized */ export declare const WHIRLPOOL_ERROR__REWARD_NOT_INITIALIZED = 6025; /** InvalidRewardIndex: Invalid reward index */ export declare const WHIRLPOOL_ERROR__INVALID_REWARD_INDEX = 6026; /** RewardVaultAmountInsufficient: Reward vault requires amount to support emissions for at least one day */ export declare const WHIRLPOOL_ERROR__REWARD_VAULT_AMOUNT_INSUFFICIENT = 6027; /** FeeRateMaxExceeded: Exceeded max fee rate */ export declare const WHIRLPOOL_ERROR__FEE_RATE_MAX_EXCEEDED = 6028; /** ProtocolFeeRateMaxExceeded: Exceeded max protocol fee rate */ export declare const WHIRLPOOL_ERROR__PROTOCOL_FEE_RATE_MAX_EXCEEDED = 6029; /** MultiplicationShiftRightOverflow: Multiplication with shift right overflow */ export declare const WHIRLPOOL_ERROR__MULTIPLICATION_SHIFT_RIGHT_OVERFLOW = 6030; /** MulDivOverflow: Muldiv overflow */ export declare const WHIRLPOOL_ERROR__MUL_DIV_OVERFLOW = 6031; /** MulDivInvalidInput: Invalid div_u256 input */ export declare const WHIRLPOOL_ERROR__MUL_DIV_INVALID_INPUT = 6032; /** MultiplicationOverflow: Multiplication overflow */ export declare const WHIRLPOOL_ERROR__MULTIPLICATION_OVERFLOW = 6033; /** InvalidSqrtPriceLimitDirection: Provided SqrtPriceLimit not in the same direction as the swap. */ export declare const WHIRLPOOL_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION = 6034; /** ZeroTradableAmount: There are no tradable amount to swap. */ export declare const WHIRLPOOL_ERROR__ZERO_TRADABLE_AMOUNT = 6035; /** AmountOutBelowMinimum: Amount out below minimum threshold */ export declare const WHIRLPOOL_ERROR__AMOUNT_OUT_BELOW_MINIMUM = 6036; /** AmountInAboveMaximum: Amount in above maximum threshold */ export declare const WHIRLPOOL_ERROR__AMOUNT_IN_ABOVE_MAXIMUM = 6037; /** TickArraySequenceInvalidIndex: Invalid index for tick array sequence */ export declare const WHIRLPOOL_ERROR__TICK_ARRAY_SEQUENCE_INVALID_INDEX = 6038; /** AmountCalcOverflow: Amount calculated overflows */ export declare const WHIRLPOOL_ERROR__AMOUNT_CALC_OVERFLOW = 6039; /** AmountRemainingOverflow: Amount remaining overflows */ export declare const WHIRLPOOL_ERROR__AMOUNT_REMAINING_OVERFLOW = 6040; /** InvalidIntermediaryMint: Invalid intermediary mint */ export declare const WHIRLPOOL_ERROR__INVALID_INTERMEDIARY_MINT = 6041; /** DuplicateTwoHopPool: Duplicate two hop pool */ export declare const WHIRLPOOL_ERROR__DUPLICATE_TWO_HOP_POOL = 6042; /** InvalidBundleIndex: Bundle index is out of bounds */ export declare const WHIRLPOOL_ERROR__INVALID_BUNDLE_INDEX = 6043; /** BundledPositionAlreadyOpened: Position has already been opened */ export declare const WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_OPENED = 6044; /** BundledPositionAlreadyClosed: Position has already been closed */ export declare const WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_CLOSED = 6045; /** PositionBundleNotDeletable: Unable to delete PositionBundle with open positions */ export declare const WHIRLPOOL_ERROR__POSITION_BUNDLE_NOT_DELETABLE = 6046; /** UnsupportedTokenMint: Token mint has unsupported attributes */ export declare const WHIRLPOOL_ERROR__UNSUPPORTED_TOKEN_MINT = 6047; /** RemainingAccountsInvalidSlice: Invalid remaining accounts */ export declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE = 6048; /** RemainingAccountsInsufficient: Insufficient remaining accounts */ export declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT = 6049; /** NoExtraAccountsForTransferHook: Unable to call transfer hook without extra accounts */ export declare const WHIRLPOOL_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK = 6050; /** IntermediateTokenAmountMismatch: Output and input amount mismatch */ export declare const WHIRLPOOL_ERROR__INTERMEDIATE_TOKEN_AMOUNT_MISMATCH = 6051; /** TransferFeeCalculationError: Transfer fee calculation failed */ export declare const WHIRLPOOL_ERROR__TRANSFER_FEE_CALCULATION_ERROR = 6052; /** RemainingAccountsDuplicatedAccountsType: Same accounts type is provided more than once */ export declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE = 6053; /** FullRangeOnlyPool: This whirlpool only supports full-range positions */ export declare const WHIRLPOOL_ERROR__FULL_RANGE_ONLY_POOL = 6054; /** TooManySupplementalTickArrays: Too many supplemental tick arrays provided */ export declare const WHIRLPOOL_ERROR__TOO_MANY_SUPPLEMENTAL_TICK_ARRAYS = 6055; /** DifferentWhirlpoolTickArrayAccount: TickArray account for different whirlpool provided */ export declare const WHIRLPOOL_ERROR__DIFFERENT_WHIRLPOOL_TICK_ARRAY_ACCOUNT = 6056; /** PartialFillError: Trade resulted in partial fill */ export declare const WHIRLPOOL_ERROR__PARTIAL_FILL_ERROR = 6057; /** PositionNotLockable: Position is not lockable */ export declare const WHIRLPOOL_ERROR__POSITION_NOT_LOCKABLE = 6058; /** OperationNotAllowedOnLockedPosition: Operation not allowed on locked position */ export declare const WHIRLPOOL_ERROR__OPERATION_NOT_ALLOWED_ON_LOCKED_POSITION = 6059; export type WhirlpoolError = typeof WHIRLPOOL_ERROR__AMOUNT_CALC_OVERFLOW | typeof WHIRLPOOL_ERROR__AMOUNT_IN_ABOVE_MAXIMUM | typeof WHIRLPOOL_ERROR__AMOUNT_OUT_BELOW_MINIMUM | typeof WHIRLPOOL_ERROR__AMOUNT_REMAINING_OVERFLOW | typeof WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_CLOSED | typeof WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_OPENED | typeof WHIRLPOOL_ERROR__CLOSE_POSITION_NOT_EMPTY | typeof WHIRLPOOL_ERROR__DIFFERENT_WHIRLPOOL_TICK_ARRAY_ACCOUNT | typeof WHIRLPOOL_ERROR__DIVIDE_BY_ZERO | typeof WHIRLPOOL_ERROR__DUPLICATE_TWO_HOP_POOL | typeof WHIRLPOOL_ERROR__FEE_RATE_MAX_EXCEEDED | typeof WHIRLPOOL_ERROR__FULL_RANGE_ONLY_POOL | typeof WHIRLPOOL_ERROR__INTERMEDIATE_TOKEN_AMOUNT_MISMATCH | typeof WHIRLPOOL_ERROR__INVALID_BUNDLE_INDEX | typeof WHIRLPOOL_ERROR__INVALID_ENUM | typeof WHIRLPOOL_ERROR__INVALID_INTERMEDIARY_MINT | typeof WHIRLPOOL_ERROR__INVALID_POSITION_TOKEN_AMOUNT | typeof WHIRLPOOL_ERROR__INVALID_REWARD_INDEX | typeof WHIRLPOOL_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION | typeof WHIRLPOOL_ERROR__INVALID_START_TICK | typeof WHIRLPOOL_ERROR__INVALID_TICK_ARRAY_SEQUENCE | typeof WHIRLPOOL_ERROR__INVALID_TICK_INDEX | typeof WHIRLPOOL_ERROR__INVALID_TICK_SPACING | typeof WHIRLPOOL_ERROR__INVALID_TIMESTAMP | typeof WHIRLPOOL_ERROR__INVALID_TIMESTAMP_CONVERSION | typeof WHIRLPOOL_ERROR__INVALID_TOKEN_MINT_ORDER | typeof WHIRLPOOL_ERROR__LIQUIDITY_NET_ERROR | typeof WHIRLPOOL_ERROR__LIQUIDITY_OVERFLOW | typeof WHIRLPOOL_ERROR__LIQUIDITY_TOO_HIGH | typeof WHIRLPOOL_ERROR__LIQUIDITY_UNDERFLOW | typeof WHIRLPOOL_ERROR__LIQUIDITY_ZERO | typeof WHIRLPOOL_ERROR__MISSING_OR_INVALID_DELEGATE | typeof WHIRLPOOL_ERROR__MUL_DIV_INVALID_INPUT | typeof WHIRLPOOL_ERROR__MUL_DIV_OVERFLOW | typeof WHIRLPOOL_ERROR__MULTIPLICATION_OVERFLOW | typeof WHIRLPOOL_ERROR__MULTIPLICATION_SHIFT_RIGHT_OVERFLOW | typeof WHIRLPOOL_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK | typeof WHIRLPOOL_ERROR__NUMBER_CAST_ERROR | typeof WHIRLPOOL_ERROR__NUMBER_DOWN_CAST_ERROR | typeof WHIRLPOOL_ERROR__OPERATION_NOT_ALLOWED_ON_LOCKED_POSITION | typeof WHIRLPOOL_ERROR__PARTIAL_FILL_ERROR | typeof WHIRLPOOL_ERROR__POSITION_BUNDLE_NOT_DELETABLE | typeof WHIRLPOOL_ERROR__POSITION_NOT_LOCKABLE | typeof WHIRLPOOL_ERROR__PROTOCOL_FEE_RATE_MAX_EXCEEDED | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE | typeof WHIRLPOOL_ERROR__REWARD_NOT_INITIALIZED | typeof WHIRLPOOL_ERROR__REWARD_VAULT_AMOUNT_INSUFFICIENT | typeof WHIRLPOOL_ERROR__SQRT_PRICE_OUT_OF_BOUNDS | typeof WHIRLPOOL_ERROR__TICK_ARRAY_EXIST_IN_POOL | typeof WHIRLPOOL_ERROR__TICK_ARRAY_INDEX_OUTOF_BOUNDS | typeof WHIRLPOOL_ERROR__TICK_ARRAY_SEQUENCE_INVALID_INDEX | typeof WHIRLPOOL_ERROR__TICK_NOT_FOUND | typeof WHIRLPOOL_ERROR__TOKEN_MAX_EXCEEDED | typeof WHIRLPOOL_ERROR__TOKEN_MIN_SUBCEEDED | typeof WHIRLPOOL_ERROR__TOO_MANY_SUPPLEMENTAL_TICK_ARRAYS | typeof WHIRLPOOL_ERROR__TRANSFER_FEE_CALCULATION_ERROR | typeof WHIRLPOOL_ERROR__UNSUPPORTED_TOKEN_MINT | typeof WHIRLPOOL_ERROR__ZERO_TRADABLE_AMOUNT; export declare function getWhirlpoolErrorMessage(code: WhirlpoolError): string; export declare function isWhirlpoolError(error: unknown, transactionMessage: { instructions: Record; }, code?: TProgramErrorCode): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode; }>; }>; //# sourceMappingURL=whirlpool.d.ts.map