mirror of
https://github.com/fluencelabs/libp2p-ts
synced 2025-04-22 20:32:13 +00:00
23 lines
556 B
TypeScript
23 lines
556 B
TypeScript
|
// Type definitions for libp2p-railing 0.9.1
|
||
|
// Project: https://github.com/libp2p/js-libp2p-railing
|
||
|
// Definitions by: Jaco Greeff <https://github.com/jacogr>
|
||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||
|
|
||
|
import MultiAddr from 'multiaddr';
|
||
|
import PeerInfo from 'peer-info';
|
||
|
|
||
|
type Options = {
|
||
|
list: Array<string | MultiAddr>,
|
||
|
interval?: number
|
||
|
};
|
||
|
|
||
|
type Events = 'peer';
|
||
|
|
||
|
declare class LibP2pRailing {
|
||
|
constructor (options: Options);
|
||
|
|
||
|
on (event: Events, cb: (peerInfo: PeerInfo) => any): void;
|
||
|
}
|
||
|
|
||
|
export default LibP2pRailing;
|