/**
 * LiFi aggregator helpers for the swap recipe (`client.strategy.swap`).
 *
 * The protocol's swap permissions (e.g. LifiDiamondSwapPermission) restrict
 * manager swaps to the official LiFi Diamond. We fetch an executable quote from
 * the LiFi API and hand its calldata to the kernel dispatch path.
 */
import { type Address, type Hex } from "viem";
/** LiFi quote endpoint. */
export declare const LIFI_QUOTE_URL = "https://li.quest/v1/quote";
/**
 * Canonical LiFi Diamond router per chain. LiFi deploys the diamond at the same
 * address across most mainnets; callers can override via `SwapParams.router`.
 */
export declare const LIFI_ROUTERS: Record<number, Address>;
/**
 * Default slippage (3%). LiFi's own 0.5% default reverts with
 * CumulativeSlippageTooHigh on small trades against live price moves.
 */
export declare const DEFAULT_SLIPPAGE = 0.03;
/** ABI for reading an ERC-20 allowance. */
export declare const ERC20_ALLOWANCE_ABI: readonly [{
    readonly name: "approve";
    readonly type: "function";
    readonly stateMutability: "nonpayable";
    readonly inputs: readonly [{
        readonly type: "address";
        readonly name: "spender";
    }, {
        readonly type: "uint256";
        readonly name: "amount";
    }];
    readonly outputs: readonly [];
}, {
    readonly name: "allowance";
    readonly type: "function";
    readonly stateMutability: "view";
    readonly inputs: readonly [{
        readonly type: "address";
        readonly name: "owner";
    }, {
        readonly type: "address";
        readonly name: "spender";
    }];
    readonly outputs: readonly [{
        readonly type: "uint256";
    }];
}];
/** Encode an ERC-20 `approve(spender, amount)` calldata. */
export declare function encodeApprove(spender: Address, amount: bigint): Hex;
/** The pieces of a LiFi quote the dispatch path needs. */
export type LifiSwapQuote = {
    /** Call target — the router that executes the swap. */
    target: Address;
    /** Swap calldata. */
    data: Hex;
    /** msg.value for the call (non-zero only for native-token inputs). */
    value: bigint;
    /** Expected output amount in `to`-token base units. */
    toAmount: bigint;
    /** Aggregator sub-route / tool name. */
    tool?: string;
};
export type FetchLifiQuoteParams = {
    chainId: number;
    fromToken: Address;
    toToken: Address;
    /** Input amount in `fromToken` base units. */
    fromAmount: bigint;
    /** The account funding and (by default) receiving the swap. */
    fromAddress: Address;
    toAddress: Address;
    /** Slippage as a fraction (0.03 = 3%). */
    slippage: number;
    /** Optional fetch implementation (defaults to global fetch). */
    fetchFn?: typeof fetch;
};
/**
 * Compute the minimum acceptable output amount for a swap, given a quoted
 * `toAmount` and a slippage tolerance.
 *
 * Use this to enforce slippage protection when building dispatch calldata —
 * pass the result as `amountOutMinimum` (Uniswap) or `minAmount` (LiFi).
 *
 * @param toAmount  Expected output in the destination token's base units
 *                  (from `LifiSwapQuote.toAmount` or a Quoter call).
 * @param slippage  Maximum acceptable price movement as a fraction (0.03 = 3%).
 *                  Defaults to `DEFAULT_SLIPPAGE` (3%).
 *
 * @example
 * const quote = await fetchLifiQuote({ ... });
 * const minOut = minTokenOut(quote.toAmount, 0.005); // 0.5% slippage
 */
export declare function minTokenOut(toAmount: bigint, slippage?: number): bigint;
/**
 * Fetch an executable LiFi quote for a same-chain swap. Throws with the API's
 * error body when the quote is unavailable or malformed.
 */
export declare function fetchLifiQuote(params: FetchLifiQuoteParams): Promise<LifiSwapQuote>;
//# sourceMappingURL=lifi.d.ts.map