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