import { Boom } from '@hapi/boom'; import type { SocketConfig } from '../Types/index.js'; import { type BinaryNode } from '../WABinary/index.js'; import { BinaryInfo } from '../WAM/BinaryInfo.js'; import { USyncQuery } from '../WAUSync/index.js'; import { WebSocketClient } from './Client/index.js'; /** * 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: (config: SocketConfig) => { type: "md"; ws: WebSocketClient; ev: import("../Types/index.js").BaileysEventEmitter & { process(handler: (events: Partial) => void | Promise): () => void; buffer(): void; createBufferedFunction(work: (...args: A) => Promise): (...args: A) => Promise; flush(): boolean; isBuffering(): boolean; }; authState: { creds: import("../Types/index.js").AuthenticationCreds; keys: import("../Types/index.js").SignalKeyStoreWithTransaction; }; signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore; readonly user: import("../Types/index.js").Contact | undefined; generateMessageTag: () => string; query: (node: BinaryNode, timeoutMs?: number) => Promise; waitForMessage: (msgId: string, timeoutMs?: number | undefined) => Promise; waitForSocketOpen: () => Promise; sendRawMessage: (data: Uint8Array | Buffer) => Promise; sendNode: (frame: BinaryNode) => Promise; logout: (msg?: string) => Promise; end: (error: Error | undefined) => void; onUnexpectedError: (err: Error | Boom, msg: string) => void; uploadPreKeys: (count?: number, retryCount?: number) => Promise; uploadPreKeysToServerIfRequired: () => Promise; digestKeyBundle: () => Promise; rotateSignedPreKey: () => Promise; requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise; wamBuffer: BinaryInfo; /** Waits for the connection to WA to reach a state */ waitForConnectionUpdate: (check: (u: Partial) => Promise, timeoutMs?: number) => Promise; sendWAMBuffer: (wamBuffer: Buffer) => Promise; executeUSyncQuery: (usyncQuery: USyncQuery) => Promise; onWhatsApp: (...phoneNumber: string[]) => Promise<{ jid: string; exists: boolean; }[] | undefined>; }; //# sourceMappingURL=socket.d.ts.map