UNPKG

@kamino-finance/kliquidity-sdk

Version:

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

104 lines 8.43 kB
/** * 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, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit'; /** LOK: LOK */ export declare const AMM_V3_ERROR__L_O_K = 6000; /** NotApproved: Not approved */ export declare const AMM_V3_ERROR__NOT_APPROVED = 6001; /** InvalidUpdateConfigFlag: invalid update amm config flag */ export declare const AMM_V3_ERROR__INVALID_UPDATE_CONFIG_FLAG = 6002; /** AccountLack: Account lack */ export declare const AMM_V3_ERROR__ACCOUNT_LACK = 6003; /** ClosePositionErr: Remove liquitity, collect fees owed and reward then you can close position account */ export declare const AMM_V3_ERROR__CLOSE_POSITION_ERR = 6004; /** ZeroMintAmount: Minting amount should be greater than 0 */ export declare const AMM_V3_ERROR__ZERO_MINT_AMOUNT = 6005; /** InvaildTickIndex: Tick out of range */ export declare const AMM_V3_ERROR__INVAILD_TICK_INDEX = 6006; /** TickInvaildOrder: The lower tick must be below the upper tick */ export declare const AMM_V3_ERROR__TICK_INVAILD_ORDER = 6007; /** TickLowerOverflow: The tick must be greater, or equal to the minimum tick(-221818) */ export declare const AMM_V3_ERROR__TICK_LOWER_OVERFLOW = 6008; /** TickUpperOverflow: The tick must be lesser than, or equal to the maximum tick(221818) */ export declare const AMM_V3_ERROR__TICK_UPPER_OVERFLOW = 6009; /** TickAndSpacingNotMatch: tick % tick_spacing must be zero */ export declare const AMM_V3_ERROR__TICK_AND_SPACING_NOT_MATCH = 6010; /** InvalidTickArray: Invaild tick array account */ export declare const AMM_V3_ERROR__INVALID_TICK_ARRAY = 6011; /** InvalidTickArrayBoundary: Invaild tick array boundary */ export declare const AMM_V3_ERROR__INVALID_TICK_ARRAY_BOUNDARY = 6012; /** SqrtPriceLimitOverflow: Square root price limit overflow */ export declare const AMM_V3_ERROR__SQRT_PRICE_LIMIT_OVERFLOW = 6013; /** SqrtPriceX64: sqrt_price_x64 out of range */ export declare const AMM_V3_ERROR__SQRT_PRICE_X64 = 6014; /** LiquiditySubValueErr: Liquidity sub delta L must be smaller than before */ export declare const AMM_V3_ERROR__LIQUIDITY_SUB_VALUE_ERR = 6015; /** LiquidityAddValueErr: Liquidity add delta L must be greater, or equal to before */ export declare const AMM_V3_ERROR__LIQUIDITY_ADD_VALUE_ERR = 6016; /** InvaildLiquidity: Invaild liquidity when update position */ export declare const AMM_V3_ERROR__INVAILD_LIQUIDITY = 6017; /** ForbidBothZeroForSupplyLiquidity: Both token amount must not be zero while supply liquidity */ export declare const AMM_V3_ERROR__FORBID_BOTH_ZERO_FOR_SUPPLY_LIQUIDITY = 6018; /** LiquidityInsufficient: Liquidity insufficient */ export declare const AMM_V3_ERROR__LIQUIDITY_INSUFFICIENT = 6019; /** TransactionTooOld: Transaction too old */ export declare const AMM_V3_ERROR__TRANSACTION_TOO_OLD = 6020; /** PriceSlippageCheck: Price slippage check */ export declare const AMM_V3_ERROR__PRICE_SLIPPAGE_CHECK = 6021; /** TooLittleOutputReceived: Too little output received */ export declare const AMM_V3_ERROR__TOO_LITTLE_OUTPUT_RECEIVED = 6022; /** TooMuchInputPaid: Too much input paid */ export declare const AMM_V3_ERROR__TOO_MUCH_INPUT_PAID = 6023; /** InvaildSwapAmountSpecified: Swap special amount can not be zero */ export declare const AMM_V3_ERROR__INVAILD_SWAP_AMOUNT_SPECIFIED = 6024; /** InvalidInputPoolVault: Input pool vault is invalid */ export declare const AMM_V3_ERROR__INVALID_INPUT_POOL_VAULT = 6025; /** TooSmallInputOrOutputAmount: Swap input or output amount is too small */ export declare const AMM_V3_ERROR__TOO_SMALL_INPUT_OR_OUTPUT_AMOUNT = 6026; /** NotEnoughTickArrayAccount: Not enought tick array account */ export declare const AMM_V3_ERROR__NOT_ENOUGH_TICK_ARRAY_ACCOUNT = 6027; /** InvalidFirstTickArrayAccount: Invaild first tick array account */ export declare const AMM_V3_ERROR__INVALID_FIRST_TICK_ARRAY_ACCOUNT = 6028; /** InvalidRewardIndex: Invalid reward index */ export declare const AMM_V3_ERROR__INVALID_REWARD_INDEX = 6029; /** FullRewardInfo: The init reward token reach to the max */ export declare const AMM_V3_ERROR__FULL_REWARD_INFO = 6030; /** RewardTokenAlreadyInUse: The init reward token already in use */ export declare const AMM_V3_ERROR__REWARD_TOKEN_ALREADY_IN_USE = 6031; /** ExceptPoolVaultMint: The reward tokens must contain one of pool vault mint except the last reward */ export declare const AMM_V3_ERROR__EXCEPT_POOL_VAULT_MINT = 6032; /** InvalidRewardInitParam: Invalid reward init param */ export declare const AMM_V3_ERROR__INVALID_REWARD_INIT_PARAM = 6033; /** InvalidRewardDesiredAmount: Invalid collect reward desired amount */ export declare const AMM_V3_ERROR__INVALID_REWARD_DESIRED_AMOUNT = 6034; /** InvalidRewardInputAccountNumber: Invalid collect reward input account number */ export declare const AMM_V3_ERROR__INVALID_REWARD_INPUT_ACCOUNT_NUMBER = 6035; /** InvalidRewardPeriod: Invalid reward period */ export declare const AMM_V3_ERROR__INVALID_REWARD_PERIOD = 6036; /** NotApproveUpdateRewardEmissiones: Modification of emissiones is allowed within 72 hours from the end of the previous cycle */ export declare const AMM_V3_ERROR__NOT_APPROVE_UPDATE_REWARD_EMISSIONES = 6037; /** UnInitializedRewardInfo: uninitialized reward info */ export declare const AMM_V3_ERROR__UN_INITIALIZED_REWARD_INFO = 6038; /** NotSupportMint: Not support token_2022 mint extension */ export declare const AMM_V3_ERROR__NOT_SUPPORT_MINT = 6039; /** MissingTickArrayBitmapExtensionAccount: Missing tickarray bitmap extension account */ export declare const AMM_V3_ERROR__MISSING_TICK_ARRAY_BITMAP_EXTENSION_ACCOUNT = 6040; /** InsufficientLiquidityForDirection: Insufficient liquidity for this direction */ export declare const AMM_V3_ERROR__INSUFFICIENT_LIQUIDITY_FOR_DIRECTION = 6041; export type AmmV3Error = typeof AMM_V3_ERROR__ACCOUNT_LACK | typeof AMM_V3_ERROR__CLOSE_POSITION_ERR | typeof AMM_V3_ERROR__EXCEPT_POOL_VAULT_MINT | typeof AMM_V3_ERROR__FORBID_BOTH_ZERO_FOR_SUPPLY_LIQUIDITY | typeof AMM_V3_ERROR__FULL_REWARD_INFO | typeof AMM_V3_ERROR__INSUFFICIENT_LIQUIDITY_FOR_DIRECTION | typeof AMM_V3_ERROR__INVAILD_LIQUIDITY | typeof AMM_V3_ERROR__INVAILD_SWAP_AMOUNT_SPECIFIED | typeof AMM_V3_ERROR__INVAILD_TICK_INDEX | typeof AMM_V3_ERROR__INVALID_FIRST_TICK_ARRAY_ACCOUNT | typeof AMM_V3_ERROR__INVALID_INPUT_POOL_VAULT | typeof AMM_V3_ERROR__INVALID_REWARD_DESIRED_AMOUNT | typeof AMM_V3_ERROR__INVALID_REWARD_INDEX | typeof AMM_V3_ERROR__INVALID_REWARD_INIT_PARAM | typeof AMM_V3_ERROR__INVALID_REWARD_INPUT_ACCOUNT_NUMBER | typeof AMM_V3_ERROR__INVALID_REWARD_PERIOD | typeof AMM_V3_ERROR__INVALID_TICK_ARRAY | typeof AMM_V3_ERROR__INVALID_TICK_ARRAY_BOUNDARY | typeof AMM_V3_ERROR__INVALID_UPDATE_CONFIG_FLAG | typeof AMM_V3_ERROR__LIQUIDITY_ADD_VALUE_ERR | typeof AMM_V3_ERROR__LIQUIDITY_INSUFFICIENT | typeof AMM_V3_ERROR__LIQUIDITY_SUB_VALUE_ERR | typeof AMM_V3_ERROR__L_O_K | typeof AMM_V3_ERROR__MISSING_TICK_ARRAY_BITMAP_EXTENSION_ACCOUNT | typeof AMM_V3_ERROR__NOT_APPROVED | typeof AMM_V3_ERROR__NOT_APPROVE_UPDATE_REWARD_EMISSIONES | typeof AMM_V3_ERROR__NOT_ENOUGH_TICK_ARRAY_ACCOUNT | typeof AMM_V3_ERROR__NOT_SUPPORT_MINT | typeof AMM_V3_ERROR__PRICE_SLIPPAGE_CHECK | typeof AMM_V3_ERROR__REWARD_TOKEN_ALREADY_IN_USE | typeof AMM_V3_ERROR__SQRT_PRICE_LIMIT_OVERFLOW | typeof AMM_V3_ERROR__SQRT_PRICE_X64 | typeof AMM_V3_ERROR__TICK_AND_SPACING_NOT_MATCH | typeof AMM_V3_ERROR__TICK_INVAILD_ORDER | typeof AMM_V3_ERROR__TICK_LOWER_OVERFLOW | typeof AMM_V3_ERROR__TICK_UPPER_OVERFLOW | typeof AMM_V3_ERROR__TOO_LITTLE_OUTPUT_RECEIVED | typeof AMM_V3_ERROR__TOO_MUCH_INPUT_PAID | typeof AMM_V3_ERROR__TOO_SMALL_INPUT_OR_OUTPUT_AMOUNT | typeof AMM_V3_ERROR__TRANSACTION_TOO_OLD | typeof AMM_V3_ERROR__UN_INITIALIZED_REWARD_INFO | typeof AMM_V3_ERROR__ZERO_MINT_AMOUNT; export declare function getAmmV3ErrorMessage(code: AmmV3Error): string; export declare function isAmmV3Error<TProgramErrorCode extends AmmV3Error>(error: unknown, transactionMessage: { instructions: Record<number, { programAddress: Address; }>; }, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{ context: Readonly<{ code: TProgramErrorCode; }>; }>; //# sourceMappingURL=ammV3.d.ts.map