[LibP2P] Support for finding a node that should handle a key?


I am trying out libP2P and mainly interested in its DHT.
Following the examples in the repo I have setup 3 nodes, A, B and C, that form a chain (with the DHT config set).

That is, A dials B and B dials C.

Since in a DHT, the identifiers namespace is distributed among the nodes, I would like to use this so as to find to which node should a key be “announced” (using the providers).
The key does not yet exist in the DHT. But still, when storing a key, it should be stored in the proper node.

What I’ve tried

  1. libp2p.dht.put, followed by a libp2p.dht.get which returns only the value (obviously)
  2. libp2p.dht.put, followed by a libp2p.contentRouting.findProviders with the key (that was previously stored using libp2p.dht.put), but getting no providers, since no node has “provided” that key.

Is there support for this functionality?