AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.
Start building today!
Parameters:
Returns:
index - String - The index of validator in validator registry
balance - String - The current validator balance in gwei
status -
String - The possible values for status:
pending_initialized - When the first deposit is processed, but not enough funds are available (or not yet the end of the first epoch) to get validator into the activation queue
pending_queued - When validator is waiting to get activated, and have enough funds etc. while in the queue, validator activation epoch keeps changing until it gets to the front and make it through (finalization is a requirement here too)
active_ongoing - When validator must be attesting, and have not initiated any exit
active_exiting - When validator is still active, but filed a voluntary request to exit
active_slashed - When validator is still active, but have a slashed status and is scheduled to exit
exited_unslashed - When validator has reached reguler exit epoch, not being slashed, and doesn't have to attest any more, but cannot withdraw yet
exited_slashed - When validator has reached reguler exit epoch, but was slashed, have to wait for a longer withdrawal period
withdrawal_possible - After validator has exited, a while later is permitted to move funds, and is truly out of the system
withdrawal_done - (not possible in phase0, except slashing full balance) actually having moved funds away
Validator status specification
validator - The object with the following fields:
pubkey - string - The validator's BLS public key, uniquely identifying them. _48-bytes, hex encoded with 0x prefix, case insensitive
withdrawal_crendetials - String - The root of withdrawal credentials
effective_balance - String - The balance at stake in Gwei
slashed - String - The validator is slashed (not longer active) or not
activation_elgibility_epoch - String - When criteria for activation were met
activation_epoch - String - Epoch when validator activated. FAR_FUTURE_EPOCH if not activated
exit_epoch - String - Epoch when validator exited
withdrawable_epoch - String - When validator can withdraw or transfer funds. FAR_FUTURE_EPOCH if not defined
Code Examples:
import requests url = "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/states/head/validators/0xa263cec6f692c3f2a4edcbf7b791634ae964ae959e2dfab032cbe9234004ca34b02015ede753db15bd98bd12e3cd039b" payload={} headers = { 'accept': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
curl -X GET \ "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/states/head/validators/0xa263cec6f692c3f2a4edcbf7b791634ae964ae959e2dfab032cbe9234004ca34b02015ede753db15bd98bd12e3cd039b" \ -H "accept: application/json"
var myHeaders = new Headers(); myHeaders.append("accept", "application/json"); var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' }; fetch("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/states/head/validators/0xa263cec6f692c3f2a4edcbf7b791634ae964ae959e2dfab032cbe9234004ca34b02015ede753db15bd98bd12e3cd039b", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
require "uri" require "net/http" url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/states/head/validators/0xa263cec6f692c3f2a4edcbf7b791634ae964ae959e2dfab032cbe9234004ca34b02015ede753db15bd98bd12e3cd039b") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Get.new(url) request["accept"] = "application/json" response = https.request(request) puts response.read_body