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

Commit

Permalink
chore: peer discovery should emit peer id
Browse files Browse the repository at this point in the history
BREAKING CHANGE: peer discovery event param is a PeerId instance instead of a PeerInfo instance
  • Loading branch information
vasco-santos committed Jan 7, 2020
1 parent 32ee3e1 commit 0b505b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/peer-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ It returns a `Promise`

### discoverying peers

- `discovery.on('peer', (peerInfo) => {})`
- `discovery.on('peer', (peerId) => {})`

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 discover peer's [PeerId](https://github.com/libp2p/js-peer-id).

0 comments on commit 0b505b3

Please sign in to comment.