///
import WebSocket from 'ws';
import { 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: authState, printQRInTerminal, defaultQueryTimeoutMs, syncFullHistory, transactionOpts, qrTimeout, options, }: SocketConfig) => {
type: "md";
ws: WebSocket;
ev: import("../Types").BaileysEventEmitter & {
process(handler: (events: Partial) => void | Promise): () => void;
buffer(): boolean;
createBufferedFunction(work: (...args: A) => Promise): (...args: A) => Promise;
flush(): Promise;
processInBuffer(task: Promise): any;
isBuffering(): boolean;
};
authState: {
creds: import("../Types").AuthenticationCreds;
keys: import("../Types").SignalKeyStoreWithTransaction;
};
readonly user: import("../Types").Contact | undefined;
generateMessageTag: () => string;
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise;
waitForMessage: (msgId: string, timeoutMs?: number | undefined) => Promise;
waitForSocketOpen: () => Promise;
sendRawMessage: (data: Uint8Array | Buffer) => Promise;
sendNode: (frame: BinaryNode) => Promise;
logout: (msg?: string | undefined) => Promise;
end: (error: Error | undefined) => void;
onUnexpectedError: (error: Error, msg: string) => void;
uploadPreKeys: (count?: number) => Promise;
uploadPreKeysToServerIfRequired: () => Promise;
/** Waits for the connection to WA to reach a state */
waitForConnectionUpdate: (check: (u: Partial) => boolean | undefined, timeoutMs?: number | undefined) => Promise;
};
export declare type Socket = ReturnType;