A class with predefined helpers, to be used as a base to implement Waku Protocols.

Hierarchy

Constructors

  • Parameters

    • multicodec: string
    • peerStore: PeerStore
    • getConnections: ((peerId?: PeerId) => Connection[])
        • (peerId?: PeerId): Connection[]
        • Parameters

          • Optional peerId: PeerId

          Returns Connection[]

    Returns BaseProtocol

Properties

getConnections: ((peerId?: PeerId) => Connection[])

Type declaration

    • (peerId?: PeerId): Connection[]
    • Parameters

      • Optional peerId: PeerId

      Returns Connection[]

multicodec: string
peerStore: PeerStore

Methods

  • Parameters

    • Optional peerId: PeerId

    Returns Promise<Peer>

  • Parameters

    • peer: Peer

    Returns Promise<Stream>

  • Returns known peers from the address book (libp2p.peerStore) that support the class protocol. Waku may or may not be currently connected to these peers.

    Returns Promise<Peer[]>

Generated using TypeDoc