import WebSocket from 'ws';
import { NostrEvent, NostrFilter } from './types';
export declare class NostrWebSocket extends WebSocket {
    private subscriptionId;
    private filter;
    private onEvent;
    private onError;
    constructor(url: string, subscriptionId: string, filter: object, onEvent: (event: NostrEvent) => void, onError: (error: Error) => void);
    close(): void;
}
export declare class WebSocketManager {
    private ws?;
    private url;
    private onConnect;
    private onDisconnect;
    private onError;
    constructor(config: {
        relayUrl: string;
        onConnect: () => void;
        onDisconnect: () => void;
        onError: (error: Error) => void;
    });
    connect(): void;
    disconnect(): Promise<void>;
    sendEvent(event: NostrEvent): Promise<void>;
    subscribe(filters: NostrFilter[]): Promise<string>;
    unsubscribe(_subscriptionId: string): Promise<void>;
}
