Skip to main content

getCurrentLeader

Returns the address of the current leader node for the current consensus round

Parameters

This method does not require any arguments.

ParameterTypeDescription
paramsarrayAn empty array [] as no parameters are required.

Result

ConsensusDataWithBlock Object that holds the inner data and the current block its valid for.

  • Data: Address, (Address of the leader),
  • Block: Number, (block number in which this data is valid for)

Code Sample

 curl "NODE_URL" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 0,
"method": "consensus_getCurrentLeader",
"params": []
}
'

Response

{
"jsonrpc": "2.0",
"id": "0",
"result": {
"data": "0x2124...",
"block": 1243123
}
}