Documentation
¶
Index ¶
- func APIConsensusClients(w http.ResponseWriter, r *http.Request)
- func APIDasGuardianMassScan(w http.ResponseWriter, r *http.Request)
- func APIDasGuardianScan(w http.ResponseWriter, r *http.Request)
- func APIExecutionClients(w http.ResponseWriter, r *http.Request)
- func APISlotV1(w http.ResponseWriter, r *http.Request)
- 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 APIConsensusClientMetadata
- type APIConsensusClientNodeInfo
- type APIConsensusClientsResponse
- type APIDasGuardianEvalResult
- type APIDasGuardianMassScanRequest
- type APIDasGuardianMassScanResponse
- type APIDasGuardianMetadata
- type APIDasGuardianScanRequest
- type APIDasGuardianScanResponse
- type APIDasGuardianScanResult
- type APIDasGuardianStatus
- type APIEpochResponseV1
- type APIExecutionClientNodeInfo
- type APIExecutionClientsResponse
- type APIMassNodeResult
- type APISlotData
- type APISlotResponse
- type ApiResponse
- type ApiValidatorDepositsResponseV1
- type ApiValidatorEth1ResponseV1
- type ApiValidatorRequestV1
- type ApiValidatorResponseV1
- type ApiWithdrawalCredentialsResponseV1
- type SlotResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIConsensusClients ¶ added in v1.17.0
func APIConsensusClients(w http.ResponseWriter, r *http.Request)
APIConsensusClients returns consensus client node information as JSON @Summary Get consensus clients information @Description Returns a list of all connected consensus clients with their node information, including PeerDAS support. Sensitive information (PeerID, NodeID, ENR) is only included if ShowSensitivePeerInfos is enabled in the configuration. @Tags clients @Accept json @Produce json @Success 200 {object} APIConsensusClientsResponse @Failure 429 {object} map[string]string "Rate limit exceeded" @Failure 500 {object} map[string]string "Internal server error" @Router /v1/clients/consensus [get]
func APIDasGuardianMassScan ¶ added in v1.18.0
func APIDasGuardianMassScan(w http.ResponseWriter, r *http.Request)
APIDasGuardianMassScan performs a DAS Guardian scan on all available nodes @Summary Scan all nodes using DAS Guardian @Description Performs DAS Guardian scans on all available consensus client nodes in parallel @Tags das-guardian @Accept json @Produce json @Param request body APIDasGuardianMassScanRequest true "Mass scan parameters" @Success 200 {object} APIDasGuardianMassScanResponse @Failure 400 {object} map[string]string "Invalid request" @Failure 429 {object} map[string]string "Rate limit exceeded" @Failure 500 {object} map[string]string "Internal server error" @Router /v1/das-guardian/mass-scan [post]
func APIDasGuardianScan ¶ added in v1.18.0
func APIDasGuardianScan(w http.ResponseWriter, r *http.Request)
APIDasGuardianScan performs a DAS Guardian scan on a given ENR @Summary Scan a node using DAS Guardian @Description Performs a comprehensive scan of a beacon node using eth-das-guardian to check P2P connectivity, fork digest validity, head accuracy, and custody information @Tags das-guardian @Accept json @Produce json @Param request body APIDasGuardianScanRequest true "Node ENR to scan" @Success 200 {object} APIDasGuardianScanResponse @Failure 400 {object} map[string]string "Invalid request" @Failure 429 {object} map[string]string "Rate limit exceeded" @Failure 500 {object} map[string]string "Internal server error" @Router /v1/das-guardian/scan [post]
func APIExecutionClients ¶ added in v1.17.0
func APIExecutionClients(w http.ResponseWriter, r *http.Request)
APIExecutionClients returns execution client node information as JSON @Summary Get execution clients information @Description Returns a list of all connected execution clients with their node information. Sensitive information (IP addresses, ports, enode) is only included if ShowSensitivePeerInfos is enabled in the configuration. @Tags clients @Accept json @Produce json @Success 200 {object} APIExecutionClientsResponse @Failure 429 {object} map[string]string "Rate limit exceeded" @Failure 500 {object} map[string]string "Internal server error" @Router /v1/clients/execution [get]
func APISlotV1 ¶ added in v1.18.0
func APISlotV1(w http.ResponseWriter, r *http.Request)
APISlotV1 returns information about a specific slot by slot number or block root @Summary Get slot information @Description Returns detailed information about a specific slot from the database. Accepts either slot number or block root (0x-prefixed hex) @Tags Slot @Produce json @Param slotOrHash path string true "Slot number or block root (0x-prefixed hex)" @Success 200 {object} APISlotResponse @Failure 400 {object} map[string]string "Invalid slot number or root format" @Failure 404 {object} map[string]string "Slot not found" @Failure 500 {object} map[string]string "Internal server error" @Router /v1/slot/{slotOrHash} [get]
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 /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 /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} api.ApiResponse{data=[]api.ApiValidatorDepositsResponseV1} @Failure 400 {object} api.ApiResponse @Router /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 /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 ApiValidatorRequestV1 true "Up to 100 validator indicesOrPubkeys, comma separated" @Success 200 {object} ApiResponse{data=[]ApiValidatorResponseV1} @Failure 400 {object} ApiResponse @Router /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 /v1/validator/withdrawalCredentials/{withdrawalCredentialsOrEth1address} [get]
func SendOKResponse ¶
Types ¶
type APIConsensusClientMetadata ¶ added in v1.18.0
type APIConsensusClientMetadata struct {
Attnets string `json:"attnets,omitempty"`
Syncnets string `json:"syncnets,omitempty"`
SeqNumber string `json:"seq_number,omitempty"`
CustodyGroupCount string `json:"custody_group_count,omitempty"` // MetadataV3 field for Fulu
}
APIConsensusClientMetadata represents the metadata from the node identity
type APIConsensusClientNodeInfo ¶ added in v1.17.0
type APIConsensusClientNodeInfo struct {
ClientName string `json:"client_name"`
ClientType string `json:"client_type"`
Version string `json:"version"`
PeerID string `json:"peer_id"`
NodeID string `json:"node_id"`
ENR string `json:"enr"`
HeadSlot uint64 `json:"head_slot"`
HeadRoot string `json:"head_root"`
Status string `json:"status"`
PeerCount uint32 `json:"peer_count"`
PeersInbound uint32 `json:"peers_inbound"`
PeersOutbound uint32 `json:"peers_outbound"`
LastRefresh time.Time `json:"last_refresh"`
LastError string `json:"last_error,omitempty"`
SupportsDataColumn bool `json:"supports_data_column"`
ColumnIndexes []uint64 `json:"column_indexes,omitempty"`
Metadata *APIConsensusClientMetadata `json:"metadata,omitempty"`
}
APIConsensusClientNodeInfo represents the response structure for consensus client node info
type APIConsensusClientsResponse ¶ added in v1.17.0
type APIConsensusClientsResponse struct {
Clients []APIConsensusClientNodeInfo `json:"clients"`
Count int `json:"count"`
}
APIConsensusClientsResponse represents the full API response
type APIDasGuardianEvalResult ¶ added in v1.18.0
type APIDasGuardianEvalResult struct {
NodeID string `json:"node_id"`
Slots []uint64 `json:"slots"`
ColumnIdx []uint64 `json:"column_idx"`
DownloadedResult [][]string `json:"downloaded_result"`
ValidKzg [][]string `json:"valid_kzg"`
ValidColumn [][]bool `json:"valid_column"`
ValidSlot []bool `json:"valid_slot"`
Error string `json:"error,omitempty"`
}
APIDasGuardianEvalResult represents the DAS evaluation results
type APIDasGuardianMassScanRequest ¶ added in v1.18.0
type APIDasGuardianMassScanRequest struct {
Slots []uint64 `json:"slots,omitempty"` // Optional slot numbers to scan
RandomMode string `json:"random_mode,omitempty"` // Random slot selection mode: "non_missed", "with_blobs", "available"
RandomCount int32 `json:"random_count,omitempty"` // Number of random slots to select (default: 4)
}
APIDasGuardianMassScanRequest represents the request body for mass DAS Guardian scan
type APIDasGuardianMassScanResponse ¶ added in v1.18.0
type APIDasGuardianMassScanResponse struct {
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Slots []uint64 `json:"slots,omitempty"` // The slots that were scanned
Results map[string]*APIMassNodeResult `json:"results,omitempty"` // ENR -> node result
}
APIDasGuardianMassScanResponse represents the response from mass DAS Guardian scan
type APIDasGuardianMetadata ¶ added in v1.18.0
type APIDasGuardianMetadata struct {
SeqNumber uint64 `json:"seq_number"`
Attnets string `json:"attnets"`
Syncnets string `json:"syncnets"`
CustodyGroupCount uint64 `json:"custody_group_count"`
}
APIDasGuardianMetadata represents the beacon node metadata
type APIDasGuardianScanRequest ¶ added in v1.18.0
type APIDasGuardianScanRequest struct {
ENR string `json:"enr"`
Slots []uint64 `json:"slots,omitempty"` // Optional slot numbers to scan
RandomMode string `json:"random_mode,omitempty"` // Random slot selection mode: "non_missed", "with_blobs", "available"
RandomCount int32 `json:"random_count,omitempty"` // Number of random slots to select (default: 4)
}
APIDasGuardianScanRequest represents the request body for DAS Guardian scan
type APIDasGuardianScanResponse ¶ added in v1.18.0
type APIDasGuardianScanResponse struct {
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Result *APIDasGuardianScanResult `json:"result,omitempty"`
}
APIDasGuardianScanResponse represents the response from DAS Guardian scan
type APIDasGuardianScanResult ¶ added in v1.18.0
type APIDasGuardianScanResult struct {
// P2P Information
Libp2pInfo map[string]interface{} `json:"libp2p_info"`
// Status Information (from RemoteStatus)
RemoteStatus *APIDasGuardianStatus `json:"remote_status,omitempty"`
// Metadata (from RemoteMetadata)
RemoteMetadata *APIDasGuardianMetadata `json:"remote_metadata,omitempty"`
// DAS Evaluation Result
EvalResult *APIDasGuardianEvalResult `json:"eval_result,omitempty"`
}
APIDasGuardianScanResult represents the scan result details
type APIDasGuardianStatus ¶ added in v1.18.0
type APIDasGuardianStatus struct {
ForkDigest string `json:"fork_digest"`
FinalizedRoot string `json:"finalized_root"`
FinalizedEpoch uint64 `json:"finalized_epoch"`
HeadRoot string `json:"head_root"`
HeadSlot uint64 `json:"head_slot"`
EarliestSlot uint64 `json:"earliest_slot"`
}
APIDasGuardianStatus represents the beacon node status
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 APIExecutionClientNodeInfo ¶ added in v1.17.0
type APIExecutionClientNodeInfo struct {
ClientName string `json:"client_name"`
NodeID string `json:"node_id"`
Enode string `json:"enode"`
IP string `json:"ip"`
Port int `json:"port"`
Version string `json:"version"`
Status string `json:"status"`
LastUpdate time.Time `json:"last_update"`
}
APIExecutionClientNodeInfo represents the response structure for execution client node info
type APIExecutionClientsResponse ¶ added in v1.17.0
type APIExecutionClientsResponse struct {
Clients []APIExecutionClientNodeInfo `json:"clients"`
Count int `json:"count"`
}
APIExecutionClientsResponse represents the full API response
type APIMassNodeResult ¶ added in v1.18.0
type APIMassNodeResult struct {
Success bool `json:"success"`
Error string `json:"error,omitempty"`
NodeAlias string `json:"node_alias,omitempty"`
ValidColumns [][]bool `json:"valid_columns,omitempty"` // Per-slot array of column validity
TotalColumns int `json:"total_columns"` // Total number of columns per slot
SlotResults map[uint64]*SlotResult `json:"slot_results,omitempty"` // Slot -> result details
CustodyGroupCount uint64 `json:"custody_group_count"` // CGC from node metadata
CustodyColumns []uint64 `json:"custody_columns,omitempty"` // Custody column indices
EarliestSlot uint64 `json:"earliest_slot"` // Earliest available slot from node status
}
APIMassNodeResult represents the scan result for a single node in mass scan
type APISlotData ¶ added in v1.18.0
type APISlotData struct {
AttestationsCount uint64 `json:"attestationscount"`
AttesterSlashingsCount uint64 `json:"attesterslashingscount"`
BlockRoot string `json:"blockroot"`
DepositsCount uint64 `json:"depositscount"`
Epoch uint64 `json:"epoch"`
ExecBaseFeePerGas uint64 `json:"exec_base_fee_per_gas"`
ExecBlockHash string `json:"exec_block_hash"`
ExecBlockNumber uint64 `json:"exec_block_number"`
ExecExtraData string `json:"exec_extra_data"`
ExecFeeRecipient string `json:"exec_fee_recipient"`
ExecGasLimit uint64 `json:"exec_gas_limit"`
ExecGasUsed uint64 `json:"exec_gas_used"`
ExecTransactionsCount uint64 `json:"exec_transactions_count"`
Graffiti string `json:"graffiti"`
GraffitiText string `json:"graffiti_text"`
ParentRoot string `json:"parentroot"`
Proposer uint64 `json:"proposer"`
ProposerSlashingsCount uint64 `json:"proposerslashingscount"`
Slot uint64 `json:"slot"`
StateRoot string `json:"stateroot"`
Status string `json:"status"`
SyncAggregateParticipation float64 `json:"syncaggregate_participation"`
VoluntaryExitsCount uint64 `json:"voluntaryexitscount"`
WithdrawalCount uint64 `json:"withdrawalcount"`
BlobCount uint64 `json:"blob_count"`
}
APISlotData represents detailed slot information
type APISlotResponse ¶ added in v1.18.0
type APISlotResponse struct {
Status string `json:"status"`
Data *APISlotData `json:"data"`
}
APISlotResponse represents the response for slot information
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 ApiValidatorRequestV1 ¶ added in v1.17.0
type ApiValidatorRequestV1 struct {
IndicesOrPubKey string `json:"indicesOrPubkey"`
}
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"`
}
type SlotResult ¶ added in v1.18.0
type SlotResult struct {
ValidColumnCount int `json:"valid_column_count"`
TotalColumns int `json:"total_columns"`
Error string `json:"error,omitempty"`
}
SlotResult represents the scan result for a single slot