For the complete documentation index, see llms.txt. This page is also available as Markdown.

validators - Cosmos

Example code for the validators JSON-RPC method. Complete guide on how to use validators JSON-RPC in GetBlock Web3 documentation.

Returns the validator set at a specific height. The set is paginated — use page and per_page to traverse beyond the first results.

Parameters

Parameter
Type
Required
Description

height

integer

No

Block height (defaults to latest)

page

integer

No

Page number (default: 1)

per_page

integer

No

Validators per page (default: 30, max: 100)

Request Example

# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/validators' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "validators",
    "params": {
        "height": 23456789,
        "page": 1,
        "per_page": 30
    },
    "id": "getblock.io"
}'

# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/validators?height=23456789&page=1&per_page=30'

Response Example

Response Parameters

Field
Data Type
Description

result.block_height

string

Block height at which the validator set was sampled

result.validators

array

Validator entries

result.validators[].address

string

Validator's consensus address (20 bytes hex)

result.validators[].pub_key.value

string

Base64-encoded Ed25519 public key

result.validators[].voting_power

string

Voting power (proportional to staked ATOM)

result.validators[].proposer_priority

string

Priority for the next block proposer rotation

result.count

string

Number of validators in this page

result.total

string

Total active validators

Use Cases

  • Validator monitoring dashboards

  • Computing total voting power and validator concentration

  • Detecting validator set changes over time

  • Light client validator set verification

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?