From 0b505b3024374a05465b6a2f94e0df67be3e5732 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 7 Jan 2020 16:37:49 +0100 Subject: [PATCH] chore: peer discovery should emit peer id BREAKING CHANGE: peer discovery event param is a PeerId instance instead of a PeerInfo instance --- src/peer-discovery/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/peer-discovery/README.md b/src/peer-discovery/README.md index 74bb96c6b..69d0582f8 100644 --- a/src/peer-discovery/README.md +++ b/src/peer-discovery/README.md @@ -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).