cURL
curl --request POST \
--url https://api.example.com/validators \
--header 'Content-Type: application/json' \
--data '
{
"method": "validators",
"params": {
"epoch_id": "<string>"
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'validators',
params: {epoch_id: '<string>'},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/validators', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/validators"
payload = {
"method": "validators",
"params": { "epoch_id": "<string>" },
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"current_fishermen": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"current_proposals": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"current_validators": [
{
"account_id": "<string>",
"is_slashed": true,
"num_expected_blocks": 1,
"num_produced_blocks": 1,
"public_key": "<string>",
"shards": [
1
],
"stake": "<string>",
"num_expected_chunks": 0,
"num_expected_chunks_per_shard": [],
"num_expected_endorsements": 0,
"num_expected_endorsements_per_shard": [],
"num_produced_chunks": 0,
"num_produced_chunks_per_shard": [],
"num_produced_endorsements": 0,
"num_produced_endorsements_per_shard": [],
"shards_endorsed": []
}
],
"epoch_height": 1,
"epoch_start_height": 1,
"next_fishermen": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"next_validators": [
{
"account_id": "<string>",
"public_key": "<string>",
"shards": [
1
],
"stake": "<string>"
}
],
"prev_epoch_kickout": [
{
"account_id": "<string>",
"reason": "_UnusedSlashed"
}
],
"validator_reward_paid_prev_epoch": {}
},
"id": "<string>",
"jsonrpc": "<string>"
}Post validators
Queries active validators on the network. Returns details and the state of validation on the blockchain.
POST
/
validators
cURL
curl --request POST \
--url https://api.example.com/validators \
--header 'Content-Type: application/json' \
--data '
{
"method": "validators",
"params": {
"epoch_id": "<string>"
},
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'validators',
params: {epoch_id: '<string>'},
id: 'dontcare',
jsonrpc: '2.0'
})
};
fetch('https://api.example.com/validators', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/validators"
payload = {
"method": "validators",
"params": { "epoch_id": "<string>" },
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"current_fishermen": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"current_proposals": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"current_validators": [
{
"account_id": "<string>",
"is_slashed": true,
"num_expected_blocks": 1,
"num_produced_blocks": 1,
"public_key": "<string>",
"shards": [
1
],
"stake": "<string>",
"num_expected_chunks": 0,
"num_expected_chunks_per_shard": [],
"num_expected_endorsements": 0,
"num_expected_endorsements_per_shard": [],
"num_produced_chunks": 0,
"num_produced_chunks_per_shard": [],
"num_produced_endorsements": 0,
"num_produced_endorsements_per_shard": [],
"shards_endorsed": []
}
],
"epoch_height": 1,
"epoch_start_height": 1,
"next_fishermen": [
{
"account_id": "<string>",
"public_key": "<string>",
"stake": "<string>",
"validator_stake_struct_version": "V1"
}
],
"next_validators": [
{
"account_id": "<string>",
"public_key": "<string>",
"shards": [
1
],
"stake": "<string>"
}
],
"prev_epoch_kickout": [
{
"account_id": "<string>",
"reason": "_UnusedSlashed"
}
],
"validator_reward_paid_prev_epoch": {}
},
"id": "<string>",
"jsonrpc": "<string>"
}Body
application/json
Available options:
validators - RpcValidatorRequest
- RpcValidatorRequest
- RpcValidatorRequest
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
Was this page helpful?
⌘I