erigon icon indicating copy to clipboard operation
erigon copied to clipboard

Caplin: Add POST `/eth/v1/beacon/states/{state_id}/validator_balances` to the Beacon API

Open Giulio2002 opened this issue 1 year ago • 0 comments

Description

We need to add a new endpoint to the Beacon API that allows for fetching validator balances given a specific state ID. This will be a POST request to provide more flexibility and accommodate future payload requirements.

Endpoint

POST /eth/v1/beacon/states/{state_id}/validator_balances

Parameters

  • state_id (path parameter): The identifier of the state for which the validator balances are to be fetched. This could be a state root, a block root, or a slot number.

Request Body

  • The request body may contain filters or additional parameters to refine the balance retrieval process. Initially, this can be an empty object {}, but we should structure it to support future enhancements.

Specification: https://ethereum.github.io/beacon-APIs/#/Beacon/postStateValidatorBalances

Giulio2002 avatar Jul 05 '24 21:07 Giulio2002