/** * 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 AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit"; import { PERPETUALS_PROGRAM_ADDRESS } from "../programs"; export declare const SWAP_EXACT_OUT_DISCRIMINATOR: Uint8Array; export declare function getSwapExactOutDiscriminatorBytes(): ReadonlyUint8Array; export type SwapExactOutInstruction = string, TAccountFundingAccount extends string | AccountMeta = string, TAccountReceivingAccount extends string | AccountMeta = string, TAccountTransferAuthority extends string | AccountMeta = string, TAccountPerpetuals extends string | AccountMeta = string, TAccountPool extends string | AccountMeta = string, TAccountReceivingCustody extends string | AccountMeta = string, TAccountReceivingCustodyOracleAccount extends string | AccountMeta = string, TAccountReceivingCustodyTokenAccount extends string | AccountMeta = string, TAccountDispensingCustody extends string | AccountMeta = string, TAccountDispensingCustodyOracleAccount extends string | AccountMeta = string, TAccountDispensingCustodyTokenAccount extends string | AccountMeta = string, TAccountTokenProgram extends string | AccountMeta = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountEventAuthority extends string | AccountMeta = string, TAccountProgram extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountOwner extends string ? WritableSignerAccount & AccountSignerMeta : TAccountOwner, TAccountFundingAccount extends string ? WritableAccount : TAccountFundingAccount, TAccountReceivingAccount extends string ? WritableAccount : TAccountReceivingAccount, TAccountTransferAuthority extends string ? ReadonlyAccount : TAccountTransferAuthority, TAccountPerpetuals extends string ? ReadonlyAccount : TAccountPerpetuals, TAccountPool extends string ? WritableAccount : TAccountPool, TAccountReceivingCustody extends string ? WritableAccount : TAccountReceivingCustody, TAccountReceivingCustodyOracleAccount extends string ? ReadonlyAccount : TAccountReceivingCustodyOracleAccount, TAccountReceivingCustodyTokenAccount extends string ? WritableAccount : TAccountReceivingCustodyTokenAccount, TAccountDispensingCustody extends string ? WritableAccount : TAccountDispensingCustody, TAccountDispensingCustodyOracleAccount extends string ? ReadonlyAccount : TAccountDispensingCustodyOracleAccount, TAccountDispensingCustodyTokenAccount extends string ? WritableAccount : TAccountDispensingCustodyTokenAccount, TAccountTokenProgram extends string ? ReadonlyAccount : TAccountTokenProgram, TAccountEventAuthority extends string ? ReadonlyAccount : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount : TAccountProgram, ...TRemainingAccounts ]>; export type SwapExactOutInstructionData = { discriminator: ReadonlyUint8Array; amountOut: bigint; maxAmountIn: bigint; }; export type SwapExactOutInstructionDataArgs = { amountOut: number | bigint; maxAmountIn: number | bigint; }; export declare function getSwapExactOutInstructionDataEncoder(): FixedSizeEncoder; export declare function getSwapExactOutInstructionDataDecoder(): FixedSizeDecoder; export declare function getSwapExactOutInstructionDataCodec(): FixedSizeCodec; export type SwapExactOutInput = { owner: TransactionSigner; fundingAccount: Address; receivingAccount: Address; transferAuthority: Address; perpetuals: Address; pool: Address; receivingCustody: Address; receivingCustodyOracleAccount: Address; receivingCustodyTokenAccount: Address; dispensingCustody: Address; dispensingCustodyOracleAccount: Address; dispensingCustodyTokenAccount: Address; tokenProgram?: Address; eventAuthority: Address; program: Address; amountOut: SwapExactOutInstructionDataArgs["amountOut"]; maxAmountIn: SwapExactOutInstructionDataArgs["maxAmountIn"]; }; export declare function getSwapExactOutInstruction(input: SwapExactOutInput, config?: { programAddress?: TProgramAddress; }): SwapExactOutInstruction; export type ParsedSwapExactOutInstruction = { programAddress: Address; accounts: { owner: TAccountMetas[0]; fundingAccount: TAccountMetas[1]; receivingAccount: TAccountMetas[2]; transferAuthority: TAccountMetas[3]; perpetuals: TAccountMetas[4]; pool: TAccountMetas[5]; receivingCustody: TAccountMetas[6]; receivingCustodyOracleAccount: TAccountMetas[7]; receivingCustodyTokenAccount: TAccountMetas[8]; dispensingCustody: TAccountMetas[9]; dispensingCustodyOracleAccount: TAccountMetas[10]; dispensingCustodyTokenAccount: TAccountMetas[11]; tokenProgram: TAccountMetas[12]; eventAuthority: TAccountMetas[13]; program: TAccountMetas[14]; }; data: SwapExactOutInstructionData; }; export declare function parseSwapExactOutInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedSwapExactOutInstruction; //# sourceMappingURL=swapExactOut.d.ts.map