import type { Subscription, SubscriptionEvent } from '@lifi/perps-types'; import type { ProviderGetQuoteParams, QuoteListener } from '../types/provider.js'; import type { ReconnectingWebSocket } from './ReconnectingWebSocket.js'; import type { SubscriptionListener, WsProvider, WsStatusListener } from './types.js'; export declare const WS_CHANNEL_TEARDOWN_LINGER_MS = 250; export declare abstract class WsProviderBase implements WsProvider { protected readonly rws: ReconnectingWebSocket; protected readonly providerKey: string; private readonly channels; private readonly statusListeners; private readonly wireSubs; constructor(rws: ReconnectingWebSocket, providerKey: string); subscribe(sub: Subscription, listener: SubscriptionListener, onStatus?: WsStatusListener): Promise<() => void>; reconnect(): void; close(): void; protected emit(key: string, event: SubscriptionEvent): void; protected closeChannelIfIdle(key: string): boolean; protected registerSub(key: string, state: TSub): Promise; protected unregisterSub(key: string): void; private replaySubs; abstract subscribeQuote(params: ProviderGetQuoteParams, onQuote: QuoteListener): Promise<() => void>; protected abstract toKey(sub: Subscription): string; protected abstract openChannel(sub: Subscription): Promise<() => void>; protected abstract sendSubscribe(state: TSub): void | Promise; protected abstract handleMessage(raw: string): void; protected onClose(): void; private callListener; private acquireChannel; private releaseChannel; } //# sourceMappingURL=WsProviderBase.d.ts.map