import { ScanStatus, type ScanResult, type ScannerId } from "./types.js"; /** Emitted when one scanner execution attempt starts. */ export interface ScannerRunStartEvent { address: string; scannerId: ScannerId; timestamp: number; } /** Emitted when one scanner execution attempt completes without skip/error status. */ export interface ScannerRunCompleteEvent { address: string; scannerId: ScannerId; timestamp: number; result: ScanResult; /** Epoch ms of the matching run start (data stamping for telemetry; absent if no start was seen). */ startedAt?: number; } /** Emitted when one scanner execution attempt terminates with a skip-like status. */ export interface ScannerRunSkipEvent { address: string; scannerId: ScannerId; timestamp: number; status: ScanStatus; reason: string; /** Epoch ms of the matching run start (data stamping for telemetry; absent if no start was seen). */ startedAt?: number; /** Id of the tick that skipped; absent when the run carried none. */ tickId?: string; } /** Emitted when one scanner execution attempt fails with an error status. */ export interface ScannerRunErrorEvent { address: string; scannerId: ScannerId; timestamp: number; error: unknown; /** Epoch ms of the matching run start (data stamping for telemetry; absent if no start was seen). */ startedAt?: number; /** Id of the tick that failed; absent when the run carried none. */ tickId?: string; } /** Scanner runtime pub/sub event map. */ export interface ScannerRuntimeEventMap { "scanner:run:start": ScannerRunStartEvent; "scanner:run:complete": ScannerRunCompleteEvent; "scanner:run:skip": ScannerRunSkipEvent; "scanner:run:error": ScannerRunErrorEvent; } /** Supported runtime event names for scanner execution lifecycle. */ export type ScannerRuntimeEventName = keyof ScannerRuntimeEventMap; /** Emits the terminal event (`complete|skip|error`) corresponding to a run result. */ export declare function emitTerminalScannerRunEvent(emit: (eventName: ScannerRuntimeEventName, event: ScannerRuntimeEventMap[ScannerRuntimeEventName]) => void, result: ScanResult): void; //# sourceMappingURL=events.d.ts.map