import type { NotificationItem } from '../../../modals/CheckoutModal/TransferToken/types'; import { type ExecutionTransactionSubmittedArgs } from './resolveExecutionProgressContext'; import { AnalyticsEvent, type ExecutionTransactionSnapshotProperties } from './events'; export type TrackExecutionSucceededArgs = ExecutionTransactionSubmittedArgs & { fulfillmentTimeMs: number | null; }; export type TrackExecutionFailedArgs = ExecutionTransactionSubmittedArgs & { errorCode: string | null; errorMessage: string | null; }; declare const eventNames: { readonly deposit: { readonly failed: AnalyticsEvent.DEPOSIT_FAILED; readonly submitted: AnalyticsEvent.DEPOSIT_TRANSACTION_SUBMITTED; readonly succeeded: AnalyticsEvent.DEPOSIT_SUCCEEDED; }; readonly withdraw: { readonly failed: AnalyticsEvent.WITHDRAWAL_FAILED; readonly submitted: AnalyticsEvent.WITHDRAWAL_TRANSACTION_SUBMITTED; readonly succeeded: AnalyticsEvent.WITHDRAWAL_SUCCEEDED; }; }; export declare function buildExecutionTransactionSnapshotProperties(args: ExecutionTransactionSubmittedArgs, connectorId: string | undefined): ExecutionTransactionSnapshotProperties; /** Flows with execution lifecycle events; Convert's arrive with its execution. */ type ExecutionFlow = keyof typeof eventNames; /** Builds and emits execution lifecycle events without owning any polling. */ export declare function useTrackExecutionProgressEvents(flow: ExecutionFlow): { trackExecutionFailed: (args: TrackExecutionFailedArgs, claimKey: string) => void; trackExecutionProgressEvents: (historyItem: NotificationItem) => void; trackExecutionSucceeded: (args: TrackExecutionSucceededArgs, claimKey: string) => void; trackExecutionTransactionSubmitted: (args: ExecutionTransactionSubmittedArgs, claimKey: string) => void; }; export {};