import type { HttpClient } from '../http.js'; export interface GrantexEvent { id: string; type: string; createdAt: string; data: Record; } export interface StreamOptions { types?: string[]; } export type EventHandler = (event: GrantexEvent) => void | Promise; export declare class EventsClient { #private; constructor(http: HttpClient); /** * Connect to the SSE event stream. * Returns an async iterable of events. */ stream(options?: StreamOptions): AsyncGenerator; /** * Subscribe to events with a callback handler. * Returns a function to unsubscribe. */ subscribe(handler: EventHandler, options?: StreamOptions): { unsubscribe: () => void; }; } //# sourceMappingURL=events.d.ts.map