Interface Transport<DialEvents>

A libp2p transport offers dial and listen methods to establish connections.

interface Transport<DialEvents> {
    [toStringTag]: string;
    [transportSymbol]: true;
    dialFilter: MultiaddrFilter;
    listenFilter: MultiaddrFilter;
    createListener(options): Listener;
    dial(ma, options): Promise<Connection>;
}

Type Parameters

Properties

[toStringTag]: string

Used to identify the transport

[transportSymbol]: true

Used by the isTransport function

dialFilter: MultiaddrFilter

Takes a list of Multiaddrs and returns only addresses that are vali for the transport to dial

listenFilter: MultiaddrFilter

Takes a list of Multiaddrs and returns only addresses that are valid for the transport to listen on

Methods