import { type Dispatch } from 'react'; import type { ConvertBalances } from '../domains/convert/balances'; import type { ConvertEvent, ConvertSnapshot } from '../domains/convert/reducer'; import type { ConvertConfig, ConvertResolvedAsset } from '../domains/convert/types'; import type { MaxSpendableAmount } from '../hooks/useMaxSpendableAmount'; interface UseConvertExecuteParams { dispatch: Dispatch; /** The source's fee reserve, for the pre-sign check's fresh Max. */ feeReserve: MaxSpendableAmount; /** Called with only the source asset. */ refetchBalances: (assets: ConvertResolvedAsset[]) => Promise; /** * The host's callback: quote problems, failures before funds move, and an * untrackable outcome. */ onError?: ConvertConfig['onError']; } export interface UseConvertExecuteResult { /** * Runs one conversion of `snapshot` up to a recorded deposit, signing only * what the pre-sign check passes. A call while one is running, or after its * outcome turned untrackable, does nothing. */ execute: (snapshot: ConvertSnapshot) => Promise; } /** * Convert's submit, like withdrawal's `useWithdrawal`: pre-sign check, source * leg through the host's wallet, then a direct-execution record for * `useConvertTransactionStatus` to follow. Holds no state: it reports each * step to the reducer, and never polls. */ export declare function useConvertExecute({ dispatch, feeReserve, refetchBalances, onError, }: UseConvertExecuteParams): UseConvertExecuteResult; export {};