Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,8 @@ const defaultsDeep = require('@nodeutils/defaults-deep')
const Protector = require('libp2p-pnet')

class Node extends libp2p {
constructor (_peerInfo, _peerBook, _options) {
constructor (_options) {
const defaults = {
peerInfo: _peerInfo, // The Identity of your Peer
peerBook: _peerBook, // Where peers get tracked, if undefined libp2p will create one instance

// The libp2p modules for this libp2p bundle
modules: {
transport: [
Expand All @@ -136,12 +133,11 @@ class Node extends libp2p {
connEncryption: [
SECIO
],
connProtector: new Protector(/*protector specific opts*/),
// Encryption for private networks. Needs additional private key to work
// connProtector: new Protector(/*protector specific opts*/),
peerDiscovery: [
MulticastDNS
],
peerRouting: {}, // Currently both peerRouting and contentRouting are patched through the DHT,
contentRouting: {}, // this will change once we factor that into two modules, for now do the following line:
dht: DHT // DHT enables PeerRouting, ContentRouting and DHT itself components
},

Expand All @@ -158,8 +154,6 @@ class Node extends libp2p {
}
// .. other discovery module options.
},
peerRouting: {},
contentRouting: {},
relay: { // Circuit Relay options
enabled: false,
hop: {
Expand Down