libp2p / js-peer-info

libp2p Peer abstraction Node.js implementation
https://libp2p.io
MIT License
37 stars 28 forks source link

Wrong return type for isConnected #94

Closed robert-cronin closed 4 years ago

robert-cronin commented 4 years ago

The return type for isConnected is set as boolean where it should be set to Multiaddr https://github.com/libp2p/js-peer-info/blob/1b1784610fd7f19712384de14334b46ec0774445/src/index.d.ts#L48

vasco-santos commented 4 years ago

Hello @robert-cronin

Thanks for reporting this. However, in the context of https://github.com/libp2p/js-peer-info/pull/92 we are going to deprecate this module in the next release of js-libp2p.

Briefly, Libp2p will now include all peer-info data per peer in its PeerStore and connection management API will allow libp2p users to check if a peer is connected. This way, we will not need this module anymore.

With the above in mind, we will not work on fixing this here.

robert-cronin commented 4 years ago

okay thank you, I will take a look at PeerStore

vasco-santos commented 4 years ago

FYI: it is on the 0.28.x branch in js-libp2p: https://github.com/libp2p/js-libp2p/tree/0.28.x/src/peer-store