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