import type { Address } from "@coral-xyz/anchor"; import type { Percentage, TransactionBuilder } from "@orca-so/common-sdk"; import type { PublicKey } from "@solana/web3.js"; import type { WhirlpoolContext } from "./context"; import type { ByTokenAmountsParams, DevFeeSwapInput, SwapInput } from "./instructions"; import type { WhirlpoolAccountFetchOptions, WhirlpoolAccountFetcherInterface } from "./network/public/fetcher"; import type { DecreaseLiquidityInput, LockConfigData, LockTypeData, PositionData, TickData, WhirlpoolData } from "./types/public"; import type { TokenAccountInfo, TokenInfo, WhirlpoolRewardInfo } from "./types/public/client-types"; import type Decimal from "decimal.js"; export interface WhirlpoolClient { getContext: () => WhirlpoolContext; getFetcher: () => WhirlpoolAccountFetcherInterface; getPool: (poolAddress: Address, opts?: WhirlpoolAccountFetchOptions) => Promise; getPools: (poolAddresses: Address[], opts?: WhirlpoolAccountFetchOptions) => Promise; getPosition: (positionAddress: Address, opts?: WhirlpoolAccountFetchOptions) => Promise; getPositions: (positionAddresses: Address[], opts?: WhirlpoolAccountFetchOptions) => Promise>; collectFeesAndRewardsForPositions: (positionAddresses: Address[], opts?: WhirlpoolAccountFetchOptions) => Promise; createSplashPool: (whirlpoolsConfig: Address, tokenMintA: Address, tokenMintB: Address, initialPrice: Decimal, funder: Address) => Promise<{ poolKey: PublicKey; tx: TransactionBuilder; }>; createPool: (whirlpoolsConfig: Address, tokenMintA: Address, tokenMintB: Address, tickSpacing: number, initialTick: number, funder: Address) => Promise<{ poolKey: PublicKey; tx: TransactionBuilder; }>; collectProtocolFeesForPools: (poolAddresses: Address[]) => Promise; } export declare function buildWhirlpoolClient(ctx: WhirlpoolContext): WhirlpoolClient; export interface Whirlpool { getAddress: () => PublicKey; getData: () => WhirlpoolData; refreshData: () => Promise; getTokenAInfo: () => TokenInfo; getTokenBInfo: () => TokenInfo; getTokenVaultAInfo: () => TokenAccountInfo; getTokenVaultBInfo: () => TokenAccountInfo; getRewardInfos: () => WhirlpoolRewardInfo[]; initTickArrayForTicks: (ticks: number[], funder?: Address, opts?: WhirlpoolAccountFetchOptions, tickArrayType?: "dynamic" | "fixed") => Promise; openPosition: (tickLower: number, tickUpper: number, liquidityInput: ByTokenAmountsParams, wallet?: Address, funder?: Address, positionMint?: PublicKey, tokenProgramId?: PublicKey) => Promise<{ positionMint: PublicKey; tx: TransactionBuilder; }>; openPositionWithMetadata: (tickLower: number, tickUpper: number, liquidityInput: ByTokenAmountsParams, wallet?: Address, funder?: Address, positionMint?: PublicKey, tokenProgramId?: PublicKey, resolveATA?: boolean) => Promise<{ positionMint: PublicKey; tx: TransactionBuilder; }>; closePosition: (positionAddress: Address, slippageTolerance: Percentage, destinationWallet?: Address, positionWallet?: Address, payer?: Address, usePriceSlippage?: boolean) => Promise; swap: (input: SwapInput, wallet?: PublicKey) => Promise; swapWithDevFees: (input: DevFeeSwapInput, devFeeWallet: PublicKey, wallet?: PublicKey, payer?: PublicKey) => Promise; } export interface Position { getAddress: () => PublicKey; getPositionMintTokenProgramId: () => PublicKey; getData: () => PositionData; getWhirlpoolData: () => WhirlpoolData; getLowerTickData: () => TickData; getUpperTickData: () => TickData; refreshData: () => Promise; increaseLiquidity: (liquidityInput: ByTokenAmountsParams, resolveATA?: boolean, wallet?: Address, positionWallet?: Address, ataPayer?: Address) => Promise; decreaseLiquidity: (liquidityInput: DecreaseLiquidityInput, resolveATA?: boolean, destinationWallet?: Address, positionWallet?: Address, ataPayer?: Address) => Promise; collectFees: (updateFeesAndRewards?: boolean, ownerTokenAccountMap?: Partial>, destinationWallet?: Address, positionWallet?: Address, ataPayer?: Address, opts?: WhirlpoolAccountFetchOptions) => Promise; collectRewards: (rewardsToCollect?: Address[], updateFeesAndRewards?: boolean, ownerTokenAccountMap?: Partial>, destinationWallet?: Address, positionWallet?: Address, ataPayer?: Address, opts?: WhirlpoolAccountFetchOptions) => Promise; resetPositionRange: (tickLowerIndex: number, tickUpperIndex: number, positionWallet?: Address) => Promise; lock: (lockType: LockTypeData, positionWallet?: Address, funder?: Address) => Promise; getLockConfigData: () => Promise; }