/** * 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 Instruction, type InstructionWithData, type ReadonlyUint8Array } from "@solana/kit"; import { type ParsedAddCustodyInstruction, type ParsedAddLiquidityInstruction, type ParsedAddPoolInstruction, type ParsedClosePositionRequestInstruction, type ParsedCreateDecreasePositionRequestInstruction, type ParsedCreateIncreasePositionRequestInstruction, type ParsedDecreasePositionInstruction, type ParsedDecreasePositionPostSwapInstruction, type ParsedGetAddLiquidityAmountAndFeeInstruction, type ParsedGetDecreasePositionInstruction, type ParsedGetExactOutSwapAmountAndFeesInstruction, type ParsedGetIncreasePositionInstruction, type ParsedGetLiquidationStateInstruction, type ParsedGetOraclePriceInstruction, type ParsedGetPnlInstruction, type ParsedGetRemoveLiquidityAmountAndFeeInstruction, type ParsedGetSwapAmountAndFeesInstruction, type ParsedIncreasePositionInstruction, type ParsedIncreasePositionPreSwapInstruction, type ParsedInitInstruction, type ParsedLiquidatePositionInstruction, type ParsedRemoveLiquidityInstruction, type ParsedSetCustodyConfigInstruction, type ParsedSetCustodyGlobalLimitInstruction, type ParsedSetPerpetualsConfigInstruction, type ParsedSetPoolConfigInstruction, type ParsedSetTestOraclePriceInstruction, type ParsedSetTestTimeInstruction, type ParsedSwapExactOutInstruction, type ParsedSwapInstruction, type ParsedTestInitInstruction, type ParsedTransferAdminInstruction, type ParsedUpdateDecreasePositionRequestInstruction, type ParsedUpdateIncreasePositionRequestInstruction, type ParsedWithdrawFeesInstruction } from "../instructions"; export declare const PERPETUALS_PROGRAM_ADDRESS: Address<"PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu">; export declare enum PerpetualsAccount { Custody = 0, TestOracle = 1, Perpetuals = 2, Pool = 3, PositionRequest = 4, Position = 5 } export declare function identifyPerpetualsAccount(account: { data: ReadonlyUint8Array; } | ReadonlyUint8Array): PerpetualsAccount; export declare enum PerpetualsInstruction { Init = 0, AddPool = 1, AddCustody = 2, SetCustodyConfig = 3, SetCustodyGlobalLimit = 4, SetPoolConfig = 5, SetPerpetualsConfig = 6, TransferAdmin = 7, WithdrawFees = 8, TestInit = 9, SetTestOraclePrice = 10, SetTestTime = 11, Swap = 12, SwapExactOut = 13, AddLiquidity = 14, RemoveLiquidity = 15, CreateIncreasePositionRequest = 16, UpdateIncreasePositionRequest = 17, CreateDecreasePositionRequest = 18, UpdateDecreasePositionRequest = 19, ClosePositionRequest = 20, IncreasePosition = 21, IncreasePositionPreSwap = 22, DecreasePosition = 23, DecreasePositionPostSwap = 24, LiquidatePosition = 25, GetAddLiquidityAmountAndFee = 26, GetRemoveLiquidityAmountAndFee = 27, GetIncreasePosition = 28, GetDecreasePosition = 29, GetPnl = 30, GetLiquidationState = 31, GetOraclePrice = 32, GetSwapAmountAndFees = 33, GetExactOutSwapAmountAndFees = 34 } export declare function identifyPerpetualsInstruction(instruction: { data: ReadonlyUint8Array; } | ReadonlyUint8Array): PerpetualsInstruction; export type ParsedPerpetualsInstruction = ({ instructionType: PerpetualsInstruction.Init; } & ParsedInitInstruction) | ({ instructionType: PerpetualsInstruction.AddPool; } & ParsedAddPoolInstruction) | ({ instructionType: PerpetualsInstruction.AddCustody; } & ParsedAddCustodyInstruction) | ({ instructionType: PerpetualsInstruction.SetCustodyConfig; } & ParsedSetCustodyConfigInstruction) | ({ instructionType: PerpetualsInstruction.SetCustodyGlobalLimit; } & ParsedSetCustodyGlobalLimitInstruction) | ({ instructionType: PerpetualsInstruction.SetPoolConfig; } & ParsedSetPoolConfigInstruction) | ({ instructionType: PerpetualsInstruction.SetPerpetualsConfig; } & ParsedSetPerpetualsConfigInstruction) | ({ instructionType: PerpetualsInstruction.TransferAdmin; } & ParsedTransferAdminInstruction) | ({ instructionType: PerpetualsInstruction.WithdrawFees; } & ParsedWithdrawFeesInstruction) | ({ instructionType: PerpetualsInstruction.TestInit; } & ParsedTestInitInstruction) | ({ instructionType: PerpetualsInstruction.SetTestOraclePrice; } & ParsedSetTestOraclePriceInstruction) | ({ instructionType: PerpetualsInstruction.SetTestTime; } & ParsedSetTestTimeInstruction) | ({ instructionType: PerpetualsInstruction.Swap; } & ParsedSwapInstruction) | ({ instructionType: PerpetualsInstruction.SwapExactOut; } & ParsedSwapExactOutInstruction) | ({ instructionType: PerpetualsInstruction.AddLiquidity; } & ParsedAddLiquidityInstruction) | ({ instructionType: PerpetualsInstruction.RemoveLiquidity; } & ParsedRemoveLiquidityInstruction) | ({ instructionType: PerpetualsInstruction.CreateIncreasePositionRequest; } & ParsedCreateIncreasePositionRequestInstruction) | ({ instructionType: PerpetualsInstruction.UpdateIncreasePositionRequest; } & ParsedUpdateIncreasePositionRequestInstruction) | ({ instructionType: PerpetualsInstruction.CreateDecreasePositionRequest; } & ParsedCreateDecreasePositionRequestInstruction) | ({ instructionType: PerpetualsInstruction.UpdateDecreasePositionRequest; } & ParsedUpdateDecreasePositionRequestInstruction) | ({ instructionType: PerpetualsInstruction.ClosePositionRequest; } & ParsedClosePositionRequestInstruction) | ({ instructionType: PerpetualsInstruction.IncreasePosition; } & ParsedIncreasePositionInstruction) | ({ instructionType: PerpetualsInstruction.IncreasePositionPreSwap; } & ParsedIncreasePositionPreSwapInstruction) | ({ instructionType: PerpetualsInstruction.DecreasePosition; } & ParsedDecreasePositionInstruction) | ({ instructionType: PerpetualsInstruction.DecreasePositionPostSwap; } & ParsedDecreasePositionPostSwapInstruction) | ({ instructionType: PerpetualsInstruction.LiquidatePosition; } & ParsedLiquidatePositionInstruction) | ({ instructionType: PerpetualsInstruction.GetAddLiquidityAmountAndFee; } & ParsedGetAddLiquidityAmountAndFeeInstruction) | ({ instructionType: PerpetualsInstruction.GetRemoveLiquidityAmountAndFee; } & ParsedGetRemoveLiquidityAmountAndFeeInstruction) | ({ instructionType: PerpetualsInstruction.GetIncreasePosition; } & ParsedGetIncreasePositionInstruction) | ({ instructionType: PerpetualsInstruction.GetDecreasePosition; } & ParsedGetDecreasePositionInstruction) | ({ instructionType: PerpetualsInstruction.GetPnl; } & ParsedGetPnlInstruction) | ({ instructionType: PerpetualsInstruction.GetLiquidationState; } & ParsedGetLiquidationStateInstruction) | ({ instructionType: PerpetualsInstruction.GetOraclePrice; } & ParsedGetOraclePriceInstruction) | ({ instructionType: PerpetualsInstruction.GetSwapAmountAndFees; } & ParsedGetSwapAmountAndFeesInstruction) | ({ instructionType: PerpetualsInstruction.GetExactOutSwapAmountAndFees; } & ParsedGetExactOutSwapAmountAndFeesInstruction); export declare function parsePerpetualsInstruction(instruction: Instruction & InstructionWithData): ParsedPerpetualsInstruction; //# sourceMappingURL=perpetuals.d.ts.map