Saltar al contenido principal

cfx_getStatus

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 bestHash
    type : string
    Pattern : ^0x[0-9,a-f,A-F]{64}$
  • blockNumber blockNumber
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • chainId chainId
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • epochNumber epochNumber
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • ethereumSpaceChainId ethereumSpaceChainId
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • latestCheckpoint latestCheckpoint
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • latestConfirmed latestConfirmed
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • latestFinalized latestFinalized
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • latestState latestState
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • networkId networkId
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • pendingTxNumber pendingTxNumber
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$

Example

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"
}