import type { BlockTracker } from '@metamask/network-controller'; import type { Hex } from '@metamask/utils'; import type { TransactionControllerMessenger } from '../TransactionController.js'; import type { TransactionMeta } from '../types.js'; /** * Helper class to orchestrate when to poll pending transactions. * Initially starts polling via a timeout chain every 2 seconds up to 5 times. * Following that, it will poll on every new block via the block tracker. */ export declare class TransactionPoller { #private; constructor({ blockTracker, chainId, messenger, }: { blockTracker: BlockTracker; chainId: Hex; messenger: TransactionControllerMessenger; }); /** * Start the poller with a listener that will be called on every interval. * * @param listener - The listener to call on every interval. */ start(listener: (latestBlockNumber: string) => Promise): void; /** * Stop the poller. * Remove all timeouts and block tracker listeners. */ stop(): void; /** * Notify the poller of the pending transactions being monitored. * This will reset to the accelerated polling and reset the count * when new transactions are added or removed. * * @param pendingTransactions - The pending transactions to poll. */ setPendingTransactions(pendingTransactions: TransactionMeta[]): void; } //# sourceMappingURL=TransactionPoller.d.ts.map