Status is the P2P status of a node.

interface P2PStatus {
    addresses: NodeAddress[];
    num_connections: number;
    num_peers: number;
    peer_id: string;
    protocols: {
        [key: string]: number;
    };
    pub_key: Uint8Array;
    topics: {
        [key: string]: number;
    };
}

Properties

addresses: NodeAddress[]

Addresses is a list of configured P2P addresses used when registering the node.

num_connections: number

NumConnections is the number of peer connections.

num_peers: number

NumPeers is the number of connected peers.

peer_id: string

PeerID is the peer ID derived by hashing peer's public key.

protocols: {
    [key: string]: number;
}

Protocols is a set of registered protocols together with the number of connected peers.

pub_key: Uint8Array

PubKey is the public key used for P2P communication.

topics: {
    [key: string]: number;
}

Topics is a set of registered topics together with the number of connected peers.