Validators

DelegatorValidators queries all validators info for given delegator address.

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/delegators/{delegator_addr}/validators
Path parameters
delegator_addr*string

delegator_addr defines the delegator address to query for.

Query parameters
Response

A successful response.

Body
validatorsarray of object

validators defines the validators' info of a delegator.

paginationobject

pagination defines the pagination in the response.

Request
const response = await fetch('https://agoric.nownodes.io/cosmos/staking/v1beta1/delegators/{delegator_addr}/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-12-21T16:23:42.617Z",
      "commission": {
        "commission_rates": {
          "rate": "text",
          "max_rate": "text",
          "max_change_rate": "text"
        },
        "update_time": "2024-12-21T16:23:42.617Z"
      },
      "min_self_delegation": "text",
      "unbonding_on_hold_ref_count": "text",
      "unbonding_ids": [
        "text"
      ]
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

DelegatorValidator queries validator info for given delegator validator pair.

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

delegator_addr defines the delegator address to query for.

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/delegators/{delegator_addr}/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-12-21T16:23:42.617Z",
    "commission": {
      "commission_rates": {
        "rate": "text",
        "max_rate": "text",
        "max_change_rate": "text"
      },
      "update_time": "2024-12-21T16:23:42.617Z"
    },
    "min_self_delegation": "text",
    "unbonding_on_hold_ref_count": "text",
    "unbonding_ids": [
      "text"
    ]
  }
}

Last updated