Optional
addressesAddresses for transport listening and to advertise to the network
Optional
connectionConnection encrypters ensure that data sent over connections cannot be eavesdropped on, and that the remote peer posesses the private key that corresponds to the public key that it's Peer ID is derived from.
Optional
connectionA connection gater can deny new connections based on user criteria
Optional
connectionlibp2p Connection Manager configuration
Optional
connectionlibp2p Connection Monitor configuration
Optional
contentContent routers provide implementations for content routing queries
Optional
datastoreAn optional datastore to persist peer information, DHT records, etc.
An in-memory datastore will be used if one is not provided.
Optional
dnsAn optional DNS resolver configuration. If omitted the default DNS resolver
for the platform will be used which means node:dns
on Node.js and
DNS-JSON-over-HTTPS for browsers using Google and Cloudflare servers.
Optional
loggerAn optional logging implementation that can be used to write runtime logs.
Set the DEBUG
env var or the debug
key on LocalStorage to see logs.
Node.js:
$ DEBUG="*libp2p:*" node myscript.js
Browsers:
localStorage.setItem('debug', '*libp2p:*')
Optional
nodeMetadata about the node - implementation name, version number, etc
Optional
peerPeer discovery mechanisms allow finding peers on the network
Optional
peerPeer routers provide implementations for peer routing queries
Optional
peerlibp2p PeerStore configuration
Optional
privateThe private key is used in cryptographic operations and the Peer ID derived from it's corresponding public key is used to identify the node to other peers on the network.
If this is not passed a new Ed25519 private key will be generated.
Optional
servicesArbitrary libp2p modules
Optional
streamStream muxers allow the creation of many data streams over a single connection.
Optional
transportlibp2p transport manager configuration
Optional
transportsTransports are low-level communication channels
Optional
connectionA ConnectionProtector can be used to create a secure overlay on top of the network using pre-shared keys
Optional
metricsA Metrics implementation can be supplied to collect metrics on this node
For Libp2p configurations and modules details read the Configuration Document.