An interface representing some way to connect to other peers


The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

This utility class can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

Hierarchy (view full)



channels: {} = {}

Type declaration

    peerId?: PeerId
    peerMetadata?: PeerMetadata
    prefixed: string | boolean


    • Return the listeners registered for a given event.

      Type Parameters


      • event: T

      Returns ((...args) => void)[]

    • Remove all listeners, or those of the specified event.


      • Optional event: keyof NetworkAdapterEvents

      Returns this

    Generated using TypeDoc