/** * 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, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, Option, OptionOrNullable, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit"; import type { RemainingAccountsInfo, RemainingAccountsInfoArgs } from "../types/index.js"; import { WHIRLPOOL_PROGRAM_ADDRESS } from "../programs/index.js"; export declare const SWAP_V2_DISCRIMINATOR: ReadonlyUint8Array; export declare function getSwapV2DiscriminatorBytes(): ReadonlyUint8Array; export type SwapV2Instruction = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountTokenProgramA extends string ? ReadonlyAccount : TAccountTokenProgramA, TAccountTokenProgramB extends string ? ReadonlyAccount : TAccountTokenProgramB, TAccountMemoProgram extends string ? ReadonlyAccount : TAccountMemoProgram, TAccountTokenAuthority extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountTokenAuthority, TAccountWhirlpool extends string ? WritableAccount : TAccountWhirlpool, TAccountTokenMintA extends string ? ReadonlyAccount : TAccountTokenMintA, TAccountTokenMintB extends string ? ReadonlyAccount : TAccountTokenMintB, TAccountTokenOwnerAccountA extends string ? WritableAccount : TAccountTokenOwnerAccountA, TAccountTokenVaultA extends string ? WritableAccount : TAccountTokenVaultA, TAccountTokenOwnerAccountB extends string ? WritableAccount : TAccountTokenOwnerAccountB, TAccountTokenVaultB extends string ? WritableAccount : TAccountTokenVaultB, TAccountTickArray0 extends string ? WritableAccount : TAccountTickArray0, TAccountTickArray1 extends string ? WritableAccount : TAccountTickArray1, TAccountTickArray2 extends string ? WritableAccount : TAccountTickArray2, TAccountOracle extends string ? WritableAccount : TAccountOracle, ...TRemainingAccounts ]>; export interface SwapV2InstructionData { discriminator: ReadonlyUint8Array; amount: bigint; otherAmountThreshold: bigint; sqrtPriceLimit: bigint; amountSpecifiedIsInput: boolean; aToB: boolean; remainingAccountsInfo: Option; } export interface SwapV2InstructionDataArgs { amount: number | bigint; otherAmountThreshold: number | bigint; sqrtPriceLimit: number | bigint; amountSpecifiedIsInput: boolean; aToB: boolean; remainingAccountsInfo: OptionOrNullable; } export declare function getSwapV2InstructionDataEncoder(): Encoder; export declare function getSwapV2InstructionDataDecoder(): Decoder; export declare function getSwapV2InstructionDataCodec(): Codec; export interface SwapV2Input { tokenProgramA: Address; tokenProgramB: Address; memoProgram?: Address; tokenAuthority: TransactionSigner; whirlpool: Address; tokenMintA: Address; tokenMintB: Address; tokenOwnerAccountA: Address; tokenVaultA: Address; tokenOwnerAccountB: Address; tokenVaultB: Address; tickArray0: Address; tickArray1: Address; tickArray2: Address; oracle: Address; amount: SwapV2InstructionDataArgs["amount"]; otherAmountThreshold: SwapV2InstructionDataArgs["otherAmountThreshold"]; sqrtPriceLimit: SwapV2InstructionDataArgs["sqrtPriceLimit"]; amountSpecifiedIsInput: SwapV2InstructionDataArgs["amountSpecifiedIsInput"]; aToB: SwapV2InstructionDataArgs["aToB"]; remainingAccountsInfo: SwapV2InstructionDataArgs["remainingAccountsInfo"]; } export declare function getSwapV2Instruction(input: SwapV2Input, config?: { programAddress?: TProgramAddress; }): SwapV2Instruction; export interface ParsedSwapV2Instruction { programAddress: Address; accounts: { tokenProgramA: TAccountMetas[0]; tokenProgramB: TAccountMetas[1]; memoProgram: TAccountMetas[2]; tokenAuthority: TAccountMetas[3]; whirlpool: TAccountMetas[4]; tokenMintA: TAccountMetas[5]; tokenMintB: TAccountMetas[6]; tokenOwnerAccountA: TAccountMetas[7]; tokenVaultA: TAccountMetas[8]; tokenOwnerAccountB: TAccountMetas[9]; tokenVaultB: TAccountMetas[10]; tickArray0: TAccountMetas[11]; tickArray1: TAccountMetas[12]; tickArray2: TAccountMetas[13]; oracle: TAccountMetas[14]; }; data: SwapV2InstructionData; } export declare function parseSwapV2Instruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedSwapV2Instruction; //# sourceMappingURL=swapV2.d.ts.map