import { BaseTransport } from '../../../core/blockchain-provider/transports/base.transport';
import type { JsonRpcRequest } from '../../../core/blockchain-provider/transports/interfaces';
export interface WebSocketRpcTransportOptions {
    uniqName: string;
    wsUrl: string;
    responseTimeout?: number;
}
export interface JsonRpcSubscription {
    unsubscribe(): void;
}
export declare class WebSocketRpcTransport extends BaseTransport {
    readonly type: "ws-rpc";
    private readonly wsUrl;
    private readonly responseTimeout;
    private socket;
    private requestId;
    private readonly pendingRequests;
    private readonly subscriptionCallbacks;
    private connectPromise;
    constructor(options: WebSocketRpcTransportOptions);
    connect(): Promise<void>;
    request<T = any>(method: string, params?: any[]): Promise<T>;
    batch<T = any>(requests: JsonRpcRequest[]): Promise<Array<T | null>>;
    close(): Promise<void>;
    subscribe(method: string, params: any[], onMessage: (payload: any) => void): Promise<JsonRpcSubscription>;
    private handleMessage;
    private requireSocket;
    private isSocketOpen;
    private rejectAll;
}
