Validators

Validators queries all validators that match the given status.

When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set.

GEThttps://agoric.nownodes.io/cosmos/staking/v1beta1/validators
Query parameters
Response

A successful response.

Body
validatorsarray of object

validators contains all the queried validators.

paginationobject

pagination defines the pagination in the response.

Request
const response = await fetch('https://agoric.nownodes.io/cosmos/staking/v1beta1/validators', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "validators": [
    {
      "operator_address": "text",
      "consensus_pubkey": {
        "type_url": "text",
        "value": "Ynl0ZXM="
      },
      "jailed": false,
      "status": "BOND_STATUS_UNSPECIFIED",
      "tokens": "text",
      "delegator_shares": "text",
      "description": {
        "moniker": "text",
        "identity": "text",
        "website": "text",
        "security_contact": "text",
        "details": "text"
      },
      "unbonding_height": "text",
      "unbonding_time": "2024-09-20T00:39:37.088Z",
      "commission": {
        "commission_rates": {
          "rate": "text",
          "max_rate": "text",
          "max_change_rate": "text"
        },
        "update_time": "2024-09-20T00:39:37.088Z"
      },
      "min_self_delegation": "text",
      "unbonding_on_hold_ref_count": "text",
      "unbonding_ids": [
        "text"
      ]
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

Validator queries validator info for given validator address.

GEThttps://agoric.nownodes.io/cosmos/staking/v1beta1/validators/{validator_addr}
Path parameters
validator_addr*string

validator_addr defines the validator address to query for.

Response

A successful response.

Body
validatorobject

Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate.

Request
const response = await fetch('https://agoric.nownodes.io/cosmos/staking/v1beta1/validators/{validator_addr}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "validator": {
    "operator_address": "text",
    "consensus_pubkey": {
      "type_url": "text",
      "value": "Ynl0ZXM="
    },
    "jailed": false,
    "status": "BOND_STATUS_UNSPECIFIED",
    "tokens": "text",
    "delegator_shares": "text",
    "description": {
      "moniker": "text",
      "identity": "text",
      "website": "text",
      "security_contact": "text",
      "details": "text"
    },
    "unbonding_height": "text",
    "unbonding_time": "2024-09-20T00:39:37.088Z",
    "commission": {
      "commission_rates": {
        "rate": "text",
        "max_rate": "text",
        "max_change_rate": "text"
      },
      "update_time": "2024-09-20T00:39:37.088Z"
    },
    "min_self_delegation": "text",
    "unbonding_on_hold_ref_count": "text",
    "unbonding_ids": [
      "text"
    ]
  }
}

Last updated