import type { GasWithToken, NetworkRoute, Token, TokenBalance } from '@layerswap/widget-types'; export type AmountPreset = 'min' | 'half' | 'max'; export type AmountMode = 'manual' | 'fixed' | AmountPreset; export declare function isWalletAmountFlow(values: { depositMethod?: string; fromExchange?: unknown; }): boolean; export declare function isAmountPreset(mode: string | undefined): mode is AmountPreset; /** Bundled adapter capability gaps, not a fallback for transient RPC failures. * These routes retain quick fills until balance/fee estimation is supported. */ export declare function supportsLiveAmountPreset(network: NetworkRoute, token: Token): boolean; export declare function amountPresetSource(network?: string, token?: string, accountId?: string, address?: string): string; export declare class AmountPresetChangedError extends Error { constructor(); } export declare class AmountPresetUnavailableError extends Error { amount?: string | undefined; constructor(message: string, amount?: string | undefined); } export declare function resolvePresetAmount(mode: AmountPreset, spendable: number, minimum: number, decimals: number): string; /** Estimate the preset at its actual transfer amount, then verify affordability. * The gas buffer absorbs small RPC movements; large changes have bounded retries. */ export declare function calculatePresetAmount({ network, token, balance, limit, minimum, mode, probeAmount, preserveAmount, estimateGas }: { network: NetworkRoute; token: Token; balance: TokenBalance | undefined; limit: number | undefined; minimum?: number; mode?: AmountPreset; probeAmount?: string; /** At confirmation, keep the reviewed amount if it still fits this preset's bounds. */ preserveAmount?: boolean; estimateGas: (amount: number) => Promise; }): Promise; //# sourceMappingURL=amountPresets.d.ts.map