cfx_getStatus
- CURL
curl --request POST \
     --url https://main.confluxrpc.com \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [],
  "method": "cfx_getStatus"
}'
Result
Schema
type : object
- bestHash bestHashtype : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
- blockNumber blockNumbertype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- chainId chainIdtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- epochNumber epochNumbertype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- ethereumSpaceChainId ethereumSpaceChainIdtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- latestCheckpoint latestCheckpointtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- latestConfirmed latestConfirmedtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- latestFinalized latestFinalizedtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- latestState latestStatetype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- networkId networkIdtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
- pendingTxNumber pendingTxNumbertype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
Example
- cfx_getStatus
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "cfx_getStatus",
    "params": []
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
{
  "bestHash": "0xe2410e6ee0129c23d5184a88c76fa47fbc785fa55638d02de084fe992347e2e3",
  "blockNumber": "0x554667e",
  "chainId": "0x1",
  "epochNumber": "0x4351317",
  "ethereumSpaceChainId": "0x47",
  "latestCheckpoint": "0x433bea0",
  "latestConfirmed": "0x43512db",
  "latestFinalized": "0x43510d4",
  "latestState": "0x4351313",
  "networkId": "0x1",
  "pendingTxNumber": "0xad4"
}