Improve importing of Muxed Stream type

This commit is contained in:
Franck Royer 2021-07-14 11:38:59 +10:00
parent 2f5e75166f
commit a0d3a21762
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import Libp2p, { Connection, Libp2pModules, Libp2pOptions } from 'libp2p';
import { MuxedStream } from 'libp2p-interfaces/dist/src/stream-muxer/types';
import Mplex from 'libp2p-mplex';
import { bytes } from 'libp2p-noise/dist/src/@types/basic';
import { Noise } from 'libp2p-noise/dist/src/noise';
@ -160,7 +161,7 @@ export class Waku {
* @param peer The peer to dial
*/
async dial(peer: PeerId | Multiaddr | string): Promise<{
stream: import('libp2p-interfaces/src/stream-muxer/types').MuxedStream;
stream: MuxedStream;
protocol: string;
}> {
return this.libp2p.dialProtocol(peer, [RelayCodec, StoreCodec]);