import { type FeeBreakdownV2 } from '@funkit/api-base'; import type { ApiFunkitCheckoutQuoteResult, CheckoutQuoteResponse } from '@funkit/utils'; import type { Address } from 'viem'; import type { FunLogger } from '../utils/funLogger'; /** Inputs for an EXACT_OUT checkout quote (deliver exactly `toAmountBaseUnit`). */ export interface ExactOutQuoteParams { apiKey: string; logger: FunLogger; fromChainId: string; fromTokenAddress: Address; toChainId: string; toTokenAddress: Address; recipientAddress: Address; userAddress: Address; /** Base units of the TARGET token to deliver. */ toAmountBaseUnit: bigint; } /** * Fetch an EXACT_OUT checkout quote: the recipient is credited exactly * `toAmountBaseUnit` of the target token, and `userAddress` pays whatever source * amount the quote requires. Pure — the caller owns decimals resolution, * execution, and any record-keeping. */ export declare function fetchExactOutQuote(params: ExactOutQuoteParams): Promise; /** Inputs for an EXACT_IN checkout quote (spend exactly `fromAmountBaseUnit`). */ export interface ExactInQuoteParams { apiKey: string; logger: FunLogger; fromChainId: string; fromTokenAddress: Address; toChainId: string; toTokenAddress: Address; recipientAddress: Address; userAddress: Address; /** Base units of the SOURCE token to spend. */ fromAmountBaseUnit: bigint; } /** * Fetch an EXACT_IN checkout quote: `userAddress` spends exactly * `fromAmountBaseUnit` of the source token and the recipient is credited * whatever the route delivers. The caller owns decimals resolution, execution, * and any record-keeping. */ export declare function fetchExactInQuote(params: ExactInQuoteParams): Promise; /** * Normalise a quote's fee breakdown so every field is a number. * * Takes a logger because a missing breakdown means the fee rows would silently * read as zero — the quote came back, so the user is about to see a price that * isn't the real one. */ export declare function extractRelayFeeInfo(metadata: Record | undefined, logger: FunLogger): FeeBreakdownV2; /** * What the recipient receives, in destination-token units. * * WARN, not ERROR: every other row still prices, so the user just reads `—` on * the one that matters. Nothing has moved. */ export declare function extractRelayReceiveAmount(metadata: Record | undefined, logger: FunLogger): string | undefined; /** * The quote as the DirectExecution record has to carry it. * * The backend's relay watcher reads its request id out of `clientMetadata.latestQuote.baseQuote.quoteId` * * Web reaches the same object through `getQuoteFinalEstimation`, which needs a * wagmi config, a payment method and a login type to price gas — none of which * exist here, and none of which a withdrawal uses: web's own `evaluateFeeBreakdown` * skips gas estimation for withdrawals and returns exactly the fields below. */ export declare function toClientMetadataQuote(quote: CheckoutQuoteResponse, sourceChainId: string): ApiFunkitCheckoutQuoteResult; //# sourceMappingURL=quote.d.ts.map