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

Contents

eth-v1-beacon-states-{state_id}-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 committees for the given epoch. If not present then the committees for the epoch of the state will be obtained
  3. index - string - The restrict returned values to those matching the supplied committee index
  4. slot - string - The restrict returned values to those matching the supplied slot

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 - array - A group of validators assigned to attest at specific slot and that have the same committee index (shard in phase 1). It contains the following values:

    index - string - The committee index at a slot

    slot - string - The slot

    validators - array - The list of validator indices assigned to this 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/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