/** * 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, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from "@solana/kit"; import { WHIRLPOOL_PROGRAM_ADDRESS } from "../programs/index.js"; export declare const TWO_HOP_SWAP_DISCRIMINATOR: ReadonlyUint8Array; export declare function getTwoHopSwapDiscriminatorBytes(): ReadonlyUint8Array; export type TwoHopSwapInstruction = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountTokenProgram extends string ? ReadonlyAccount : TAccountTokenProgram, TAccountTokenAuthority extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountTokenAuthority, TAccountWhirlpoolOne extends string ? WritableAccount : TAccountWhirlpoolOne, TAccountWhirlpoolTwo extends string ? WritableAccount : TAccountWhirlpoolTwo, TAccountTokenOwnerAccountOneA extends string ? WritableAccount : TAccountTokenOwnerAccountOneA, TAccountTokenVaultOneA extends string ? WritableAccount : TAccountTokenVaultOneA, TAccountTokenOwnerAccountOneB extends string ? WritableAccount : TAccountTokenOwnerAccountOneB, TAccountTokenVaultOneB extends string ? WritableAccount : TAccountTokenVaultOneB, TAccountTokenOwnerAccountTwoA extends string ? WritableAccount : TAccountTokenOwnerAccountTwoA, TAccountTokenVaultTwoA extends string ? WritableAccount : TAccountTokenVaultTwoA, TAccountTokenOwnerAccountTwoB extends string ? WritableAccount : TAccountTokenOwnerAccountTwoB, TAccountTokenVaultTwoB extends string ? WritableAccount : TAccountTokenVaultTwoB, 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 ? ReadonlyAccount : TAccountOracleOne, TAccountOracleTwo extends string ? ReadonlyAccount : TAccountOracleTwo, ...TRemainingAccounts ]>; export interface TwoHopSwapInstructionData { discriminator: ReadonlyUint8Array; amount: bigint; otherAmountThreshold: bigint; amountSpecifiedIsInput: boolean; aToBOne: boolean; aToBTwo: boolean; sqrtPriceLimitOne: bigint; sqrtPriceLimitTwo: bigint; } export interface TwoHopSwapInstructionDataArgs { amount: number | bigint; otherAmountThreshold: number | bigint; amountSpecifiedIsInput: boolean; aToBOne: boolean; aToBTwo: boolean; sqrtPriceLimitOne: number | bigint; sqrtPriceLimitTwo: number | bigint; } export declare function getTwoHopSwapInstructionDataEncoder(): FixedSizeEncoder; export declare function getTwoHopSwapInstructionDataDecoder(): FixedSizeDecoder; export declare function getTwoHopSwapInstructionDataCodec(): FixedSizeCodec; export interface TwoHopSwapInput { tokenProgram?: Address; tokenAuthority: TransactionSigner; whirlpoolOne: Address; whirlpoolTwo: Address; tokenOwnerAccountOneA: Address; tokenVaultOneA: Address; tokenOwnerAccountOneB: Address; tokenVaultOneB: Address; tokenOwnerAccountTwoA: Address; tokenVaultTwoA: Address; tokenOwnerAccountTwoB: Address; tokenVaultTwoB: Address; tickArrayOne0: Address; tickArrayOne1: Address; tickArrayOne2: Address; tickArrayTwo0: Address; tickArrayTwo1: Address; tickArrayTwo2: Address; oracleOne: Address; oracleTwo: Address; amount: TwoHopSwapInstructionDataArgs["amount"]; otherAmountThreshold: TwoHopSwapInstructionDataArgs["otherAmountThreshold"]; amountSpecifiedIsInput: TwoHopSwapInstructionDataArgs["amountSpecifiedIsInput"]; aToBOne: TwoHopSwapInstructionDataArgs["aToBOne"]; aToBTwo: TwoHopSwapInstructionDataArgs["aToBTwo"]; sqrtPriceLimitOne: TwoHopSwapInstructionDataArgs["sqrtPriceLimitOne"]; sqrtPriceLimitTwo: TwoHopSwapInstructionDataArgs["sqrtPriceLimitTwo"]; } export declare function getTwoHopSwapInstruction(input: TwoHopSwapInput, config?: { programAddress?: TProgramAddress; }): TwoHopSwapInstruction; export interface ParsedTwoHopSwapInstruction { programAddress: Address; accounts: { tokenProgram: TAccountMetas[0]; tokenAuthority: TAccountMetas[1]; whirlpoolOne: TAccountMetas[2]; whirlpoolTwo: TAccountMetas[3]; tokenOwnerAccountOneA: TAccountMetas[4]; tokenVaultOneA: TAccountMetas[5]; tokenOwnerAccountOneB: TAccountMetas[6]; tokenVaultOneB: TAccountMetas[7]; tokenOwnerAccountTwoA: TAccountMetas[8]; tokenVaultTwoA: TAccountMetas[9]; tokenOwnerAccountTwoB: TAccountMetas[10]; tokenVaultTwoB: TAccountMetas[11]; tickArrayOne0: TAccountMetas[12]; tickArrayOne1: TAccountMetas[13]; tickArrayOne2: TAccountMetas[14]; tickArrayTwo0: TAccountMetas[15]; tickArrayTwo1: TAccountMetas[16]; tickArrayTwo2: TAccountMetas[17]; oracleOne: TAccountMetas[18]; oracleTwo: TAccountMetas[19]; }; data: TwoHopSwapInstructionData; } export declare function parseTwoHopSwapInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedTwoHopSwapInstruction; //# sourceMappingURL=twoHopSwap.d.ts.map