import type { EvmExplorer } from '../../Explorer/EvmExplorer';
/** Details passed to the confirmation callback. */
export interface EvmConfirmationDetails {
    /** Transaction hash. */
    transactionId: string;
    /** Block number the transaction was included in. */
    blockHeight: number;
    /** Whether the transaction succeeded or was reverted by the EVM. */
    status: 'success' | 'reverted';
}
/**
 * Represents a transaction that has been signed and broadcast to the network.
 *
 * Use {@link onConfirmed} to register a callback that fires when the
 * transaction is confirmed on-chain. If the transaction is already confirmed
 * at the time of registration, the callback fires immediately.
 *
 * `onConfirmed` returns a `cancel` function to stop polling.
 *
 * @example
 * ```ts
 * const broadcasted = await tx.signAndBroadcast();
 * console.log('TX sent:', broadcasted.transactionId);
 *
 * const cancel = broadcasted.onConfirmed((details) => {
 *   console.log('Confirmed in block', details.blockHeight);
 *   console.log('Status:', details.status);
 * });
 *
 * // Stop waiting for confirmation at any time:
 * cancel();
 * ```
 */
export declare class BroadcastedEvmTransaction {
    /** The transaction hash returned by the network. */
    readonly transactionId: string;
    private readonly explorer;
    private confirmationDetails;
    private polling;
    private cancelled;
    private callbacks;
    /** @internal */
    constructor(transactionId: string, explorer: EvmExplorer);
    /**
     * Registers a callback to be invoked when the transaction is confirmed.
     *
     * - If the transaction is already confirmed, the callback fires immediately
     *   (asynchronously, in the next microtask).
     * - Multiple callbacks can be registered; they all fire once on confirmation.
     * - Polling starts automatically on the first call and stops after confirmation
     *   or when the returned `cancel` function is called.
     *
     * @param callback - Function invoked with confirmation details.
     * @returns A function that, when called, removes this callback and stops
     *          polling if no other callbacks remain.
     */
    onConfirmed(callback: (details: EvmConfirmationDetails) => void): () => void;
    /** Polls the explorer for transaction confirmation indefinitely until confirmed or cancelled. */
    private poll;
    /** Invokes all registered callbacks and clears the list. */
    private fireCallbacks;
}
