Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
feat: peer-discovery not using peer-info
Browse files Browse the repository at this point in the history
BREAKING CHANGE: peer-discovery emits object with id and multiaddrs properties
  • Loading branch information
vasco-santos authored and jacobheun committed Apr 21, 2020
1 parent afc2aa6 commit 5792b13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/peer-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

0 comments on commit 5792b13

Please sign in to comment.