Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) ExitValidator(validatorIndex, epoch uint64, signature types.ValidatorSignature) error
- func (c *Client) GetBeaconHead() (beacon.BeaconHead, error)
- func (c *Client) GetClientType() beacon.BeaconClientType
- func (c *Client) GetDomainData(domainType []byte, epoch uint64) ([]byte, error)
- func (c *Client) GetEth2Config() (beacon.Eth2Config, error)
- func (c *Client) GetSyncStatus() (beacon.SyncStatus, error)
- func (c *Client) GetValidatorIndex(pubkey types.ValidatorPubkey) (uint64, 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 FinalityCheckpointsResponse
- type ForkResponse
- type GenesisResponse
- type SyncStatusResponse
- type Validator
- type VoluntaryExitMessage
- type VoluntaryExitRequest
Constants ¶
View Source
const ( RequestSyncStatusMethod = "get_v1_node_syncing" RequestEth2ConfigMethod = "get_v1_config_spec" RequestGenesisMethod = "get_v1_beacon_genesis" RequestFinalityCheckpointsMethod = "get_v1_beacon_states_finality_checkpoints" RequestForkMethod = "get_v1_beacon_states_fork" RequestValidatorsMethod = "get_v1_beacon_states_stateId_validators" RequestVoluntaryExitMethod = "post_v1_beacon_pool_voluntary_exits" MaxRequestValidatorsCount = 30 )
Config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Nimbus client
func (*Client) ExitValidator ¶
func (c *Client) ExitValidator(validatorIndex, epoch uint64, signature types.ValidatorSignature) error
Perform a voluntary exit on a validator
func (*Client) GetBeaconHead ¶
func (c *Client) GetBeaconHead() (beacon.BeaconHead, error)
Get the beacon head
func (*Client) GetClientType ¶
func (c *Client) GetClientType() beacon.BeaconClientType
Get the beacon client type
func (*Client) GetDomainData ¶
Get domain data for a domain type at a given epoch
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) GetValidatorIndex ¶
func (c *Client) GetValidatorIndex(pubkey types.ValidatorPubkey) (uint64, error)
Get a validator's index
func (*Client) GetValidatorStatus ¶
func (c *Client) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
Get a validator's status
func (*Client) GetValidatorStatuses ¶
func (c *Client) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (map[types.ValidatorPubkey]beacon.ValidatorStatus, error)
Get multiple validators' statuses
type Eth2ConfigResponse ¶
type Eth2ConfigResponse struct { SecondsPerSlot uinteger `json:"SECONDS_PER_SLOT"` SlotsPerEpoch uinteger `json:"SLOTS_PER_EPOCH"` }
type ForkResponse ¶
type ForkResponse struct { PreviousVersion byteArray `json:"previous_version"` CurrentVersion byteArray `json:"current_version"` Epoch uint64 `json:"epoch"` }
type GenesisResponse ¶
type GenesisResponse struct { GenesisTime uint64 `json:"genesis_time"` GenesisForkVersion byteArray `json:"genesis_fork_version"` GenesisValidatorsRoot byteArray `json:"genesis_validators_root"` }
type SyncStatusResponse ¶
type SyncStatusResponse struct { IsSyncing bool `json:"is_syncing"` HeadSlot uint64 `json:"head_slot"` SyncDistance uint64 `json:"sync_distance"` }
Response types
type Validator ¶
type Validator struct { Index uint64 `json:"index"` Balance uint64 `json:"balance"` Status string `json:"status"` Validator struct { Pubkey byteArray `json:"pubkey"` WithdrawalCredentials byteArray `json:"withdrawal_credentials"` EffectiveBalance uint64 `json:"effective_balance"` Slashed bool `json:"slashed"` ActivationEligibilityEpoch int64 `json:"activation_eligibility_epoch"` // Nimbus uses -1 for FAR_FUTURE_EPOCH so this has to be a signed int ActivationEpoch int64 `json:"activation_epoch"` // Same here ExitEpoch int64 `json:"exit_epoch"` // Same here WithdrawableEpoch int64 `json:"withdrawable_epoch"` // Same here } `json:"validator"` }
type VoluntaryExitMessage ¶
type VoluntaryExitRequest ¶
type VoluntaryExitRequest struct { Message VoluntaryExitMessage `json:"message"` Signature byteArray `json:"signature"` }
Request types
Click to show internal directories.
Click to hide internal directories.