Documentation
    Preparing search index...

    Interface IRelayAPI

    Interface representing the Relay API, providing control and information about the GossipSub protocol.

    interface IRelayAPI {
        getMeshPeers: (topic?: string) => string[];
        gossipSub: GossipSub;
        pubsubTopics: Set<string>;
        start: () => Promise<void>;
        stop: () => Promise<void>;
        waitForPeers: () => Promise<void>;
    }
    Index

    Properties

    getMeshPeers: (topic?: string) => string[]

    Function to retrieve the mesh peers for a given topic or all topics if none is specified. Returns an array of peer IDs as strings.

    gossipSub: GossipSub

    The GossipSub instance used for managing pub/sub behavior.

    pubsubTopics: Set<string>
    start: () => Promise<void>

    Function to start the relay, returning a Promise that resolves when initialization is complete.

    stop: () => Promise<void>
    waitForPeers: () => Promise<void>