import type { FiatStepResponse, Quote, QuoteLimits } from '@fun-xyz/fiat-contract/types'; import type { EntryCta } from '../../domains/fiat/entryCta'; import type { FiatQuoteMaximum, FiatQuoteMinimum, FiatRoutingOverrides, QuoteGeo } from '../../domains/fiat/quoteRequest'; import type { FunLogger } from '../../utils/funLogger'; import type { FiatFlow } from './useFiatTransitions'; export interface UseFiatQuoteParams { apiKey: string; userId?: string; logger: FunLogger; flow: Pick; amount: string; /** * ISO 4217 the buyer pays in, resolved from their region. Undefined while * that lookup is in flight; the request requires it, so no quote is sent * until it lands. */ currency: string | undefined; paymentMethod: string; cryptoCurrencyCode: string; chainId: string; /** * Where the buyer is, in the geo lookup's own field names. Optional only * because that lookup is async — the request requires it, so no quote is * sent until it resolves. */ geo?: QuoteGeo; /** * Test tooling; see {@link FiatRoutingOverrides}. Prefixed so a host does * not reach it by tab-completion: production backends refuse the quote. */ unstable_routingOverrides?: FiatRoutingOverrides; enabled?: boolean; debounceMs?: number; } export interface UseFiatQuoteResult { /** Provider selected by the fresh response, absent while repricing. */ provider?: FiatStepResponse['provider']; /** The last quote remains available while its replacement loads. */ quote?: Quote; /** What the buyer may deposit at their current tier; absent until quoted. */ limits?: QuoteLimits; /** Only a fresh quote for the current inputs can be submitted. */ isQuoteFresh: boolean; isQuoting: boolean; entryCta: EntryCta; submitQuote: () => void; retryQuote: () => void; /** * Forgets the price being shown, so the next ask fetches one. A quoteRef the * server has lost is still cached here, and still inside its stated * lifetime, so nothing else would go and get a live one. */ dropQuote: () => void; quoteError?: unknown; /** Actionable lower bound returned when every applicable provider refuses the amount. */ minimum?: FiatQuoteMinimum; /** The ceiling a refusal reported; this buyer's own, not the corridor's. */ maximum?: FiatQuoteMaximum; } /** Fetches and submits the quote shown on the amount screen. */ export declare function useFiatQuote({ apiKey, userId, logger, flow, amount, currency, paymentMethod, cryptoCurrencyCode, chainId, geo, unstable_routingOverrides: routingOverrides, enabled, debounceMs, }: UseFiatQuoteParams): UseFiatQuoteResult; //# sourceMappingURL=useFiatQuote.d.ts.map