/** * 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 TWO_HOP_SWAP_V2_DISCRIMINATOR: ReadonlyUint8Array; export declare function getTwoHopSwapV2DiscriminatorBytes(): ReadonlyUint8Array; export type TwoHopSwapV2Instruction = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountWhirlpoolOne extends string ? WritableAccount : TAccountWhirlpoolOne, TAccountWhirlpoolTwo extends string ? WritableAccount : TAccountWhirlpoolTwo, TAccountTokenMintInput extends string ? ReadonlyAccount : TAccountTokenMintInput, TAccountTokenMintIntermediate extends string ? ReadonlyAccount : TAccountTokenMintIntermediate, TAccountTokenMintOutput extends string ? ReadonlyAccount : TAccountTokenMintOutput, TAccountTokenProgramInput extends string ? ReadonlyAccount : TAccountTokenProgramInput, TAccountTokenProgramIntermediate extends string ? ReadonlyAccount : TAccountTokenProgramIntermediate, TAccountTokenProgramOutput extends string ? ReadonlyAccount : TAccountTokenProgramOutput, TAccountTokenOwnerAccountInput extends string ? WritableAccount : TAccountTokenOwnerAccountInput, TAccountTokenVaultOneInput extends string ? WritableAccount : TAccountTokenVaultOneInput, TAccountTokenVaultOneIntermediate extends string ? WritableAccount : TAccountTokenVaultOneIntermediate, TAccountTokenVaultTwoIntermediate extends string ? WritableAccount : TAccountTokenVaultTwoIntermediate, TAccountTokenVaultTwoOutput extends string ? WritableAccount : TAccountTokenVaultTwoOutput, TAccountTokenOwnerAccountOutput extends string ? WritableAccount : TAccountTokenOwnerAccountOutput, TAccountTokenAuthority extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountTokenAuthority, TAccountTickArrayOne0 extends string ? WritableAccount : TAccountTickArrayOne0, TAccountTickArrayOne1 extends string ? WritableAccount : TAccountTickArrayOne1, TAccountTickArrayOne2 extends string ? WritableAccount : TAccountTickArrayOne2, TAccountTickArrayTwo0 extends string ? WritableAccount : TAccountTickArrayTwo0, TAccountTickArrayTwo1 extends string ? WritableAccount : TAccountTickArrayTwo1, TAccountTickArrayTwo2 extends string ? WritableAccount : TAccountTickArrayTwo2, TAccountOracleOne extends string ? WritableAccount : TAccountOracleOne, TAccountOracleTwo extends string ? WritableAccount : TAccountOracleTwo, TAccountMemoProgram extends string ? ReadonlyAccount : TAccountMemoProgram, ...TRemainingAccounts ]>; export interface TwoHopSwapV2InstructionData { discriminator: ReadonlyUint8Array; amount: bigint; otherAmountThreshold: bigint; amountSpecifiedIsInput: boolean; aToBOne: boolean; aToBTwo: boolean; sqrtPriceLimitOne: bigint; sqrtPriceLimitTwo: bigint; remainingAccountsInfo: Option; } export interface TwoHopSwapV2InstructionDataArgs { amount: number | bigint; otherAmountThreshold: number | bigint; amountSpecifiedIsInput: boolean; aToBOne: boolean; aToBTwo: boolean; sqrtPriceLimitOne: number | bigint; sqrtPriceLimitTwo: number | bigint; remainingAccountsInfo: OptionOrNullable; } export declare function getTwoHopSwapV2InstructionDataEncoder(): Encoder; export declare function getTwoHopSwapV2InstructionDataDecoder(): Decoder; export declare function getTwoHopSwapV2InstructionDataCodec(): Codec; export interface TwoHopSwapV2Input { whirlpoolOne: Address; whirlpoolTwo: Address; tokenMintInput: Address; tokenMintIntermediate: Address; tokenMintOutput: Address; tokenProgramInput: Address; tokenProgramIntermediate: Address; tokenProgramOutput: Address; tokenOwnerAccountInput: Address; tokenVaultOneInput: Address; tokenVaultOneIntermediate: Address; tokenVaultTwoIntermediate: Address; tokenVaultTwoOutput: Address; tokenOwnerAccountOutput: Address; tokenAuthority: TransactionSigner; tickArrayOne0: Address; tickArrayOne1: Address; tickArrayOne2: Address; tickArrayTwo0: Address; tickArrayTwo1: Address; tickArrayTwo2: Address; oracleOne: Address; oracleTwo: Address; memoProgram?: Address; amount: TwoHopSwapV2InstructionDataArgs["amount"]; otherAmountThreshold: TwoHopSwapV2InstructionDataArgs["otherAmountThreshold"]; amountSpecifiedIsInput: TwoHopSwapV2InstructionDataArgs["amountSpecifiedIsInput"]; aToBOne: TwoHopSwapV2InstructionDataArgs["aToBOne"]; aToBTwo: TwoHopSwapV2InstructionDataArgs["aToBTwo"]; sqrtPriceLimitOne: TwoHopSwapV2InstructionDataArgs["sqrtPriceLimitOne"]; sqrtPriceLimitTwo: TwoHopSwapV2InstructionDataArgs["sqrtPriceLimitTwo"]; remainingAccountsInfo: TwoHopSwapV2InstructionDataArgs["remainingAccountsInfo"]; } export declare function getTwoHopSwapV2Instruction(input: TwoHopSwapV2Input, config?: { programAddress?: TProgramAddress; }): TwoHopSwapV2Instruction; export interface ParsedTwoHopSwapV2Instruction { programAddress: Address; accounts: { whirlpoolOne: TAccountMetas[0]; whirlpoolTwo: TAccountMetas[1]; tokenMintInput: TAccountMetas[2]; tokenMintIntermediate: TAccountMetas[3]; tokenMintOutput: TAccountMetas[4]; tokenProgramInput: TAccountMetas[5]; tokenProgramIntermediate: TAccountMetas[6]; tokenProgramOutput: TAccountMetas[7]; tokenOwnerAccountInput: TAccountMetas[8]; tokenVaultOneInput: TAccountMetas[9]; tokenVaultOneIntermediate: TAccountMetas[10]; tokenVaultTwoIntermediate: TAccountMetas[11]; tokenVaultTwoOutput: TAccountMetas[12]; tokenOwnerAccountOutput: TAccountMetas[13]; tokenAuthority: TAccountMetas[14]; tickArrayOne0: TAccountMetas[15]; tickArrayOne1: TAccountMetas[16]; tickArrayOne2: TAccountMetas[17]; tickArrayTwo0: TAccountMetas[18]; tickArrayTwo1: TAccountMetas[19]; tickArrayTwo2: TAccountMetas[20]; oracleOne: TAccountMetas[21]; oracleTwo: TAccountMetas[22]; memoProgram: TAccountMetas[23]; }; data: TwoHopSwapV2InstructionData; } export declare function parseTwoHopSwapV2Instruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedTwoHopSwapV2Instruction; //# sourceMappingURL=twoHopSwapV2.d.ts.map