Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@adiwajshing/baileys/lib/Utils/legacy-msgs.d.ts
1129 views
1
/// <reference types="node" />
2
import { AuthenticationCreds, Contact, CurveKeyPair, LegacyAuthenticationCreds, WATag } from '../Types';
3
export declare const newLegacyAuthCreds: () => LegacyAuthenticationCreds;
4
export declare const decodeWAMessage: (message: Buffer | string, auth: {
5
macKey: Buffer;
6
encKey: Buffer;
7
}, fromMe?: boolean) => readonly [string, any, WATag | undefined];
8
/**
9
* Once the QR code is scanned and we can validate our connection, or we resolved the challenge when logging back in
10
* @private
11
* @param json
12
*/
13
export declare const validateNewConnection: (json: {
14
[_: string]: any;
15
}, auth: LegacyAuthenticationCreds, curveKeys: CurveKeyPair) => {
16
user: Contact;
17
auth: LegacyAuthenticationCreds;
18
phone: any;
19
};
20
export declare const computeChallengeResponse: (challenge: string, auth: LegacyAuthenticationCreds) => string[];
21
export declare const useSingleFileLegacyAuthState: (file: string) => {
22
state: LegacyAuthenticationCreds;
23
saveState: () => void;
24
};
25
export declare const getAuthenticationCredsType: (creds: LegacyAuthenticationCreds | AuthenticationCreds) => "legacy" | "md" | undefined;
26
27