update docs

This commit is contained in:
Marin Petrunić
2020-02-07 13:06:42 +01:00
parent 2f2476b146
commit 09f98fcc12
4 changed files with 14 additions and 5 deletions

View File

@ -1 +1,7 @@
import {Noise} from "./noise";
export * from "./noise";
/**
* Default configuration, it will generate new noise static key and enable noise pipes (IK handshake).
*/
export const NOISE = new Noise();

View File

@ -39,9 +39,9 @@ export class Noise implements INoiseConnection {
/**
*
* @param staticNoiseKey
* @param staticNoiseKey x25519 private key, reuse for faster handshakes
* @param earlyData
* @param useNoisePipes
* @param useNoisePipes enable IK handshake if initiator static key is known
*/
constructor(staticNoiseKey?: bytes, earlyData?: bytes, useNoisePipes = true) {
this.earlyData = earlyData || Buffer.alloc(0);