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/noise-handler.d.ts
1129 views
1
/// <reference types="node" />
2
import { Logger } from 'pino';
3
import { proto } from '../../WAProto';
4
import { KeyPair } from '../Types';
5
import { BinaryNode } from '../WABinary';
6
export declare const makeNoiseHandler: ({ public: publicKey, private: privateKey }: KeyPair, logger: Logger) => {
7
encrypt: (plaintext: Uint8Array) => Buffer;
8
decrypt: (ciphertext: Uint8Array) => Buffer;
9
authenticate: (data: Uint8Array) => void;
10
mixIntoKey: (data: Uint8Array) => void;
11
finishInit: () => void;
12
processHandshake: ({ serverHello }: proto.HandshakeMessage, noiseKey: KeyPair) => Buffer;
13
encodeFrame: (data: Buffer | Uint8Array) => Buffer;
14
decodeFrame: (newData: Buffer | Uint8Array, onFrame: (buff: Uint8Array | BinaryNode) => void) => void;
15
};
16
17