File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,15 +25,14 @@ Install with `yarn add @chainsafe/libp2p-noise` or `npm i @chainsafe/libp2p-nois
2525Example of using default noise configuration and passing it to the libp2p config:
2626
2727``` js
28- import {NOISE , Noise } from " @chainsafe/libp2p-noise"
28+ import {Noise } from " @chainsafe/libp2p-noise"
2929
30-
31- // custom noise configuration, pass it instead of NOISE instance
30+ // custom noise configuration, pass it instead of `new Noise()`
3231const noise = new Noise (privateKey, Buffer .alloc (x));
3332
3433const libp2p = new Libp2p ({
3534 modules: {
36- connEncryption: [NOISE ],
35+ connEncryption: [new Noise () ],
3736 },
3837});
3938```
Original file line number Diff line number Diff line change 1- import { Noise } from './noise.js'
2-
31export * from './crypto.js'
42export * from './crypto/stablelib.js'
53export * from './noise.js'
6-
7- /**
8- * Default configuration, it will generate new noise static key and enable noise pipes (IK handshake).
9- */
10- export const NOISE = new Noise ( )
You can’t perform that action at this time.
0 commit comments