Documentation ¶
Index ¶
- Constants
- type BeaconHeadResponse
- type Client
- func (c *Client) Close()
- func (c *Client) GetBeaconHead() (beacon.BeaconHead, error)
- func (c *Client) GetEth2Config() (beacon.Eth2Config, error)
- func (c *Client) GetSyncStatus() (beacon.SyncStatus, error)
- func (c *Client) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
- func (c *Client) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (map[types.ValidatorPubkey]beacon.ValidatorStatus, error)
- type Eth2ConfigResponse
- type SyncStatusResponse
- type ValidatorResponse
- type ValidatorsRequest
Constants ¶
View Source
const ( RequestUrlFormat = "%s://%s%s" RequestProtocol = "http" RequestContentType = "application/json" RequestSyncStatusPath = "/node/syncing" RequestEth2ConfigPath = "/spec" RequestBeaconHeadPath = "/beacon/head" RequestValidatorsPath = "/beacon/validators" RequestSlotsPerEpochPath = "/spec/slots_per_epoch" RequestGenesisTimePath = "/beacon/genesis_time" RequestBeaconStateRootPath = "/beacon/state_root" )
Config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconHeadResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Lighthouse client
func (*Client) GetBeaconHead ¶
func (c *Client) GetBeaconHead() (beacon.BeaconHead, error)
Get the beacon head
func (*Client) GetEth2Config ¶
func (c *Client) GetEth2Config() (beacon.Eth2Config, error)
Get the eth2 config
func (*Client) GetSyncStatus ¶
func (c *Client) GetSyncStatus() (beacon.SyncStatus, error)
Get the node's sync status
func (*Client) GetValidatorStatus ¶
func (c *Client) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
Get a validator's status
func (*Client) GetValidatorStatuses ¶ added in v0.0.4
func (c *Client) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (map[types.ValidatorPubkey]beacon.ValidatorStatus, error)
Get multiple validators' statuses
type Eth2ConfigResponse ¶
type SyncStatusResponse ¶
type SyncStatusResponse struct {
IsSyncing bool `json:"is_syncing"`
}
Response types
type ValidatorResponse ¶
type ValidatorResponse struct { Balance uint64 `json:"balance"` Validator struct { Pubkey byteArray `json:"pubkey"` WithdrawalCredentials byteArray `json:"withdrawal_credentials"` EffectiveBalance uint64 `json:"effective_balance"` Slashed bool `json:"slashed"` ActivationEligibilityEpoch uint64 `json:"activation_eligibility_epoch"` ActivationEpoch uint64 `json:"activation_epoch"` ExitEpoch uint64 `json:"exit_epoch"` WithdrawableEpoch uint64 `json:"withdrawable_epoch"` } `json:"validator"` }
type ValidatorsRequest ¶
type ValidatorsRequest struct { StateRoot string `json:"state_root,omitempty"` Pubkeys []string `json:"pubkeys"` }
Request types
Click to show internal directories.
Click to hide internal directories.