import type { MarketrixConfig } from '../types';
import type { ToolResponse } from '../types/toolMessages';
export type WebSocketStatus = 'disconnected' | 'connecting' | 'connected' | 'registered' | 'error';
export interface WebSocketMessage {
    jsonrpc?: string;
    method?: string;
    params?: Record<string, unknown>;
    result?: unknown;
    stateVersion?: number;
    error?: {
        code: number;
        message: string;
    };
    id?: string | number;
}
export interface WebSocketClientCallbacks {
    onStatusChange?: (status: WebSocketStatus) => void;
    onMessage?: (message: WebSocketMessage) => void;
    onError?: (error: Error) => void;
}
export declare class WebSocketClient {
    private static instance;
    private websocket;
    private url;
    private chatId;
    private status;
    private callbacks;
    private reconnectAttempts;
    private readonly maxReconnectAttempts;
    private reconnectDelay;
    private readonly maxReconnectDelay;
    private reconnectTimer;
    private isIntentionallyDisconnected;
    private heartbeatInterval;
    private readonly heartbeatIntervalMs;
    private connectPromise;
    private connectPromiseChatId;
    private constructor();
    static getInstance(config?: Partial<MarketrixConfig>): WebSocketClient;
    addCallbacks(callbacks: WebSocketClientCallbacks): void;
    removeCallbacks(callbacks: WebSocketClientCallbacks): void;
    getStatus(): WebSocketStatus;
    getUrl(): string;
    isConnected(): boolean;
    connect(chatId: string): Promise<void>;
    private doConnect;
    disconnect(): void;
    send(message: WebSocketMessage | ToolResponse<unknown>): void;
    private setStatus;
    private notifyError;
    private handleMessage;
    private sendRegistration;
    private scheduleReconnect;
    private clearReconnectTimer;
    private startHeartbeat;
    private stopHeartbeat;
}
//# sourceMappingURL=WebSocketClient.d.ts.map