import { type CheckoutQuoteResponse } from '@funkit/connect-core'; import type { FeeBreakdownV2 } from '@funkit/api-base'; import type { WithdrawalToken } from '../flow/withdrawalFlowConfig'; export declare const CRYPTO_WITHDRAWAL_QUOTE_QUERY_KEY = "cryptoWithdrawalQuote"; /** * How long a quote stays good for. Used for BOTH `staleTime` and * `refetchInterval`, and the equality is load-bearing: with `staleTime: 0`, an * `enabled` flip mid-edit remounts the query and refetches the previous key * before the new amount lands, replaying a stale quote. The interval keeps it * fresh regardless. */ export declare const QUOTE_REFRESH_INTERVAL_MS = 25000; export interface CryptoWithdrawalQuoteView { /** Executed as-is by the pipeline — never rebuilt from the fields below. */ raw: CheckoutQuoteResponse; /** What the recipient gets, in destination-token units. */ receiveAmount: string | undefined; fees: FeeBreakdownV2; } export interface UseCryptoWithdrawalQuoteParams { sourceToken: WithdrawalToken; destinationToken: WithdrawalToken | undefined; recipientAddress: string; /** Source-token units. Already debounced and settled by the caller. */ amount: string; walletAddress: string; /** The caller's own gate — validation, risk, blacklist (see `useQuoteGate`). */ enabled: boolean; } /** * The EXACT_IN quote for a crypto withdrawal, refreshed on an interval so the * fees on screen stay the fees that execute. * * The query key is the inputs themselves — no context round-trip — so a quote * can never describe a different withdrawal than the form shows. */ export declare function useCryptoWithdrawalQuote({ sourceToken, destinationToken, recipientAddress, amount, walletAddress, enabled, }: UseCryptoWithdrawalQuoteParams): { quote: CryptoWithdrawalQuoteView | undefined; isLoading: boolean; isError: boolean; }; //# sourceMappingURL=useCryptoWithdrawalQuote.d.ts.map