import type { EstimateFeesPerGasParams } from '../../../actions/transfer.js'; import type { ExtendedViemClient } from '../../../client.js'; import type { Account, BaseUnits, ControlFlowOptions, FeeValuesEIP1559, Merge } from '../../../types.js'; import type { EstimateTransferFeeInput } from '../transports/index.js'; /** * Estimates the transfer fee for a given transaction. * * @param client - An instance of `ExtendedViemClient` used to make the request. * @param params - The input parameters required to estimate the transfer fee. * @returns A promise that resolves to an `EstimateTransactionFee` object containing the estimated fee details. * * @example * ```typescript * const fee = await estimateTransferFee(client, { * destinationAddress: '0x123...', * sourceAddress: '0x456...', * amount: ['1000'], * blockchain: 'ETH-SEPOLIA', * }); * // => { * // high: { gasLimit: '3', maxFee: '6', priorityFee: '9', baseFee: '12', networkFee: '15' }, * // medium: { gasLimit: '2', maxFee: '4', priorityFee: '6', baseFee: '8', networkFee: '10' }, * // low: { gasLimit: '1', maxFee: '2', priorityFee: '3', baseFee: '4', networkFee: '5' }, * // } * ``` */ export declare function estimateTransferFee(client: ExtendedViemClient, params: EstimateTransferFeeInput): Promise<{ high: { gasLimit: `${number}` | "" | undefined; maxFee: `${number}` | "" | undefined; priorityFee: `${number}` | "" | undefined; gasPrice?: string; baseFee?: string; networkFee?: string; networkFeeRaw?: string; l1Fee?: string; } | undefined; medium: { gasLimit: `${number}` | "" | undefined; maxFee: `${number}` | "" | undefined; priorityFee: `${number}` | "" | undefined; gasPrice?: string; baseFee?: string; networkFee?: string; networkFeeRaw?: string; l1Fee?: string; } | undefined; low: { gasLimit: `${number}` | "" | undefined; maxFee: `${number}` | "" | undefined; priorityFee: `${number}` | "" | undefined; gasPrice?: string; baseFee?: string; networkFee?: string; networkFeeRaw?: string; l1Fee?: string; } | undefined; callGasLimit?: string; verificationGasLimit?: string; preVerificationGas?: string; }>; /** * Estimates the fee levels for a transfer. * @param level - The fee level * @returns A function that estimates the fees for a transfer request. */ export declare function estimateTransferFeeForFeeLevel(level: 'LOW' | 'MEDIUM' | 'HIGH'): ({ client, request: { from, to, token, amount, chain: _chain }, }: EstimateFeesPerGasParams) => Promise>; /** * Pre-configured fee level estimation function. * Uses the `LOW` fee level settings for transfer fee estimation. */ export declare const LOW: ({ client, request: { from, to, token, amount, chain: _chain }, }: EstimateFeesPerGasParams) => Promise>; /** * Pre-configured fee level estimation function. * Uses the `MEDIUM` fee level settings for transfer fee estimation. */ export declare const MEDIUM: ({ client, request: { from, to, token, amount, chain: _chain }, }: EstimateFeesPerGasParams) => Promise>; /** * Pre-configured fee level estimation function. * Uses the `HIGH` fee level settings for transfer fee estimation. */ export declare const HIGH: ({ client, request: { from, to, token, amount, chain: _chain }, }: EstimateFeesPerGasParams) => Promise>; /** * Estimates the fee levels for a transfer and transfers the required amount to the `from` account. * @param params - * @param params.account - The account to transfer from. * @param params.level - The fee level to use for estimation. * @param params.confirmations - The number of confirmations to wait for. * @returns A function that prepares and estimates the fees. */ export declare function FEE_LEVEL_WITH_PREPARE({ account, level, confirmations, signal, }: { account: Account; level: 'LOW' | 'MEDIUM' | 'HIGH'; confirmations?: number; } & ControlFlowOptions): ({ client: _client, request }: EstimateFeesPerGasParams) => Promise<{ gasPrice?: undefined | undefined; maxFeePerBlobGas?: undefined | undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; } & { gas: BaseUnits; }>; /** * Estimates the gas required for a transfer. * @param params - The parameters for estimating fees per gas. * @returns The estimated gas in base units. */ export declare function ESTIMATE_GAS({ client, request }: EstimateFeesPerGasParams): Promise;