Documentation ¶
Index ¶
- Variables
- func NewBeaconClient(l log.Logger, endpoint string) (*beaconClient, error)
- type AllValidatorsResponse
- type BeaconMetrics
- type BeaconNode
- type GenesisResponse
- type GetForkScheduleResponse
- type GetRandaoResponse
- type GetWithdrawalsResponse
- type HeadEvent
- type MultiBeaconClient
- func (b *MultiBeaconClient) Endpoint() string
- func (b *MultiBeaconClient) Genesis() (genesisInfo structs.GenesisInfo, err error)
- func (b *MultiBeaconClient) GetForkSchedule() (spec *GetForkScheduleResponse, err error)
- func (b *MultiBeaconClient) GetProposerDuties(epoch structs.Epoch) (*RegisteredProposersResponse, error)
- func (b *MultiBeaconClient) GetWithdrawals(slot structs.Slot) (withdrawalsResp *GetWithdrawalsResponse, err error)
- func (b *MultiBeaconClient) KnownValidators(headSlot structs.Slot) (AllValidatorsResponse, error)
- func (b *MultiBeaconClient) PublishBlock(block structs.SignedBeaconBlock) (err error)
- func (b *MultiBeaconClient) Randao(slot structs.Slot) (randao string, err error)
- func (b *MultiBeaconClient) SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent)
- func (b *MultiBeaconClient) SyncStatus() (*SyncStatusPayloadData, error)
- type RegisteredProposersResponse
- type RegisteredProposersResponseData
- type SyncStatusPayload
- type SyncStatusPayloadData
- type ValidatorResponseEntry
- type ValidatorResponseValidatorData
- Bugs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHTTPErrorResponse = errors.New("got an HTTP error response") )
View Source
var ( ErrBeaconNodeSyncing = errors.New("beacon node is syncing") ErrWithdrawalsUnsupported = errors.New("withdrawals are not supported") )
Functions ¶
Types ¶
type AllValidatorsResponse ¶
type AllValidatorsResponse struct {
Data []ValidatorResponseEntry
}
AllValidatorsResponse is the response for querying active validators
type BeaconMetrics ¶
type BeaconMetrics struct {
Timing *prometheus.HistogramVec
}
type BeaconNode ¶
type BeaconNode interface { SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent) GetProposerDuties(structs.Epoch) (*RegisteredProposersResponse, error) SyncStatus() (*SyncStatusPayloadData, error) KnownValidators(structs.Slot) (AllValidatorsResponse, error) Genesis() (structs.GenesisInfo, error) GetForkSchedule() (*GetForkScheduleResponse, error) PublishBlock(block structs.SignedBeaconBlock) error Randao(structs.Slot) (string, error) Endpoint() string GetWithdrawals(structs.Slot) (*GetWithdrawalsResponse, error) }
type GenesisResponse ¶
type GenesisResponse struct {
Data structs.GenesisInfo
}
type GetForkScheduleResponse ¶
type GetRandaoResponse ¶
type GetRandaoResponse struct { Data struct { Randao string `json:"randao"` } }
GetRandaoResponse is the response for querying randao from beacon
type GetWithdrawalsResponse ¶
type GetWithdrawalsResponse struct { Data struct { Withdrawals structs.Withdrawals `json:"withdrawals"` } }
type HeadEvent ¶
type HeadEvent struct { Slot uint64 `json:"slot,string"` Block string `json:"block"` State string `json:"state"` }
HeadEvent is emitted when subscribing to head events
type MultiBeaconClient ¶
type MultiBeaconClient struct { Log log.Logger Clients []BeaconNode // contains filtered or unexported fields }
func NewMultiBeaconClient ¶
func NewMultiBeaconClient(l log.Logger, clients []BeaconNode) *MultiBeaconClient
func (*MultiBeaconClient) Endpoint ¶
func (b *MultiBeaconClient) Endpoint() string
func (*MultiBeaconClient) Genesis ¶
func (b *MultiBeaconClient) Genesis() (genesisInfo structs.GenesisInfo, err error)
func (*MultiBeaconClient) GetForkSchedule ¶
func (b *MultiBeaconClient) GetForkSchedule() (spec *GetForkScheduleResponse, err error)
func (*MultiBeaconClient) GetProposerDuties ¶
func (b *MultiBeaconClient) GetProposerDuties(epoch structs.Epoch) (*RegisteredProposersResponse, error)
func (*MultiBeaconClient) GetWithdrawals ¶
func (b *MultiBeaconClient) GetWithdrawals(slot structs.Slot) (withdrawalsResp *GetWithdrawalsResponse, err error)
func (*MultiBeaconClient) KnownValidators ¶
func (b *MultiBeaconClient) KnownValidators(headSlot structs.Slot) (AllValidatorsResponse, error)
func (*MultiBeaconClient) PublishBlock ¶
func (b *MultiBeaconClient) PublishBlock(block structs.SignedBeaconBlock) (err error)
func (*MultiBeaconClient) Randao ¶
func (b *MultiBeaconClient) Randao(slot structs.Slot) (randao string, err error)
func (*MultiBeaconClient) SubscribeToHeadEvents ¶
func (b *MultiBeaconClient) SubscribeToHeadEvents(ctx context.Context, slotC chan HeadEvent)
func (*MultiBeaconClient) SyncStatus ¶
func (b *MultiBeaconClient) SyncStatus() (*SyncStatusPayloadData, error)
type RegisteredProposersResponse ¶
type RegisteredProposersResponse struct {
Data []RegisteredProposersResponseData
}
RegisteredProposersResponse is the response for querying proposer duties
type SyncStatusPayload ¶
type SyncStatusPayload struct {
Data SyncStatusPayloadData
}
SyncStatusPayload is the response payload for /eth/v1/node/syncing
type SyncStatusPayloadData ¶
type ValidatorResponseEntry ¶
type ValidatorResponseEntry struct { Index uint64 `json:"index,string"` // Index of validator in validator registry. Balance string `json:"balance"` // Current validator balance in gwei. Status string `json:"status"` Validator ValidatorResponseValidatorData `json:"validator"` }
type ValidatorResponseValidatorData ¶
type ValidatorResponseValidatorData struct {
Pubkey string `json:"pubkey"`
}
Notes ¶
Bugs ¶
do something with unsupported
Click to show internal directories.
Click to hide internal directories.