# Is there a way to see what hashes does a peer have?

**URL:** <https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427>\
**Category:** Help\
**Created:** [March 28, 2018, 7:55am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427 "2018-03-28T07:55:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon31033642](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@anon31033642](https://discuss.ipfs.tech/u/anon31033642)\
**Post date:** [March 28, 2018, 7:55am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/1 "2018-03-28T07:55:02Z")

</div>

Hi!! I’m new to IPFS, just toying and learning. I’ve found that I can connect to a peer from the peer list, but once connected, I don’t know what else to do! Is it possible to see “what they have”? or the only way to access a content is to _directly_ know the hash of it (and what it has)?

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/josselinchevalay/32/3078_2.png) [@josselinchevalay](https://discuss.ipfs.tech/u/josselinchevalay)\
**Post date:** [March 28, 2018, 9:26am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/2 "2018-03-28T09:26:51Z")

</div>

hello ,

with pubsub experimental feature you can send a direct message for example you can see ipfs-shipyard/pubsub-room on github. I’m not sure you can access for example DHT. if you need know if a peer know a CID you can use findprovs : [https://ipfs.io/docs/commands/#ipfs-dht-findprovs](https://ipfs.io/docs/commands/#ipfs-dht-findprovs)

Regards

---

<div class="post-metadata">

**Author:** ![anon31033642](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@anon31033642](https://discuss.ipfs.tech/u/anon31033642)\
**Post date:** [March 28, 2018, 9:28am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/3 "2018-03-28T09:28:13Z")

</div>

Thanks for the info!! I’ve tried the pubsub function… yet to find another (simmilar) problem… how to find pubs to subscribe? ahaha 😛

Also I guess it’s because how young IPFS is, but it’s difficult to find content to experiment…

Still there’s no way to find out what files do other peers have? Also, it’d be cool to know if there are repositories or if DHS could be accessed to find out contents out there.

Thanks for the help!!

---

<div class="post-metadata">

**Author:** ![JayBrown](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jaybrown/32/107_2.png) [@JayBrown](https://discuss.ipfs.tech/u/JayBrown)\
**Post date:** [March 28, 2018, 11:05am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/4 "2018-03-28T11:05:42Z")

</div>

> [@anon31033642](#):
>
> Still there’s no way to find out what files do other peers have?

Afaik that’s not possible. You can find out which nodes have a certain file (i.e. hash), as @josselinchevalay said above (`dht findprovs`), but listing any and all files on a remote node is not possible, I believe.

---

<div class="post-metadata">

**Author:** ![VictorBjelkholm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/victorbjelkholm/32/10_2.png) [@VictorBjelkholm](https://discuss.ipfs.tech/u/VictorBjelkholm)\
**Post date:** [March 28, 2018, 11:14am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/5 "2018-03-28T11:14:28Z")

</div>

Yeah, there is no way to ask a peer for what content they have. The closest you can get is to listen to the debug output of go-ipfs (since peers usually announce what content they have) and then build a index of your own. AFAIK, that’s what ipfs-search did to index the DHT. But that’s not neither very user-friendly to setup (you need to write code to parse the debug output of the go-ipfs daemon) or reliable since not all content is announced (content added with `--local` flag doesn’t get announced for example).

The general idea with IPFS is that you should now what content to request somehow. How this exactly works, depends on your application. To give you an idea, let’s imagine a Twitter application on IPFS. For every tweet the user does, a object with the content gets added to IPFS and the application then adds that hash to the users list of posts they have done. This list could be published under the nodes IPNS address, and then other peers can first make a query to the IPNS address to get the list of tweets, then iterate through the list of tweets and resolve them to show in the UI.

Furthermore, to discover the IPNS address, users could either share their list of other users they follow, so once you find a initial user, the rest of the users would be discovered via them. To find the initial user, doing gossip over pubsub could be one way, having a centralized rendezvous server could be another.

> how to find pubs to subscribe?

This happens automatically when you start the daemon with pubsub activated. You just need to listen to the same topic someone is publishing to, to receive the messages. But the connection itself happens automatically.

If you just want some sample data to play around with, [https://archives.ipfs.io/](https://archives.ipfs.io/) would be a good starting point.

---

<div class="post-metadata">

**Author:** ![anon31033642](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@anon31033642](https://discuss.ipfs.tech/u/anon31033642)\
**Post date:** [March 28, 2018, 11:27am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/6 "2018-03-28T11:27:49Z")

</div>

Thaks! I was suspecting it, but had to ask just to make sure I wasn’t missing anything…

Hence, “content-finding” must be based on people voluntarily, publicly sharing hashes, right?

I know I am a total noob into the community, but the possibility to “explore the network” would be great. Might work on it if I get good enough 😛

> [@VictorBjelkholm](#):
>
> If you just want some sample data to play around with, [https://archives.ipfs.io/](https://archives.ipfs.io/) would be a good starting point.

thank you @VictorBjelkholm !!!

---

<div class="post-metadata">

**Author:** ![VictorBjelkholm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/victorbjelkholm/32/10_2.png) [@VictorBjelkholm](https://discuss.ipfs.tech/u/VictorBjelkholm)\
**Post date:** [March 28, 2018, 11:33am UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/7 "2018-03-28T11:33:24Z")

</div>

> Hence, “content-finding” must be based on people voluntarily, publicly sharing hashes, right?

Basically, yeah. But applications can work around it with the various methods involving pubsub and IPNS if wanted. But the basic idea is that it’s voluntarily sharing the address for the content.

---

<div class="post-metadata">

**Author:** ![anon31033642](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@anon31033642](https://discuss.ipfs.tech/u/anon31033642)\
**Post date:** [April 3, 2018, 2:54pm UTC](https://discuss.ipfs.tech/t/is-there-a-way-to-see-what-hashes-does-a-peer-have/2427/8 "2018-04-03T14:54:24Z")

</div>

@VictorBjelkholm Thank you for the input, even if late!! sorry!!
