Documentation
¶
Index ¶
- func ApiEpochV1(w http.ResponseWriter, r *http.Request)
- func ApiValidatorByEth1AddressV1(w http.ResponseWriter, r *http.Request)
- func ApiValidatorDepositsV1(w http.ResponseWriter, r *http.Request)
- func ApiValidatorGetV1(w http.ResponseWriter, r *http.Request)
- func ApiValidatorPostV1(w http.ResponseWriter, r *http.Request)
- func ApiWithdrawalCredentialsValidatorsV1(w http.ResponseWriter, r *http.Request)
- func SendOKResponse(j *json.Encoder, route string, data []interface{})
- type APIEpochResponseV1
- type ApiResponse
- type ApiValidatorDepositsResponseV1
- type ApiValidatorEth1ResponseV1
- type ApiValidatorResponseV1
- type ApiWithdrawalCredentialsResponseV1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiEpochV1 ¶
func ApiEpochV1(w http.ResponseWriter, r *http.Request)
ApiEpoch godoc @Summary Get epoch by number, latest, finalized @Tags Epoch @Description Returns information for a specified epoch by the epoch number or an epoch tag (can be latest or finalized) @Produce json @Param epoch path string true "Epoch number, the string latest or the string finalized" @Success 200 {object} ApiResponse{data=APIEpochResponseV1} "Success" @Failure 400 {object} ApiResponse "Failure" @Failure 500 {object} ApiResponse "Server Error" @Router /api/v1/epoch/{epoch} [get]
func ApiValidatorByEth1AddressV1 ¶
func ApiValidatorByEth1AddressV1(w http.ResponseWriter, r *http.Request)
ApiValidatorByEth1Address godoc @Summary Get all validators that belong to an eth1 address @Tags Validator @Produce json @Param eth1address path string true "Eth1 address from which the validator deposits were sent". @Param limit query string false "Limit the number of results (default: 2000)" @Param offset query string false "Offset the results (default: 0)" @Success 200 {object} ApiResponse{data=[]ApiValidatorEth1ResponseV1} @Failure 400 {object} ApiResponse @Router /api/v1/validator/eth1/{eth1address} [get]
func ApiValidatorDepositsV1 ¶ added in v1.16.0
func ApiValidatorDepositsV1(w http.ResponseWriter, r *http.Request)
ApiValidatorDepositsV1 godoc @Summary Get validator execution layer deposits @Description Get all eth1 deposits for up to 100 validators @Tags Validators @Produce json @Param indexOrPubkey path string true "Up to 100 validator indicesOrPubkeys, comma separated" @Success 200 {object} types.ApiResponse{data=[]types.ApiValidatorDepositsResponseV1} @Failure 400 {object} types.ApiResponse @Router /api/v1/validator/{indexOrPubkey}/deposits [get]
func ApiValidatorGetV1 ¶
func ApiValidatorGetV1(w http.ResponseWriter, r *http.Request)
ApiValidator godoc @Summary Get up to 100 validators @Tags Validator @Description Searching for too many validators based on their pubkeys will lead to a "URI too long" error @Produce json @Param indexOrPubkey path string true "Up to 100 validator indicesOrPubkeys, comma separated" @Success 200 {object} ApiResponse{data=[]ApiValidatorResponseV1} @Failure 400 {object} ApiResponse @Router /api/v1/validator/{indexOrPubkey} [get]
func ApiValidatorPostV1 ¶
func ApiValidatorPostV1(w http.ResponseWriter, r *http.Request)
ApiValidator godoc @Summary Get up to 100 validators @Tags Validator @Description This POST endpoint exists because the GET endpoint can lead to a "URI too long" error when searching for too many validators based on their pubkeys. @Produce json @Param indexOrPubkey body types.DashboardRequest true "Up to 100 validator indicesOrPubkeys, comma separated" @Success 200 {object} ApiResponse{data=[]ApiValidatorResponseV1} @Failure 400 {object} ApiResponse @Router /api/v1/validator [post]
func ApiWithdrawalCredentialsValidatorsV1 ¶
func ApiWithdrawalCredentialsValidatorsV1(w http.ResponseWriter, r *http.Request)
ApiWithdrawalCredentialsValidators godoc @Summary Get all validators that have a specific withdrawal credentials @Tags Validator @Produce json @Param withdrawalCredentialsOrEth1address path string true "Provide a withdrawal credential or an eth1 address with an optional 0x prefix". It can also be a valid ENS name. @Param limit query int false "Limit the number of results, maximum: 200" default(10) @Param offset query int false "Offset the number of results" default(0) @Success 200 {object} ApiResponse{data=[]ApiWithdrawalCredentialsResponseV1} @Failure 400 {object} ApiResponse @Router /api/v1/validator/withdrawalCredentials/{withdrawalCredentialsOrEth1address} [get]
func SendOKResponse ¶
Types ¶
type APIEpochResponseV1 ¶
type APIEpochResponseV1 struct {
Epoch uint64 `json:"epoch"`
Ts uint64 `json:"ts"`
AttestationsCount uint64 `json:"attestationscount"`
AttesterSlashingsCount uint64 `json:"attesterslashingscount"`
AverageValidatorBalance uint64 `json:"averagevalidatorbalance"`
BlocksCount uint64 `json:"blockscount"`
DepositsCount uint64 `json:"depositscount"`
EligibleEther uint64 `json:"eligibleether"`
Finalized bool `json:"finalized"`
GlobalParticipationRate uint64 `json:"globalparticipationrate"`
MissedBlocks uint64 `json:"missedblocks"`
OrphanedBlocks uint64 `json:"orphanedblocks"`
ProposedBlocks uint64 `json:"proposedblocks"`
ProposerSlashingsCount uint64 `json:"proposerslashingscount"`
ScheduledBlocks uint64 `json:"scheduledblocks"`
TotalValidatorBalance uint64 `json:"totalvalidatorbalance"`
ValidatorsCount uint64 `json:"validatorscount"`
VoluntaryExitsCount uint64 `json:"voluntaryexitscount"`
VotedEther uint64 `json:"votedether"`
RewardsExported uint64 `json:"rewards_exported"`
WithdrawalCount uint64 `json:"withdrawalcount"`
}
type ApiResponse ¶
type ApiResponse struct {
Status string `json:"status"`
Data interface{} `json:"data"`
}
type ApiValidatorDepositsResponseV1 ¶ added in v1.16.0
type ApiValidatorDepositsResponseV1 struct {
Amount uint64 `json:"amount"`
BlockNumber uint64 `json:"block_number"`
BlockTS uint64 `json:"block_ts"`
FromAddress string `json:"from_address"`
MerkleTreeIndex string `json:"merkletree_index"`
PublicKey string `json:"publickey"`
Removed bool `json:"removed"`
Signature string `json:"signature"`
TxHash string `json:"tx_hash"`
TxIndex uint64 `json:"tx_index"`
TxInput string `json:"tx_input"`
ValidSignature bool `json:"valid_signature"`
WithdrawalCredentials string `json:"withdrawal_credentials"`
}
type ApiValidatorResponseV1 ¶
type ApiValidatorResponseV1 struct {
Activationeligibilityepoch uint64 `json:"activationeligibilityepoch"`
Activationepoch uint64 `json:"activationepoch"`
Balance uint64 `json:"balance"`
Effectivebalance uint64 `json:"effectivebalance"`
Exitepoch uint64 `json:"exitepoch"`
Isonline bool `json:"isonline"`
Name string `json:"name"`
Pubkey string `json:"pubkey"`
Slashed bool `json:"slashed"`
Status string `json:"status"`
Validatorindex uint64 `json:"validatorindex"`
Withdrawableepoch uint64 `json:"withdrawableepoch"`
Withdrawalcredentials string `json:"withdrawalcredentials"`
}