import { SuiClient } from '@mysten/sui/client'; import { Transaction } from '@mysten/sui/transactions'; import { ChainConfig, EstimateAmountOutParams, TokenAccount, TokenMetadata, TokenWithBalance } from '../types'; import { AbstractChain } from './abstract'; export declare class Sui extends AbstractChain { private readonly suiRpc; private readonly suiClient; private readonly suiProgramConfig; static COIN_X_TYPE: string; constructor({ gasFeeConfig, rpcConfig, programConfig }: ChainConfig); getBalances(addresses: string[]): Promise; getAccountsOwnedToken(addresses: string[], tokenAddress: string): Promise<(TokenWithBalance | undefined)[]>; getAccountOwnedTokens(addresses: string[]): Promise; estimateAmountOut({ amountInRaw, routes }: EstimateAmountOutParams): Promise; getTokenMetadata(address: string): Promise; private buildTxCoin; deposit(receiver: string, amount: string, senderAddress: string): Promise; } export declare function estimateSwapOutput(amountIn: string, slippage: number, poolAddress: string, coinA: string, coinB: string, coinADecimals: number, coinBDecimals: number, a2b: boolean): Promise<{ amountOut: string; amountLimit: string; } | undefined>; export interface PoolReserves { virtualSui: bigint; virtualToken: bigint; } export declare function getPoolReserves(client: SuiClient, poolId: string): Promise; export declare function calculateTokenAmountBuy(virtualSuiReserves: bigint, virtualTokenReserves: bigint, amountIn: bigint, slippage: string): { amountOut: bigint; minAmountOut: bigint; }; /** * Calculates the required input amount (amountIn) needed to receive a specific output amount (amountOut) * This is the inverse of calculateTokenAmountBuy * * @param virtualSuiReserves - Current virtual SUI reserves in the pool * @param virtualTokenReserves - Current virtual token reserves in the pool * @param amountOut - Desired amount of tokens to receive * @param slippage - Maximum acceptable slippage (e.g., 0.01 for 1%) * @returns Object containing the required input amount and maximum input amount considering slippage */ export declare function calculateTokenAmountSell(virtualSuiReserves: bigint, virtualTokenReserves: bigint, sellAmount: bigint, slippage: string): { amountOut: bigint; minAmountOut: bigint; };