Join AWS, Dust Labs & OrangeDAO at QuickPitch. Win $80k — Apply Today.

Contents

eth-v1-beacon-headers REST API Endpoint

Parameters:

  1. slot - 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
  2. parent_root - 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 - An array with the following fields:

    root - string - The corresponding root

    canonical - boolean - The head in node's view

    header - array - The SignedBeaconBlockHeader object envelope from the CL spec

    message - array - The BeaconBlockHeader object from the CL spec

    slot - string - The slot to which this block corresponds

    proposer_index - string - The index of validator in validator registry

    parent_root - string - The signing merkle root of the parent BeaconBlock

    state_root - string - The tree hash merkle root of the BeaconState for the BeaconBlock

    body_root - string - The tree hash merkle root of the BeaconBlockBody for the BeaconBlock

    signature - string - The signature

Code Examples:

require "uri"
require "net/http"

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

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