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
21 lines (20 loc) • 924 B
TypeScript
/// <reference types="node" />
import { proto } from '../../Connection/enc';
import { KeyPair } from '../../Models';
import { BinaryNode } from '../../Internal';
export declare const makeNoiseHandler: ({ keyPair: { private: privateKey, public: publicKey }, NOISE_HEADER, mobile, logger, routingInfo }: {
keyPair: KeyPair;
NOISE_HEADER: Uint8Array;
mobile: boolean;
logger: any;
routingInfo?: Buffer | undefined;
}) => {
encrypt: (plaintext: Uint8Array) => Buffer;
decrypt: (ciphertext: Uint8Array) => Buffer;
authenticate: (data: Uint8Array) => void;
mixIntoKey: (data: Uint8Array) => void;
finishInit: () => void;
processHandshake: ({ serverHello }: proto.HandshakeMessage, noiseKey: KeyPair) => Buffer;
encodeFrame: (data: Buffer | Uint8Array) => Buffer;
decodeFrame: (newData: Buffer | Uint8Array, onFrame: (buff: Uint8Array | BinaryNode) => void) => Promise<void>;
};