chore: update types (#87)

This commit is contained in:
Vasco Santos
2021-04-07 09:39:48 +02:00
committed by GitHub
parent b948972c5b
commit 64a478d313
43 changed files with 169 additions and 67 deletions

10
src/peer-routing/types.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
export = PeerRouting;
import PeerId from 'peer-id'
import Multiaddr from 'multiaddr'
declare class PeerRouting {
constructor (options?: Object);
findPeer (peerId: PeerId, options?: Object): Promise<{ id: PeerId, multiaddrs: Multiaddr[] }>;
getClosestPeers(key: Uint8Array, options?: Object): AsyncIterable<{ id: PeerId, multiaddrs: Multiaddr[] }>;
}