import { WsError } from './errors.js'; import type { OrderbookOptions, OrderbookEventMap } from './types/orderbook.js'; type SystemHandler = (arg: T) => void; type EventHandler = (data: T) => void; export declare class OrderbookWS { private readonly apiKey; private readonly obUrl; private readonly options; private socket; private tokenIds; private reconnectAttempts; private reconnectTimer; private intentionalClose; private connected; private handlers; private _onConnect; private _onDisconnect; private _onReconnect; private _onError; constructor(apiKey: string, obUrl: string, options?: OrderbookOptions); get isConnected(): boolean; onConnect(handler: SystemHandler): this; onDisconnect(handler: SystemHandler): this; onReconnect(handler: SystemHandler): this; onError(handler: SystemHandler): this; /** Register a handler for a specific event type. */ on(event: K, handler: EventHandler): this; /** Remove a handler. */ off(event: K, handler: EventHandler): this; /** Subscribe to orderbook updates for the given token IDs. */ subscribe(tokenIds: string[]): Promise; /** Unsubscribe from all markets. */ unsubscribe(): void; /** Connect to the orderbook WebSocket. Called automatically on first subscribe. */ connect(): Promise; /** Close the connection. Stops auto-reconnect. */ disconnect(): void; private _ensureConnected; private _connect; private _send; private _handleMessage; private _dispatchUpdate; private _scheduleReconnect; } export {}; //# sourceMappingURL=orderbook.d.ts.map