peer/getPeers
Gets (and optionally streams) peers from the node's peer network
Request
{
stream?: boolean
} | undefined
Response
{
peers: Array<{
state: string
identity: string | null
version: number | null
head: string | null
sequence: number | null
work: string | null
agent: string | null
name: string | null
address: string | null
port: number | null
error: string | null
connections: number
connectionWebSocket:
| { type: 'DISCONNECTED' }
| { type: 'CONNECTING' }
| { type: 'REQUEST_SIGNALING' }
| { type: 'SIGNALING' }
| { type: 'WAITING_FOR_IDENTITY' }
| { type: 'CONNECTED'; identity: string }
connectionWebSocketError: string
connectionWebRTC:
| { type: 'DISCONNECTED' }
| { type: 'CONNECTING' }
| { type: 'REQUEST_SIGNALING' }
| { type: 'SIGNALING' }
| { type: 'WAITING_FOR_IDENTITY' }
| { type: 'CONNECTED'; identity: string }
connectionWebRTCError: string
networkId: number | null
genesisBlockHash: string | null
features: {
syncing: boolean
} | null
}>
}