Path: blob/master/node_modules/@adiwajshing/baileys/lib/LegacySocket/auth.d.ts
1129 views
/// <reference types="ws" />1/// <reference types="node" />2import { ConnectionState, LegacyBaileysEventEmitter, LegacySocketConfig } from '../Types';3declare const makeAuthSocket: (config: LegacySocketConfig) => {4state: ConnectionState;5authInfo: import("../Types").LegacyAuthenticationCreds;6ev: LegacyBaileysEventEmitter;7canLogin: () => boolean;8logout: () => Promise<void>;9/** Waits for the connection to WA to reach a state */10waitForConnectionUpdate: (check: (u: Partial<ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;11type: "legacy";12ws: import("ws");13sendAdminTest: () => Promise<string>;14updateKeys: (info: {15encKey: Buffer;16macKey: Buffer;17}) => {18encKey: Buffer;19macKey: Buffer;20};21waitForSocketOpen: () => Promise<void>;22sendNode: ({ json, binaryTag, tag, longTag }: import("../Types").SocketSendMessageOptions) => Promise<string>;23generateMessageTag: (longTag?: boolean) => string;24waitForMessage: (tag: string, requiresPhoneConnection: boolean, timeoutMs?: number | undefined) => {25promise: Promise<any>;26cancelToken: () => void;27};28query: ({ json, timeoutMs, expect200, tag, longTag, binaryTag, requiresPhoneConnection }: import("../Types").SocketQueryOptions) => Promise<any>;29setQuery: (nodes: import("..").BinaryNode[], binaryTag?: import("../Types").WATag, tag?: string | undefined) => Promise<{30status: number;31}>;32currentEpoch: () => number;33end: (error: Error | undefined) => void;34};35export default makeAuthSocket;363738