I am wanting to leverage the IPFS DHT (and existing nodes) with as little of the rest of the IPFS infrastructure as possible. Specifically, I want to use
go-libp2p-kad-dht to “provide” a cid I have made to the existing network, and then be able to find providers on it later. I don’t want an IPFS filestore I would love to stay only in the libp2p libs if I can. I also want to use my own transport impl, but that bit of information is unimportant for this question.
I have created libp2p host w/ random identity, default peer store, etc and used that and a simple map datastore to instantiate the DHT. Of course, when I attempt to broadcast a provided CID, I get told there are no peers. When calling Bootstrap I see nothing happening and I know based on my own personal Kademlia impls that I need at least one peer hardcoded.
I am finding very little information on doing this. Can anyone help w/ a simple set of code for instantiating a DHT on the existing IPFS DHT and providing a CID? Where are the bootstrap nodes hardcoded? Do I need to set them in my “peerstore” before constructing the DHT? Any help is appreciated as wading through just the libp2p code and/or the ipfs core code is taking me a lot of time right now. Even the test cases which make local peers aren’t really helping me with starting a bootstrap (some use private APIs anyways).
Also, please move this to the proper category if this is not it. Or please let me know a better way to get assistance on a simple DHT setup. Thanks in advance.