/** * 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"; /** MathOverflow: Overflow in arithmetic operation */ export declare const PERPETUALS_ERROR__MATH_OVERFLOW = 6000; /** UnsupportedOracle: Unsupported price oracle */ export declare const PERPETUALS_ERROR__UNSUPPORTED_ORACLE = 6001; /** InvalidOracleAccount: Invalid oracle account */ export declare const PERPETUALS_ERROR__INVALID_ORACLE_ACCOUNT = 6002; /** StaleOraclePrice: Stale oracle price */ export declare const PERPETUALS_ERROR__STALE_ORACLE_PRICE = 6003; /** InvalidOraclePrice: Invalid oracle price */ export declare const PERPETUALS_ERROR__INVALID_ORACLE_PRICE = 6004; /** InvalidEnvironment: Instruction is not allowed in production */ export declare const PERPETUALS_ERROR__INVALID_ENVIRONMENT = 6005; /** InvalidCollateralAccount: Invalid collateral account */ export declare const PERPETUALS_ERROR__INVALID_COLLATERAL_ACCOUNT = 6006; /** InvalidCollateralAmount: Invalid collateral amount */ export declare const PERPETUALS_ERROR__INVALID_COLLATERAL_AMOUNT = 6007; /** CollateralSlippage: Collateral slippage */ export declare const PERPETUALS_ERROR__COLLATERAL_SLIPPAGE = 6008; /** InvalidPositionState: Invalid position state */ export declare const PERPETUALS_ERROR__INVALID_POSITION_STATE = 6009; /** InvalidPerpetualsConfig: Invalid perpetuals config */ export declare const PERPETUALS_ERROR__INVALID_PERPETUALS_CONFIG = 6010; /** InvalidPoolConfig: Invalid pool config */ export declare const PERPETUALS_ERROR__INVALID_POOL_CONFIG = 6011; /** InvalidInstruction: Invalid instruction */ export declare const PERPETUALS_ERROR__INVALID_INSTRUCTION = 6012; /** InvalidCustodyConfig: Invalid custody config */ export declare const PERPETUALS_ERROR__INVALID_CUSTODY_CONFIG = 6013; /** InvalidCustodyBalance: Invalid custody balance */ export declare const PERPETUALS_ERROR__INVALID_CUSTODY_BALANCE = 6014; /** InvalidArgument: Invalid argument */ export declare const PERPETUALS_ERROR__INVALID_ARGUMENT = 6015; /** InvalidPositionRequest: Invalid position request */ export declare const PERPETUALS_ERROR__INVALID_POSITION_REQUEST = 6016; /** InvalidPositionRequestInputAta: Invalid position request input ata */ export declare const PERPETUALS_ERROR__INVALID_POSITION_REQUEST_INPUT_ATA = 6017; /** InvalidMint: Invalid mint */ export declare const PERPETUALS_ERROR__INVALID_MINT = 6018; /** InsufficientTokenAmount: Insufficient token amount */ export declare const PERPETUALS_ERROR__INSUFFICIENT_TOKEN_AMOUNT = 6019; /** InsufficientAmountReturned: Insufficient token amount returned */ export declare const PERPETUALS_ERROR__INSUFFICIENT_AMOUNT_RETURNED = 6020; /** MaxPriceSlippage: Price slippage limit exceeded */ export declare const PERPETUALS_ERROR__MAX_PRICE_SLIPPAGE = 6021; /** MaxLeverage: Position leverage limit exceeded */ export declare const PERPETUALS_ERROR__MAX_LEVERAGE = 6022; /** CustodyAmountLimit: Custody amount limit exceeded */ export declare const PERPETUALS_ERROR__CUSTODY_AMOUNT_LIMIT = 6023; /** PoolAmountLimit: Pool amount limit exceeded */ export declare const PERPETUALS_ERROR__POOL_AMOUNT_LIMIT = 6024; /** PersonalPoolAmountLimit: Personal pool amount limit exceeded */ export declare const PERPETUALS_ERROR__PERSONAL_POOL_AMOUNT_LIMIT = 6025; /** UnsupportedToken: Token is not supported */ export declare const PERPETUALS_ERROR__UNSUPPORTED_TOKEN = 6026; /** InstructionNotAllowed: Instruction is not allowed at this time */ export declare const PERPETUALS_ERROR__INSTRUCTION_NOT_ALLOWED = 6027; /** JupiterProgramMismatch: Jupiter Program ID mismatch */ export declare const PERPETUALS_ERROR__JUPITER_PROGRAM_MISMATCH = 6028; /** ProgramMismatch: Program ID mismatch */ export declare const PERPETUALS_ERROR__PROGRAM_MISMATCH = 6029; /** AddressMismatch: Address mismatch */ export declare const PERPETUALS_ERROR__ADDRESS_MISMATCH = 6030; /** KeeperATAMissing: Missing keeper ATA */ export declare const PERPETUALS_ERROR__KEEPER_A_T_A_MISSING = 6031; /** SwapAmountMismatch: Swap amount mismatch */ export declare const PERPETUALS_ERROR__SWAP_AMOUNT_MISMATCH = 6032; /** CPINotAllowed: CPI not allowed */ export declare const PERPETUALS_ERROR__C_P_I_NOT_ALLOWED = 6033; /** InvalidKeeper: Invalid Keeper */ export declare const PERPETUALS_ERROR__INVALID_KEEPER = 6034; /** ExceedExecutionPeriod: Exceed execution period */ export declare const PERPETUALS_ERROR__EXCEED_EXECUTION_PERIOD = 6035; /** InvalidRequestType: Invalid Request Type */ export declare const PERPETUALS_ERROR__INVALID_REQUEST_TYPE = 6036; /** InvalidTriggerPrice: Invalid Trigger Price */ export declare const PERPETUALS_ERROR__INVALID_TRIGGER_PRICE = 6037; /** TriggerPriceSlippage: Trigger Price Slippage */ export declare const PERPETUALS_ERROR__TRIGGER_PRICE_SLIPPAGE = 6038; /** MissingTriggerPrice: Missing Trigger Price */ export declare const PERPETUALS_ERROR__MISSING_TRIGGER_PRICE = 6039; /** MissingPriceSlippage: Missing Price Slippage */ export declare const PERPETUALS_ERROR__MISSING_PRICE_SLIPPAGE = 6040; /** InvalidPriceCalcMode: Invalid price calc mode */ export declare const PERPETUALS_ERROR__INVALID_PRICE_CALC_MODE = 6041; export type PerpetualsError = typeof PERPETUALS_ERROR__ADDRESS_MISMATCH | typeof PERPETUALS_ERROR__COLLATERAL_SLIPPAGE | typeof PERPETUALS_ERROR__C_P_I_NOT_ALLOWED | typeof PERPETUALS_ERROR__CUSTODY_AMOUNT_LIMIT | typeof PERPETUALS_ERROR__EXCEED_EXECUTION_PERIOD | typeof PERPETUALS_ERROR__INSTRUCTION_NOT_ALLOWED | typeof PERPETUALS_ERROR__INSUFFICIENT_AMOUNT_RETURNED | typeof PERPETUALS_ERROR__INSUFFICIENT_TOKEN_AMOUNT | typeof PERPETUALS_ERROR__INVALID_ARGUMENT | typeof PERPETUALS_ERROR__INVALID_COLLATERAL_ACCOUNT | typeof PERPETUALS_ERROR__INVALID_COLLATERAL_AMOUNT | typeof PERPETUALS_ERROR__INVALID_CUSTODY_BALANCE | typeof PERPETUALS_ERROR__INVALID_CUSTODY_CONFIG | typeof PERPETUALS_ERROR__INVALID_ENVIRONMENT | typeof PERPETUALS_ERROR__INVALID_INSTRUCTION | typeof PERPETUALS_ERROR__INVALID_KEEPER | typeof PERPETUALS_ERROR__INVALID_MINT | typeof PERPETUALS_ERROR__INVALID_ORACLE_ACCOUNT | typeof PERPETUALS_ERROR__INVALID_ORACLE_PRICE | typeof PERPETUALS_ERROR__INVALID_PERPETUALS_CONFIG | typeof PERPETUALS_ERROR__INVALID_POOL_CONFIG | typeof PERPETUALS_ERROR__INVALID_POSITION_REQUEST | typeof PERPETUALS_ERROR__INVALID_POSITION_REQUEST_INPUT_ATA | typeof PERPETUALS_ERROR__INVALID_POSITION_STATE | typeof PERPETUALS_ERROR__INVALID_PRICE_CALC_MODE | typeof PERPETUALS_ERROR__INVALID_REQUEST_TYPE | typeof PERPETUALS_ERROR__INVALID_TRIGGER_PRICE | typeof PERPETUALS_ERROR__JUPITER_PROGRAM_MISMATCH | typeof PERPETUALS_ERROR__KEEPER_A_T_A_MISSING | typeof PERPETUALS_ERROR__MATH_OVERFLOW | typeof PERPETUALS_ERROR__MAX_LEVERAGE | typeof PERPETUALS_ERROR__MAX_PRICE_SLIPPAGE | typeof PERPETUALS_ERROR__MISSING_PRICE_SLIPPAGE | typeof PERPETUALS_ERROR__MISSING_TRIGGER_PRICE | typeof PERPETUALS_ERROR__PERSONAL_POOL_AMOUNT_LIMIT | typeof PERPETUALS_ERROR__POOL_AMOUNT_LIMIT | typeof PERPETUALS_ERROR__PROGRAM_MISMATCH | typeof PERPETUALS_ERROR__STALE_ORACLE_PRICE | typeof PERPETUALS_ERROR__SWAP_AMOUNT_MISMATCH | typeof PERPETUALS_ERROR__TRIGGER_PRICE_SLIPPAGE | typeof PERPETUALS_ERROR__UNSUPPORTED_ORACLE | typeof PERPETUALS_ERROR__UNSUPPORTED_TOKEN; export declare function getPerpetualsErrorMessage(code: PerpetualsError): string; export declare function isPerpetualsError(error: unknown, transactionMessage: { instructions: Record; }, code?: TProgramErrorCode): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode; }>; }>; //# sourceMappingURL=perpetuals.d.ts.map