erigon
erigon copied to clipboard
Caplin: Add POST `/eth/v1/beacon/states/{state_id}/validator_balances` to the Beacon API
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