chore: use new libp2p-noise

This commit is contained in:
Vasco Santos
2021-08-19 13:18:50 +02:00
committed by Vasco Santos
parent 0f389a7828
commit 3d25ff7fd0
44 changed files with 49 additions and 49 deletions

View File

@ -3,7 +3,7 @@
const Libp2p = require('../..')
const TCP = require('libp2p-tcp')
const Mplex = require('libp2p-mplex')
const { NOISE } = require('libp2p-noise')
const { NOISE } = require('@chainsafe/libp2p-noise')
const pipe = require('it-pipe')

View File

@ -8,13 +8,13 @@ A byproduct of having these encrypted communications modules is that we can auth
# 1. Set up encrypted communications
We will build this example on top of example for [Protocol and Stream Multiplexing](../protocol-and-stream-multiplexing). You will need the `libp2p-noise` module to complete it, go ahead and `npm install libp2p-noise`.
We will build this example on top of example for [Protocol and Stream Multiplexing](../protocol-and-stream-multiplexing). You will need the `@chainsafe/libp2p-noise` module to complete it, go ahead and `npm install @chainsafe/libp2p-noise`.
To add them to your libp2p configuration, all you have to do is:
```JavaScript
const Libp2p = require('libp2p')
const { NOISE } = require('libp2p-noise')
const { NOISE } = require('@chainsafe/libp2p-noise')
const createNode = () => {
return Libp2p.create({