libp2p / js-libp2p-interfaces

Contains test suites and interfaces you can use to implement the various components of js libp2p.
Other
75 stars 28 forks source link

interface-dht and kad-dht QueryEvents type #409

Closed tabcat closed 1 year ago

tabcat commented 1 year ago

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

p-shahi commented 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

achingbrain commented 1 year ago

@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.