starknet_syncing
Returns the synchronization status of the node.
Parameters
None.
Returns
A syncing status object containing:
starting_block_hash
: The hash of the block from which the sync started.starting_block_num
: The number of the block from which the sync started.current_block_hash
: The hash of the current block being synchronized.current_block_num
: The number of the current block being synchronized.highest_block_hash
: The hash of the estimated highest block to be synchronized.highest_block_num
: The number of the estimated highest block to be synchronized.
This method returns false
if the node is not currently syncing state.
Example
Replace <YOUR-API-KEY>
with an API key from your Infura dashboard.
Request
- curl
curl https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"starknet_syncing","params":[],"id":0}'
Response
- JSON
{
"jsonrpc": "2.0",
"result": {
"starting_block_hash": "0x3fab5dff46b07a0910cd3e255f53bee8183e1d22fdb48aed4514538ecf733d5",
"starting_block_num": "0x1124",
"current_block_hash": "0x59c29817b8d4f71fd355180aad76785a801d54eb08fdd2945d1eec8c1dfcd0b",
"current_block_num": "0x1199",
"highest_block_hash": "0x59c29817b8d4f71fd355180aad76785a801d54eb08fdd2945d1eec8c1dfcd0b",
"highest_block_num": "0x1199"
},
"id": 0
}