import { type WithdrawalAmountValidation } from '@funkit/connect-core'; import type { WithdrawalFlowConfig } from '../flow/withdrawalFlowConfig'; import { type WithdrawCtaBlocker } from './validation'; /** What the crypto withdrawal's screens read and write. */ export type CryptoWithdrawalForm = ReturnType; /** * One withdrawal in progress, across the screens that build it: the amount, the * recipient and the fees are asked for a step at a time, and all of it is priced * against the same quote. * * Held above the screens rather than inside one of them, so a step can be added * (or reordered) without the state moving house — and so the quote isn't thrown * away and re-fetched on every navigation. */ export declare function useCryptoWithdrawalForm({ config, quoteInputFeeTokens, quoteInputFeeSettled, }: { config: WithdrawalFlowConfig; /** * A flat fee the venue takes off the withdrawal before it is quoted, in * source-token units, or 0. */ quoteInputFeeTokens: number; /** See `WithdrawalFlowConfig.quoteInputFeeSettled`. */ quoteInputFeeSettled?: boolean; }): { recipient: string; setRecipient: import("react").Dispatch>; sourceOptions: import("../..").WithdrawalSourceTokenOption[]; selectedSourceIndex: number; sourceOption: import("../..").WithdrawalSourceTokenOption; sourceToken: import("../..").WithdrawalToken; sourceLabel: string; sourceDecimals: number | undefined; balance: string | undefined; /** * Records the decision and clears the amount: it was in the previous token's * units, and the balance and minimum it was checked against are the new * token's. Returns whether the source actually moved. */ selectSource: (index: number) => boolean; destinationChains: import("./useWithdrawalDestinationTokens").DestinationChain[]; destinationToken: import("../..").WithdrawalToken | undefined; selectDestinationToken: (chainId: number, symbol: string) => void; isLoadingDestinations: boolean; isRecipientBlacklisted: boolean; amountValidation: WithdrawalAmountValidation; ctaBlocker: WithdrawCtaBlocker | undefined; risk: import("./useWithdrawalRisk").WithdrawalRiskResult; /** * Whether what has been typed is a wallet address at all — `undefined` while * the field is empty. Being one doesn't make it usable: the blacklist and the * destination's chain are the separate verdicts in `recipientError`. */ isRecipientAddress: boolean | undefined; /** Why a well-formed address still can't be used. */ recipientError: string | undefined; /** Screening's non-blocking verdict; the submit is what it gates. */ recipientWarning: string | undefined; /** Enough to leave the recipient step, which the amount's problems don't hold. */ canConfirmRecipient: boolean; /** * Fail closed: only a completed, clean screening lets the withdrawal through, * and only while the quote on screen is the one for what the field says — * mid-edit the query is disabled and `quote` still holds the last price. */ canSubmit: boolean; quote: import("./useCryptoWithdrawalQuote").CryptoWithdrawalQuoteView | undefined; quoteAmount: string; /** Destination-token units, absent until the quote matches what is typed. */ receiveAmount: string | undefined; receiveUsd: number | undefined; receiveFloorUsd: number | undefined; isQuoteLoading: boolean; isQuoteError: boolean; isSettled: boolean; isAmountBelowFee: boolean; /** * The amount step's own gate: `ctaBlocker` also weighs the recipient, which * isn't asked for until the step after. */ amountError: string | undefined; canContinue: boolean; input: string; setInput: (next: string) => void; inUsd: boolean; swapDenomination: () => void; canSwapDenomination: boolean; amountUsd: string | undefined; amount: string; setAmount: import("react").Dispatch>; }; //# sourceMappingURL=useCryptoWithdrawalForm.d.ts.map