feat: peer-discovery not using peer-info

BREAKING CHANGE: peer-discovery emits object with id and multiaddrs properties
This commit is contained in:
Vasco Santos 2020-04-06 14:43:16 +02:00 committed by Jacob Heun
parent 1bef8d5d78
commit bdd2502ef6

View File

@ -72,4 +72,7 @@ It returns a `Promise`
- `discovery.on('peer', (peerInfo) => {})`
Everytime a peer is discovered by a discovery service, it emmits a `peer` event with the discover peer's [PeerInfo](https://github.com/libp2p/js-peer-info).
Everytime a peer is discovered by a discovery service, it emmits a `peer` event with the discovered peer's information, which must contain the following properties:
- `<`[`PeerId`](https://github.com/libp2p/js-peer-id)`>` `peerInfo.id`
- `<Array<`[`Multiaddr`](https://github.com/multiformats/js-multiaddr)`>>` `peerInfo.multiaddrs`