/eth/v1/beacon/states/{state_id}/randao

Get the RANDAO mix for some epoch in a specified state.

Get the RANDAO mix from the state specified by state_id for the epoch that has been requested.

The RANDAO mix for the state's current epoch will be returned if an epoch is not given. You can query for any historical value of the RANDAO mix by changing the state_id argument. When blocks are applied, states from the same epoch typically cause the RANDAO mix for that epoch to change.

Example Request and Result for /v1/beacon/states/{state_id}/committees

In this section, we provide an illustrative example of a request made to retrieve details contents using the /v1/beacon/states/{state_id}/randao endpoint. Additionally, we present the resulting response containing information about RANDAO mix for the state's specified epoch.

Parameters

FieldTypeDescription

state_id*

string

State identifier. Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.

Example : head

epoch

string

Epoch to fetch the RANDAO mix for. Default: state's current epoch.

The example in this section uses a non-existing project id.

Make sure you replace it with your Ethereum Holesky Beacon endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Get the RANDAO mix for some epoch in a specified state.

GET https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v1/beacon/states/<state_id>/randao

Path Parameters

NameTypeDescription

state_id*

String

head

Query Parameters

NameTypeDescription

epoch

string

34

{
  "execution_optimistic": true,
  "finalized": false,
  "data": {
    "randao": "0x899712d397262d922996d52a9818e3b647b3ff22d7afe29fb241dfd936e547fb"
  }
}

Curl Request example

curl -X 'GET' \
  'https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v1/beacon/states/head/randao?epoch=34' \
  -H 'accept: application/json'

Last updated