/// import WebSocket from 'ws'; import { AuthenticationCreds, BaileysEventEmitter, SocketConfig } from '../Types'; import { BinaryNode } from '../WABinary'; /** * Connects to WA servers and performs: * - simple queries (no retry mechanism, wait for connection establishment) * - listen to messages and emit events * - query phone connection */ export declare const makeSocket: ({ waWebSocketUrl, connectTimeoutMs, logger, agent, keepAliveIntervalMs, version, browser, auth: initialAuthState, printQRInTerminal, defaultQueryTimeoutMs }: SocketConfig) => { type: "md"; ws: WebSocket; ev: BaileysEventEmitter; authState: { creds: AuthenticationCreds; keys: import("../Types").SignalKeyStoreWithTransaction; }; readonly user: import("../Types").Contact; assertingPreKeys: (range: number, execute: (keys: { [_: number]: any; }) => Promise) => Promise; generateMessageTag: () => string; query: (node: BinaryNode, timeoutMs?: number) => Promise; waitForMessage: (msgId: string, timeoutMs?: number) => Promise; waitForSocketOpen: () => Promise; sendRawMessage: (data: Buffer | Uint8Array) => Promise; sendNode: (node: BinaryNode) => Promise; logout: () => Promise; end: (error: Error | undefined) => void; onUnexpectedError: (error: Error, msg: string) => void; /** Waits for the connection to WA to reach a state */ waitForConnectionUpdate: (check: (u: Partial) => boolean, timeoutMs?: number) => Promise; }; export declare type Socket = ReturnType;