import { RelayExecutionStatus } from '@funkit/api-base'; export declare const WITHDRAWAL_STATUS_QUERY_KEY = "withdrawalStatus"; /** * Whether there is still anything to learn by asking again. Split out because * the "record never appeared" bound is the part worth testing directly — driving * it through the query would mean waiting out real poll intervals. * * Only answered-and-absent counts against the bound: a network or 5xx failure * says nothing about the record, so giving up on one would abandon a withdrawal * we could still have followed. */ export declare function shouldKeepPollingStatus({ status, hasRecord, notFoundFetches, }: { status: RelayExecutionStatus | undefined; hasRecord: boolean; notFoundFetches: number; }): boolean; export interface WithdrawalStatusResult { status: RelayExecutionStatus | undefined; /** Confirmed on-chain. Only `SUCCESS` — not merely "stopped moving". */ isCompleted: boolean; /** `FAILURE` or `REFUND`: the transfer did not reach the recipient. */ isFailed: boolean; /** Funds came back to the sender, so there is nothing to chase. */ isRefunded: boolean; } /** * Follow a submitted withdrawal to a terminal state. * * The record is written best-effort by the pipeline, so a missing one is not a * failure — the transfer is already on-chain. It just means we cannot report * progress, and polling stops rather than hammering the API forever. An * explicit terminal failure is different, and is reported as one. */ export declare function useWithdrawalStatus(txHash: string | undefined): WithdrawalStatusResult; //# sourceMappingURL=useWithdrawalStatus.d.ts.map