Add libp2p-kad -> randomWalk

This commit is contained in:
Jaco Greeff 2018-09-07 16:10:43 +02:00
parent 65a25cd433
commit 0dca6f6f09
2 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,12 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class LibP2pKadDht {
readonly isStarted: boolean;
randomWalk: {
start (queries?: number, period?: number, maxTimeout?: number): void;
stop (): void;
}
}
declare module 'libp2p-kad-dht' {

View File

@ -63,6 +63,8 @@ declare namespace LibP2p {
}
declare class LibP2p {
readonly _dht: LibP2pKadDht;
constructor (options: LibP2p.Options);
dial (peerInfo: PeerInfo, cb: (error: Error | null) => any): void;