Closed tabcat closed 1 year ago
Update: we plan to deprecate the interfaces-dht and this will happen as a part of https://github.com/libp2p/js-libp2p/issues/824 But for now, we'll go with #410
@libp2p/interfaces-dht
is too broad in it's attempt to define what a DHT is, instead the types from @libp2p/kad-dht
should be used when a KAD DHT is configured.
The exported QueryEvents type from
@libp2p/interfaces-dht
and@libp2p/kad-dht
are not equal.interface-dht: https://github.com/libp2p/js-libp2p-interfaces/blob/9e86d57645aef67fcbb92b0eea62b40bce66eae6/packages/interface-dht/src/index.ts#L129
kad-dht: https://github.com/libp2p/js-libp2p-kad-dht/blame/2af3a0cad4e718b6bdf3b4a9b114d9f4b4860653/src/index.ts#L149
divergence stems from change in kad-dht https://github.com/libp2p/js-libp2p-kad-dht/pull/472/files