Type alias PresenceGraph

PresenceGraph: {
    localPeer: Peer;
    remotePeers: Peer[];
    underlyingCBOR?: Uint8Array;
}

Represents the Ditto mesh network of peers and their connections between each other. The localPeer is the entry point, all others are remote peers known by the local peer (either directly or via other remote peers).

Type declaration

  • localPeer: Peer

    Returns the local peer (usually the peer that is represented by the currently running Ditto instance). The localPeer is the entry point, all others are remote peers known by the local peer (either directly or via other remote peers).

  • remotePeers: Peer[]

    Returns all remote peers known by the localPeer, either directly or via other remote peers.

  • Optional underlyingCBOR?: Uint8Array

    Returns the underlying CBOR data if the presence graph has been initialized with CBOR. All of Ditto API returning a presence graph has this property set.