mirror of
https://github.com/fluencelabs/libp2p-ts
synced 2025-03-31 01:11:04 +00:00
25 lines
560 B
TypeScript
25 lines
560 B
TypeScript
// Type definitions for libp2p-mdns 0.12.0
|
|
// Project: https://github.com/libp2p/js-libp2p-mdns
|
|
// Definitions by: Jaco Greeff <https://github.com/jacogr>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
import PeerInfo = require('peer-info');
|
|
|
|
type Options = {
|
|
broadcast?: boolean,
|
|
interval?: number,
|
|
peerInfo: PeerInfo,
|
|
port?: number,
|
|
serviceTag?: string
|
|
};
|
|
|
|
type Events = 'peer';
|
|
|
|
declare class LibP2pMdns {
|
|
constructor (options: Options);
|
|
|
|
on (event: Events, cb: (peerInfo: PeerInfo) => any): void;
|
|
}
|
|
|
|
export = LibP2pMdns;
|