mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-13 09:11:20 +00:00
chore: use new libp2p-noise
This commit is contained in:
committed by
Vasco Santos
parent
0f389a7828
commit
3d25ff7fd0
@ -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')
|
||||
|
||||
|
@ -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({
|
||||
|
Reference in New Issue
Block a user