added readonly peerInfo accessor

This commit is contained in:
Peter Murray 2018-09-17 12:11:48 -04:00
parent e34d4c2a6c
commit 0bd14a8898

View File

@ -67,6 +67,8 @@ declare class LibP2p {
constructor(options: LibP2p.Options); constructor(options: LibP2p.Options);
readonly peerInfo: PeerInfo;
dial(peerInfo: PeerInfo, cb: (error: Error | null) => any): void; dial(peerInfo: PeerInfo, cb: (error: Error | null) => any): void;
dialProtocol(peerInfo: PeerInfo, protocol: string, cb: (error: Error | null, conn?: LibP2pConnection) => any): void; dialProtocol(peerInfo: PeerInfo, protocol: string, cb: (error: Error | null, conn?: LibP2pConnection) => any): void;
handle(protocol: string, handler: (protocol: string, conn: LibP2pConnection) => any, matcher?: (protocol: string, requestedProtocol: string, cb: (error: Error | null, accept: boolean) => void) => any): void; handle(protocol: string, handler: (protocol: string, conn: LibP2pConnection) => any, matcher?: (protocol: string, requestedProtocol: string, cb: (error: Error | null, accept: boolean) => void) => any): void;