Documentation
    Preparing search index...

    Class PeerkitRelayBuilder

    Builds a PeerkitRelay.

    networkAccessHandler is required; everything else is optional and can be supplied via the fluent setters before calling build.

    const relay = await new PeerkitRelayBuilder(async () => true)
    .withId("relay")
    .withAddresses(["0.0.0.0:4001"])
    .build();
    Index

    Constructors

    Properties

    addresses?: string[]
    agentsReceivedObserver?: (agentIds: string[]) => void
    agentStore?: IAgentStore
    id?: string
    networkAccessBytes?: NetworkAccessBytes
    networkAccessHandler: NetworkAccessHandler
    peerConnectedObserver?: (nodeId: string) => void
    peerDisconnectedObserver?: (nodeId: string) => void
    publicIp?: string
    relayTransportFactory?: PeerkitRelayTransportFactory

    Methods

    • Parameters

      • addresses: string[]

      Returns this

    • Parameters

      • fn: (agentIds: string[]) => void

      Returns this

    • Parameters

      • id: string

      Returns this

    • Parameters

      • fn: (nodeId: string) => void

      Returns this

    • Parameters

      • fn: (nodeId: string) => void

      Returns this

    • Parameters

      • ip: string

      Returns this