Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the 'query' endpoint #36

Closed
jacobheun opened this issue Aug 13, 2020 · 0 comments · Fixed by #37
Closed

Add support for the 'query' endpoint #36

jacobheun opened this issue Aug 13, 2020 · 0 comments · Fixed by #37
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@jacobheun
Copy link
Contributor

The query endpoint on the IPFS api allows you to find the closest peers on the network to a given PeerId. We should leverage this to implement the getClosestPeers function with a matching api to the dht's method, https://github.com/libp2p/js-libp2p-kad-dht/blob/v0.20.1/src/peer-routing/index.js#L209.

This will allow nodes using delegate routers to find their closest peers on the network and connect to them, so that they can learn its addresses. This is critical for peers to be able to find one another via the dht.

Relates to libp2p/js-libp2p#704

@jacobheun jacobheun added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant