UNPKG

superchats

Version:

SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp

33 lines (32 loc) 1.57 kB
import { SignalRepository } from '../../Models'; import { AuthenticationCreds, AuthenticationState, KeyPair, SignalIdentity, SignalKeyStore, SignedKeyPair } from '../../Models/Auth'; import { BinaryNode, JidWithDevice } from '../../Internal'; export declare const createSignalIdentity: (wid: string, accountSignatureKey: Uint8Array) => SignalIdentity; export declare const getPreKeys: ({ get }: SignalKeyStore, min: number, limit: number) => Promise<{ [id: string]: KeyPair; }>; export declare const generateOrGetPreKeys: (creds: AuthenticationCreds, range: number) => { newPreKeys: { [id: number]: KeyPair; }; lastPreKeyId: number; preKeysRange: readonly [number, number]; }; export declare const xmppSignedPreKey: (key: SignedKeyPair) => BinaryNode; export declare const xmppPreKey: (pair: KeyPair, id: number) => BinaryNode; export declare const parseAndInjectE2ESessions: (node: BinaryNode, repository: SignalRepository) => Promise<void>; export declare const extractDeviceJids: (result: BinaryNode, myJid: string, excludeZeroDevices: boolean) => JidWithDevice[]; /** * get the next N keys for upload or processing * @param count number of pre-keys to get or generate */ export declare const getNextPreKeys: ({ creds, keys }: AuthenticationState, count: number) => Promise<{ update: Partial<AuthenticationCreds>; preKeys: { [id: string]: KeyPair; }; }>; export declare const getNextPreKeysNode: (state: AuthenticationState, count: number) => Promise<{ update: Partial<AuthenticationCreds>; node: BinaryNode; }>;