You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: update examples to 0.28 api
* chore: use libp2p-noise in examples
* chore: examples using multiaddrs property of libp2p
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
* docs: update language around secio in crypto example
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Copy file name to clipboardexpand all lines: examples/discovery-mechanisms/README.md
+25-12
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A Peer Discovery module enables libp2p to find peers to connect to. Think of the
4
4
5
5
With these system, a libp2p node can both have a set of nodes to always connect on boot (bootstraper nodes), discover nodes through locality (e.g connected in the same LAN) or through serendipity (random walks on a DHT).
6
6
7
-
These mechanisms save configuration and enable a node to operate without any explicit dials, it will just work.
7
+
These mechanisms save configuration and enable a node to operate without any explicit dials, it will just work. Once new peers are discovered, their known data is stored in the peer's PeerStore.
8
8
9
9
## 1. Bootstrap list of Peers when booting a node
10
10
@@ -20,7 +20,7 @@ const node = Libp2p.create({
20
20
modules: {
21
21
transport: [ TCP ],
22
22
streamMuxer: [ Mplex ],
23
-
connEncryption: [ SECIO ],
23
+
connEncryption: [ NOISE, SECIO ],
24
24
peerDiscovery: [ Bootstrap ]
25
25
},
26
26
config: {
@@ -55,11 +55,14 @@ Now, once we create and start the node, we can listen for events such as `peer:d
0 commit comments