cURL
curl --request POST \
--url https://api.example.com/next_light_client_block \
--header 'Content-Type: application/json' \
--data '
{
"method": "next_light_client_block",
"params": {
"last_block_hash": "<string>"
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'next_light_client_block',
params: {last_block_hash: '<string>'},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/next_light_client_block', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/next_light_client_block"
payload = {
"method": "next_light_client_block",
"params": { "last_block_hash": "<string>" },
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"approvals_after_next": [
"<string>"
],
"inner_lite": {
"block_merkle_root": "<string>",
"epoch_id": "<string>",
"height": 1,
"next_bp_hash": "<string>",
"next_epoch_id": "<string>",
"outcome_root": "<string>",
"prev_state_root": "<string>",
"timestamp": 1,
"timestamp_nanosec": "<string>"
},
"inner_rest_hash": "<string>",
"next_block_inner_hash": "<string>",
"next_bps": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"prev_block_hash": "<string>"
},
"id": "<string>",
"jsonrpc": "<string>"
}Post next light client block
Returns the next light client block.
POST
/
next_light_client_block
cURL
curl --request POST \
--url https://api.example.com/next_light_client_block \
--header 'Content-Type: application/json' \
--data '
{
"method": "next_light_client_block",
"params": {
"last_block_hash": "<string>"
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'next_light_client_block',
params: {last_block_hash: '<string>'},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/next_light_client_block', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/next_light_client_block"
payload = {
"method": "next_light_client_block",
"params": { "last_block_hash": "<string>" },
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"approvals_after_next": [
"<string>"
],
"inner_lite": {
"block_merkle_root": "<string>",
"epoch_id": "<string>",
"height": 1,
"next_bp_hash": "<string>",
"next_epoch_id": "<string>",
"outcome_root": "<string>",
"prev_state_root": "<string>",
"timestamp": 1,
"timestamp_nanosec": "<string>"
},
"inner_rest_hash": "<string>",
"next_block_inner_hash": "<string>",
"next_bps": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"prev_block_hash": "<string>"
},
"id": "<string>",
"jsonrpc": "<string>"
}Body
application/json
Available options:
next_light_client_block Show child attributes
Show child attributes
JSON-RPC request id. Auto-populated; can be any string.
JSON-RPC protocol version. Always 2.0.
Available options:
2.0 Response
200 - application/json
- JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcLightClientNextBlockError
- JsonRpcResponse_for_RpcLightClientNextBlockResponse_and_RpcLightClientNextBlockError
Was this page helpful?