We're now supporting Polygon zkEVM!
Learn more here.

Contents

eth-v1-beacon-states-{state_id}-sync_committees REST API Endpoint

Parameters:

  1. state_id - string - The state identifier. It can be one of: head (canonical head in node's view), genesis, finalized, justified, slot and stateRoot (hex encoded stateRoot with 0x prefix)
  2. epoch - string - The fetch sync committees for the given epoch. If not present then the sync committees for the epoch of the state will be obtained

Returns:

  1. execution_optimistic - Boolean - It's true if the response references an unverified execution payload. The optimistic information may be invalidated at a later time. If the field is not present, assume the false value
  2. data - The object with the following values:

    validators - array - All of the validator indices in the current sync committee

    validator_aggregate - array - The subcommittee slices of the current sync committee

Code Examples:

require "uri"
require "net/http"

url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/eth/v1/beacon/states/head/sync_committees")

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
Ready to get started? Create a free account