import { KisEventHandler, type EventCallback, type EventFilter, KisEventTicket } from "./events.js"; import type { PyKis } from "./client.js"; import { type DomainType, type KisSubscriptionEvent, type KisWebsocketTR } from "./types.js"; export interface KisSubscribedEvent { tr: KisWebsocketTR; } export interface KisRealtimeResponse { trId: string; raw: string[]; kind: "price" | "orderbook" | "execution" | "unknown"; [key: string]: unknown; } export declare class KisWebsocketClient { readonly kis: PyKis; readonly domain: DomainType; readonly subscribedEvent: KisEventHandler; readonly unsubscribedEvent: KisEventHandler; readonly event: KisEventHandler>; reconnect: boolean; reconnectIntervalMs: number; private socket?; private reconnectTimer?; private readonly subscriptions; private readonly registeredSubscriptions; private readonly keychain; private connecting?; constructor(kis: PyKis, domain?: DomainType); get connected(): boolean; isSubscribed(id: string, key?: string): boolean; connect(): void; ensureConnected(): Promise; disconnect(): void; subscribe(id: string, key: string, primary?: boolean): Promise; unsubscribe(id: string, key: string, primary?: boolean): Promise; unsubscribeAll(): void; on(id: string, key: string, callback: EventCallback>, options?: { where?: EventFilter>; once?: boolean; primary?: boolean; }): KisEventTicket>; once(id: string, key: string, callback: EventCallback>, options?: { where?: EventFilter>; primary?: boolean; }): KisEventTicket>; private request; private handleClose; private handleMessage; private handleControl; private handleEvent; } export declare function decryptAesCbcBase64(data: string, key: Buffer, iv: Buffer): string; export declare function parseRealtimeResponse(trId: string, raw: string[]): KisRealtimeResponse;